summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;