[PATCH 1 of 5] Fill the internal list of previously unselcted certificates when saving in settings

Wald Commits scm-commit at wald.intevation.org
Thu Apr 24 12:45:19 CEST 2014


# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1398333694 -7200
# Node ID a8d56a2846a86ea51842bbe03f1a61f9aa805a48
# Parent  bcae22d57e673059860ddbdf256fdd6549d2a4e7
Fill the internal list of previously unselcted certificates when saving in settings.

diff -r bcae22d57e67 -r a8d56a2846a8 ui/mainwindow.cpp
--- 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();


More information about the Trustbridge-commits mailing list