comparison 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
comparison
equal deleted inserted replaced
1370:289cb3554c55 1371:23df332b2a4c
187 QFont font("DejaVuSans"); 187 QFont font("DejaVuSans");
188 font.setPointSize(9); 188 font.setPointSize(9);
189 app.setFont(font); 189 app.setFont(font);
190 } 190 }
191 191
192
193 QDateTime sigDt;
194 #ifndef Q_OS_WIN
195 /* Read it from the install config. */
196 sigDt = ProcessHelp::getSigDtFromInstSettings();
197 Q_UNUSED(signed_time);
198 #else
192 if (signed_time != 0 && signed_time != -1) { 199 if (signed_time != 0 && signed_time != -1) {
193 QDateTime sigTime = QDateTime::fromTime_t(signed_time); 200 /* Take it from the selftest result. */
194 QSettings settigs; 201 sigDt = QDateTime::fromTime_t(signed_time);
195 settings.setValue("Software/currentSigDt", sigTime); 202 }
196 } 203 #endif
197 204
198 MainWindow mainWin(trayMode); 205 MainWindow mainWin(trayMode, sigDt);
199 206
200 return app.exec(); 207 return app.exec();
201 } 208 }

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