comparison ui/mainwindow.cpp @ 446:43090637d6ae

Check if list item is checkable before adding the item to unselected list.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 23 Apr 2014 11:55:28 +0200
parents b3721ded6f5b
children b1b14daf2116
comparison
equal deleted inserted replaced
445:b3721ded6f5b 446:43090637d6ae
621 { 621 {
622 mSettings.beginGroup("unselected"); 622 mSettings.beginGroup("unselected");
623 mSettings.remove(""); /* Clears old choices */ 623 mSettings.remove(""); /* Clears old choices */
624 for (int i = 0; i < mCertListWidget->count(); i++) { 624 for (int i = 0; i < mCertListWidget->count(); i++) {
625 QListWidgetItem *item = mCertListWidget->item(i); 625 QListWidgetItem *item = mCertListWidget->item(i);
626 if (item->checkState() != Qt::Checked) { 626 if (item->checkState() != Qt::Checked &&
627 (item->flags() & Qt::ItemIsUserCheckable)) {
627 mSettings.setValue(QString::fromLatin1("cert%1").arg(i), 628 mSettings.setValue(QString::fromLatin1("cert%1").arg(i),
628 item->data(CertificateItemDelegate::DataRole).value<Certificate>().base64Line()); 629 item->data(CertificateItemDelegate::DataRole).value<Certificate>().base64Line());
629 } 630 }
630 } 631 }
631 mSettings.endGroup(); 632 mSettings.endGroup();

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