From 211bed049d7073ea95789eeedc483541f8a85b2c Mon Sep 17 00:00:00 2001 From: Christian Klinger Date: Mon, 12 Sep 2016 13:09:15 +0200 Subject: removed USER_SETTINGS etc. (this also changes filename of the crt ans rsa files, but this shouldn't be a problem. (formerly the name of those files depended on the name and location of the ini-files) --- src/server/main.cpp | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) (limited to 'src/server/main.cpp') diff --git a/src/server/main.cpp b/src/server/main.cpp index 71657d8..2e5a32b 100644 --- a/src/server/main.cpp +++ b/src/server/main.cpp @@ -36,26 +36,9 @@ int main(int argc, char** argv) // 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() << "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()) - { - if (!QFile::copy(sys.fileName(), settings.fileName())) - qDebug() << "Copying default settings from " << sys.fileName() << " to " << settings.fileName() << " failed."; - } - } + SETTINGS(sys); + qDebug() << "System settings are in:" << sys.fileName(); + QFileInfo sysfi(sys.fileName()); // use system locale as language to translate gui -- cgit v1.2.3-55-g7522