diff ui/mainwindow.cpp @ 479:a8d56a2846a8

Fill the internal list of previously unselcted certificates when saving in settings.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 24 Apr 2014 12:01:34 +0200
parents 1ce835c40eb7
children 242f2bf5417e
line wrap: on
line diff
--- a/ui/mainwindow.cpp	Wed Apr 23 16:54:16 2014 +0000
+++ b/ui/mainwindow.cpp	Thu Apr 24 12:01:34 2014 +0200
@@ -657,14 +657,18 @@
 
 bool MainWindow::saveUnselectedCertificates()
 {
+    mPreviouslyUnselected.clear();
     mSettings.beginGroup("unselected");
     mSettings.remove(""); /* Clears old choices */
     for (int i = 0; i < mCertListWidget->count(); i++) {
         QListWidgetItem *item = mCertListWidget->item(i);
         if (item->checkState() != Qt::Checked &&
             (item->flags() & Qt::ItemIsUserCheckable)) {
-            mSettings.setValue(QString::fromLatin1("cert%1").arg(i),
-                    item->data(CertificateItemDelegate::DataRole).value<Certificate>().base64Line());
+            QString key = QString::fromLatin1("cert%1").arg(i);
+            QString value =
+                item->data(CertificateItemDelegate::DataRole).value<Certificate>().base64Line();
+            mSettings.setValue(key, value);
+            mPreviouslyUnselected << value;
         }
     }
     mSettings.endGroup();

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