changeset 449:023b565a02fc

Update certificate details on item selection change.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 23 Apr 2014 12:15:43 +0200
parents 5b4ce22186e9
children 4932fc33ee82
files ui/mainwindow.cpp
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ui/mainwindow.cpp	Wed Apr 23 11:57:33 2014 +0200
+++ b/ui/mainwindow.cpp	Wed Apr 23 12:15:43 2014 +0200
@@ -294,7 +294,7 @@
     // The certificate list
     QGroupBox *certBox = new QGroupBox(tr("Managed Certificates"));
     mCertListWidget = new QListWidget;
-    connect(mCertListWidget, SIGNAL(itemClicked(QListWidgetItem*)),
+    connect(mCertListWidget, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)),
         this, SLOT(showDetails(QListWidgetItem*)));
     certLayout->addWidget(mCertListWidget);
     certBox->setLayout(certLayout);
@@ -521,6 +521,9 @@
 
 void MainWindow::showDetails(QListWidgetItem *item)
 {
+    if (item == NULL) {
+        return;
+    }
     Certificate cert = item->data(CertificateItemDelegate::DataRole).value<Certificate>();
     mSubjectCN->setText(cert.subjectCN());
     mSubjectOU->setText(cert.subjectOU());

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