diff ui/mainwindow.cpp @ 82:1f27d6db5ee3

Polarssl based certificate handling
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 19 Mar 2014 18:04:14 +0000
parents 7e304573ebd1
children c0fdb8d336cf
line wrap: on
line diff
--- a/ui/mainwindow.cpp	Wed Mar 19 16:50:59 2014 +0000
+++ b/ui/mainwindow.cpp	Wed Mar 19 18:04:14 2014 +0000
@@ -79,6 +79,7 @@
     if (!listFileName.isEmpty()) {
         mListToInstall.readList(listFileName.toLocal8Bit().constData());
         if (!mListToInstall.isValid()) {
+            mCurState = TransferError;
             // Probably a bug when Qt fileName is encoded and cFileName
             // fails because of this. This needs a unit test!
             // Maybe check that the file is in our data directory
@@ -112,10 +113,11 @@
 
         /* Retry the download again in 10 - 20 minutes */
         QTimer::singleShot(600000 + (qrand() % 60000), this, SLOT(checkUpdates()));
+    } else {
+        mCurMessage = tr("An updated certificate list is available. Click here to install.");
+        setState(NewListAvailable);
+        showMessage();
     }
-    mCurMessage = tr("An updated certificate list is available. Click here to install.");
-    setState(NewListAvailable);
-    showMessage();
 }
 
 void MainWindow::handleNewSW(const QString& fileName, const QDateTime& modDate) {

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