comparison ui/main.cpp @ 499:077b4342d69b

Default autostart to true and change setting to bool
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 25 Apr 2014 10:16:46 +0000
parents 77d478a34f45
children 2ea11a95aa4a
comparison
equal deleted inserted replaced
498:5ec7d3a36ba6 499:077b4342d69b
46 QStringList arguments = QApplication::arguments(); 46 QStringList arguments = QApplication::arguments();
47 bool trayMode = arguments.contains("--tray"); 47 bool trayMode = arguments.contains("--tray");
48 48
49 QSettings settings; 49 QSettings settings;
50 settings.beginGroup("settings"); 50 settings.beginGroup("settings");
51 int autoStart = settings.value("autostart").toInt(); 51 bool autoStart = settings.value("autostart", true).toBool();
52 settings.endGroup(); 52 settings.endGroup();
53 53
54 if (trayMode && autoStart <= 0) { 54 if (trayMode && !autoStart) {
55 return 0; 55 return 0;
56 } 56 }
57 57
58 QTranslator translator; 58 QTranslator translator;
59 if (QLocale::system().name() == "C") { 59 if (QLocale::system().name() == "C") {

http://wald.intevation.org/projects/trustbridge/