comparison ui/mainwindow.cpp @ 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 b1b14daf2116
children 4932fc33ee82
comparison
equal deleted inserted replaced
448:5b4ce22186e9 449:023b565a02fc
292 QVBoxLayout *settingsLayout = new QVBoxLayout; 292 QVBoxLayout *settingsLayout = new QVBoxLayout;
293 293
294 // The certificate list 294 // The certificate list
295 QGroupBox *certBox = new QGroupBox(tr("Managed Certificates")); 295 QGroupBox *certBox = new QGroupBox(tr("Managed Certificates"));
296 mCertListWidget = new QListWidget; 296 mCertListWidget = new QListWidget;
297 connect(mCertListWidget, SIGNAL(itemClicked(QListWidgetItem*)), 297 connect(mCertListWidget, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)),
298 this, SLOT(showDetails(QListWidgetItem*))); 298 this, SLOT(showDetails(QListWidgetItem*)));
299 certLayout->addWidget(mCertListWidget); 299 certLayout->addWidget(mCertListWidget);
300 certBox->setLayout(certLayout); 300 certBox->setLayout(certLayout);
301 301
302 // The header (icon, about text) 302 // The header (icon, about text)
519 about->show(); 519 about->show();
520 } 520 }
521 521
522 void MainWindow::showDetails(QListWidgetItem *item) 522 void MainWindow::showDetails(QListWidgetItem *item)
523 { 523 {
524 if (item == NULL) {
525 return;
526 }
524 Certificate cert = item->data(CertificateItemDelegate::DataRole).value<Certificate>(); 527 Certificate cert = item->data(CertificateItemDelegate::DataRole).value<Certificate>();
525 mSubjectCN->setText(cert.subjectCN()); 528 mSubjectCN->setText(cert.subjectCN());
526 mSubjectOU->setText(cert.subjectOU()); 529 mSubjectOU->setText(cert.subjectOU());
527 mIssuerCN->setText(cert.issuerCN()); 530 mIssuerCN->setText(cert.issuerCN());
528 mIssuerOU->setText(cert.issuerO()); 531 mIssuerOU->setText(cert.issuerO());

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