Mercurial > trustbridge
comparison ui/mainwindow.cpp @ 1362:c2b76c8a8b82
(issue177) Only install certificate lists which are newer
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Wed, 19 Nov 2014 19:07:56 +0100 |
parents | 64f812a63de6 |
children | 3d7ddf698480 |
comparison
equal
deleted
inserted
replaced
1361:0f3af6916395 | 1362:c2b76c8a8b82 |
---|---|
304 } | 304 } |
305 mSettings.setValue("List/available", fileName); | 305 mSettings.setValue("List/available", fileName); |
306 mSettings.setValue("List/availableDate", modDate); | 306 mSettings.setValue("List/availableDate", modDate); |
307 | 307 |
308 verifyListData(); | 308 verifyListData(); |
309 if (!mListToInstall.isValid()) { | 309 if (!mListToInstall.isValid() || mListToInstall.date() <= mInstalledList.date()) { |
310 if ( mListToInstall.date() <= mInstalledList.date()) { | |
311 qDebug() << "Newest list on the server is older then the installed list. "; | |
312 qDebug() << "Installed: " << mInstalledList.date(); | |
313 qDebug() << "Available: " << mListToInstall.date(); | |
314 } else { | |
315 qDebug() << "Failed to verify list."; | |
316 } | |
310 handleLTE(lteInvalidList); | 317 handleLTE(lteInvalidList); |
311 /* Downloader provided invalid files */ | 318 /* Downloader provided invalid files */ |
312 | 319 |
313 /* Retry the download again in 10 - 20 minutes */ | 320 /* Retry the download again in 10 - 20 minutes */ |
314 QTimer::singleShot(600000 + (qrand() % 60000), this, SLOT(checkUpdates())); | 321 QTimer::singleShot(600000 + (qrand() % 60000), this, SLOT(checkUpdates())); |
315 qDebug() << "Failed to verify list."; | |
316 } else { | 322 } else { |
317 if (mTrayIcon->isAlternative()) { | 323 if (mTrayIcon->isAlternative()) { |
318 mCurMessage = tr("An updated certificate list is available."); | 324 mCurMessage = tr("An updated certificate list is available."); |
319 } else { | 325 } else { |
320 mCurMessage = tr("An updated certificate list is available.") +" " + tr("Click here to install."); | 326 mCurMessage = tr("An updated certificate list is available.") +" " + tr("Click here to install."); |