diff ui/main.cpp @ 1371:23df332b2a4c

(issue179) Read install signature timestamp from config This also changes the way the sigDt is propgated to the MainWindow. It no longer uses the settings but hands it over as a parameter directly.
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 24 Nov 2014 15:48:49 +0100
parents 3d7ddf698480
children c64b6c56ce96
line wrap: on
line diff
--- a/ui/main.cpp	Mon Nov 24 14:43:36 2014 +0100
+++ b/ui/main.cpp	Mon Nov 24 15:48:49 2014 +0100
@@ -189,13 +189,20 @@
         app.setFont(font);
     }
 
+
+    QDateTime sigDt;
+#ifndef Q_OS_WIN
+    /* Read it from the install config. */
+    sigDt = ProcessHelp::getSigDtFromInstSettings();
+    Q_UNUSED(signed_time);
+#else
     if (signed_time != 0 && signed_time != -1) {
-        QDateTime sigTime = QDateTime::fromTime_t(signed_time);
-        QSettings settigs;
-        settings.setValue("Software/currentSigDt", sigTime);
+        /* Take it from the selftest result. */
+        sigDt = QDateTime::fromTime_t(signed_time);
     }
+#endif
 
-    MainWindow mainWin(trayMode);
+    MainWindow mainWin(trayMode, sigDt);
 
     return app.exec();
 }

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