UserDataDir, AppDataDir, CacheDir added

This commit is contained in:
doitux
2007-09-08 18:53:59 +00:00
parent 601455794d
commit 37dcf18e58
9 changed files with 30 additions and 5 deletions
@@ -69,7 +69,7 @@ void joinNetworkGameDialogImpl::exec() {
if (myConfig->readConfigInt("CLA_NoWriteAccess") == 0 ) {
//if discwrite-access
myServerProfilesFile = myConfig->readConfigString("DataDir")+"serverprofiles.xml";
myServerProfilesFile = myConfig->readConfigString("UserDataDir")+"serverprofiles.xml";
//Anlegen wenn noch nicht existiert!
QFile serverProfilesfile(QString::fromUtf8(myServerProfilesFile.c_str()));
+4
View File
@@ -57,3 +57,7 @@ QString QtHelper::getDataPath()
return QDir::cleanPath(path) + "/";
}
std::string QtHelper::getDataPathStdString()
{
return getDataPath().toUtf8().constData();
}
+1
View File
@@ -27,6 +27,7 @@ public:
std::string getDefaultLanguage();
QString getDataPath();
std::string getDataPathStdString();
};
+2
View File
@@ -38,3 +38,5 @@ QtToolsWrapper::~QtToolsWrapper()
std::string QtToolsWrapper::stringToUtf8(const std::string &myString) { return myQtHelper->stringToUtf8(myString); }
std::string QtToolsWrapper::getDefaultLanguage() { return myQtHelper->getDefaultLanguage(); }
std::string QtToolsWrapper::getDataPathStdString() { return myQtHelper->getDataPathStdString(); }
+1
View File
@@ -36,6 +36,7 @@ public:
std::string stringToUtf8(const std::string &myString);
std::string getDefaultLanguage();
std::string getDataPathStdString();
private:
+1
View File
@@ -29,6 +29,7 @@ public:
//qthelper.cpp
virtual std::string stringToUtf8(const std::string &) =0;
virtual std::string getDefaultLanguage() =0;
virtual std::string getDataPathStdString() =0;
};