diff options
author | Manuel Schneider | 2014-09-03 16:40:20 +0200 |
---|---|---|
committer | Manuel Schneider | 2014-09-03 16:40:20 +0200 |
commit | 3e047a7cc4a6a507c91bd9279584fdd364841a2e (patch) | |
tree | 88596e103efa4baa83b13b3cbd172339b5548c16 /src/server | |
parent | Adjust the system settings path in client (diff) | |
download | pvs2-3e047a7cc4a6a507c91bd9279584fdd364841a2e.tar.gz pvs2-3e047a7cc4a6a507c91bd9279584fdd364841a2e.tar.xz pvs2-3e047a7cc4a6a507c91bd9279584fdd364841a2e.zip |
Remove heavy unreadable debug messages. Reintent.
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/main.cpp | 82 | ||||
-rw-r--r-- | src/server/mainwindow/mainwindow.cpp | 3 |
2 files changed, 42 insertions, 43 deletions
diff --git a/src/server/main.cpp b/src/server/main.cpp index 1d46d66..d77d77f 100644 --- a/src/server/main.cpp +++ b/src/server/main.cpp @@ -5,50 +5,50 @@ int main(int argc, char** argv) { - QString ipListUrl; - if (argc != 2) - { - ipListUrl = ""; - } else { - ipListUrl = argv[1]; - } - QApplication app(argc, argv); - app.setOrganizationName("openslx"); - app.setOrganizationDomain("openslx.org"); - app.setApplicationName("pvsmgr"); - - qsrand((uint)QDateTime::currentMSecsSinceEpoch()); - - - // 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()) + QString ipListUrl; + if (argc != 2) + { + ipListUrl = ""; + } else { + ipListUrl = argv[1]; + } + QApplication app(argc, argv); + app.setOrganizationName("openslx"); + app.setOrganizationDomain("openslx.org"); + app.setApplicationName("pvsmgr"); + + qsrand((uint)QDateTime::currentMSecsSinceEpoch()); + + + // 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()) { - 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."; - } + if (!QFile::copy(sys.fileName(), settings.fileName())) + qDebug() << "Copying default settings from " << sys.fileName() << " to " << settings.fileName() << " failed."; } + } - // use system locale as language to translate gui - QTranslator translator; - translator.load(":pvsmgr"); - app.installTranslator(&translator); + // use system locale as language to translate gui + QTranslator translator; + translator.load(":pvsmgr"); + app.installTranslator(&translator); - MainWindow pvsmgr(ipListUrl); - return app.exec(); + MainWindow pvsmgr(ipListUrl); + return app.exec(); } diff --git a/src/server/mainwindow/mainwindow.cpp b/src/server/mainwindow/mainwindow.cpp index 17e821a..87e7471 100644 --- a/src/server/mainwindow/mainwindow.cpp +++ b/src/server/mainwindow/mainwindow.cpp @@ -305,7 +305,6 @@ void MainWindow::tellClientCurrentSituation(Client* client) void MainWindow::tryToUseRoomTemplate() { SYSTEM_SETTINGS(conf); - qDebug() << "Settings contain" << conf.allKeys(); if (!conf.contains("rooms")) { qDebug() << "Invalid config file!"; @@ -346,7 +345,7 @@ void MainWindow::tryToUseRoomTemplate() /* * * CFG to test this - * http://git.openslx.org/tm-scripts.git/plain/server/modules/pvs2-freiburg/etc/xdg/openslx/pvs2mgr.ini + * http://git.openslx.org/tm-scripts.git/plain/server/modules/pvs2-freiburg/opt/openslx/pvs2.ini * */ |