diff options
author | Manuel Schneider | 2014-09-03 15:39:57 +0200 |
---|---|---|
committer | Manuel Schneider | 2014-09-03 15:39:57 +0200 |
commit | 32765f74b54d206ade6e7c3752a2e8905e6f8f82 (patch) | |
tree | d1bd161c56b3777eebce2b6c749c08546073f985 /src/server/main.cpp | |
parent | Read the configfile and place the frames according to the coordinates (diff) | |
download | pvs2-32765f74b54d206ade6e7c3752a2e8905e6f8f82.tar.gz pvs2-32765f74b54d206ade6e7c3752a2e8905e6f8f82.tar.xz pvs2-32765f74b54d206ade6e7c3752a2e8905e6f8f82.zip |
Change system settings path. Change name of config file
Diffstat (limited to 'src/server/main.cpp')
-rw-r--r-- | src/server/main.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/server/main.cpp b/src/server/main.cpp index 191c234..1d46d66 100644 --- a/src/server/main.cpp +++ b/src/server/main.cpp @@ -19,18 +19,22 @@ int main(int argc, char** argv) qsrand((uint)QDateTime::currentMSecsSinceEpoch()); - // Make sure settings directory exists - do { + + // Set the global path of the settings + QSettings::setPath(QSettings::IniFormat, QSettings::SystemScope, "/opt/"); + + // Make sure settings directory exists 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()) { @@ -38,7 +42,7 @@ 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; |