summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Schneider2014-09-03 15:59:30 +0200
committerManuel Schneider2014-09-03 15:59:30 +0200
commitaf44974aab6c988c95e2e6446a45198f65ca206c (patch)
tree1ec41ea2fb7341eed55bda2469da41534c2616d7
parentMerge branch 'master' of git.openslx.org:pvs2 (diff)
downloadpvs2-af44974aab6c988c95e2e6446a45198f65ca206c.tar.gz
pvs2-af44974aab6c988c95e2e6446a45198f65ca206c.tar.xz
pvs2-af44974aab6c988c95e2e6446a45198f65ca206c.zip
Adjust the system settings path in client
-rw-r--r--src/client/main.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/client/main.cpp b/src/client/main.cpp
index b268ca3..efaa6c5 100644
--- a/src/client/main.cpp
+++ b/src/client/main.cpp
@@ -16,18 +16,22 @@ int main(int argc, char** argv)
qsrand((uint)QDateTime::currentMSecsSinceEpoch());
+
+ // Set the global path of the settings
+ QSettings::setPath(QSettings::IniFormat, QSettings::SystemScope, "/opt/");
+
// Make sure settings directory exists
- do {
USER_SETTINGS(settings);
QFileInfo fi(settings.fileName());
QDir path(fi.path());
- qDebug() << "Settings directory is " << fi.path();
+ qDebug() << "User settings are in:" << settings.fileName();
if (!path.exists())
path.mkpath(path.absolutePath());
// Now check if settings file exists. If not, copy system default (if available)
if (!fi.exists())
{
SYSTEM_SETTINGS(sys);
+ qDebug() << "System settings are in:" << sys.fileName();
QFileInfo sysfi(sys.fileName());
if (sysfi.exists())
{
@@ -35,7 +39,6 @@ int main(int argc, char** argv)
qDebug() << "Copying default settings from " << sys.fileName() << " to " << settings.fileName() << " failed.";
}
}
- } while (0);
// use system locale as language to translate gui
QTranslator translator;