path to UTF8
configfile split
This commit is contained in:
@@ -24,11 +24,12 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
joinNetworkGameDialogImpl::joinNetworkGameDialogImpl(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
joinNetworkGameDialogImpl::joinNetworkGameDialogImpl(QWidget *parent, std::string path)
|
||||
: QDialog(parent), myConfig(0)
|
||||
{
|
||||
|
||||
setupUi(this);
|
||||
myConfig = new ConfigFile(path);
|
||||
|
||||
setupUi(this);
|
||||
|
||||
//Profile Name darf nicht mit einer Zahl beginnen --> XML konform
|
||||
QRegExp rx("[A-Z|a-z]+[A-Z|a-z|\\d]*");
|
||||
@@ -39,7 +40,7 @@ joinNetworkGameDialogImpl::joinNetworkGameDialogImpl(QWidget *parent)
|
||||
|
||||
lineEdit_ipAddress->setFocus();
|
||||
|
||||
myServerProfilesFile = myConfig.readConfigString("DataDir")+"serverprofiles.xml";
|
||||
myServerProfilesFile = myConfig->readConfigString("DataDir")+"serverprofiles.xml";
|
||||
|
||||
//Anlegen wenn noch nicht existiert!
|
||||
QFile serverProfilesfile(QString::fromUtf8(myServerProfilesFile.c_str()));
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include "configfile.h"
|
||||
#include <QtGui>
|
||||
#include <QtCore>
|
||||
|
||||
@@ -34,9 +33,9 @@ class ConfigFile;
|
||||
class joinNetworkGameDialogImpl: public QDialog, public Ui::joinNetworkGameDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
joinNetworkGameDialogImpl(QWidget *parent = 0);
|
||||
joinNetworkGameDialogImpl(QWidget *parent = 0, std::string = "");
|
||||
|
||||
ConfigFile myConfig;
|
||||
|
||||
std::string myServerProfilesFile;
|
||||
|
||||
public slots:
|
||||
@@ -47,6 +46,9 @@ public slots:
|
||||
void saveServerProfile();
|
||||
void deleteServerProfile();
|
||||
void keyPressEvent ( QKeyEvent * event );
|
||||
|
||||
private:
|
||||
ConfigFile *myConfig;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user