[PATCH 2 of 4] Check if list item is checkable before adding the item to unselected list
Wald Commits
scm-commit at wald.intevation.org
Wed Apr 23 11:57:42 CEST 2014
# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1398246928 -7200
# Node ID 43090637d6aed245d3799f08f0c537fbf70c8779
# Parent b3721ded6f5bf23bd13f33943f5687220cf9513c
Check if list item is checkable before adding the item to unselected list.
diff -r b3721ded6f5b -r 43090637d6ae ui/mainwindow.cpp
--- a/ui/mainwindow.cpp Wed Apr 23 11:53:57 2014 +0200
+++ b/ui/mainwindow.cpp Wed Apr 23 11:55:28 2014 +0200
@@ -623,7 +623,8 @@
mSettings.remove(""); /* Clears old choices */
for (int i = 0; i < mCertListWidget->count(); i++) {
QListWidgetItem *item = mCertListWidget->item(i);
- if (item->checkState() != Qt::Checked) {
+ if (item->checkState() != Qt::Checked &&
+ (item->flags() & Qt::ItemIsUserCheckable)) {
mSettings.setValue(QString::fromLatin1("cert%1").arg(i),
item->data(CertificateItemDelegate::DataRole).value<Certificate>().base64Line());
}
More information about the Trustbridge-commits
mailing list