[PATCH 4 of 5] Adminstration: "Add certificate" can now load multiple certificate files

Wald Commits scm-commit at wald.intevation.org
Thu Apr 17 13:23:37 CEST 2014


# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1397733775 -7200
# Node ID f07bc5de2a87c2ca8bebe5fea06401960b8e733e
# Parent  d1819cd56dee02bb84ef25400a6495479810c55c
Adminstration: "Add certificate" can now load multiple certificate files.

diff -r d1819cd56dee -r f07bc5de2a87 ui/administratorwindow.cpp
--- a/ui/administratorwindow.cpp	Thu Apr 17 13:16:43 2014 +0200
+++ b/ui/administratorwindow.cpp	Thu Apr 17 13:22:55 2014 +0200
@@ -161,10 +161,13 @@
 
 void AdministratorWindow::addCertificates()
 {
-    QString certFile = QFileDialog::getOpenFileName(
+    QStringList certFiles = QFileDialog::getOpenFileNames(
         this, tr("Select certificate"), QDir::homePath(), "*.pem *.der");
-    QList<Certificate> certs = Certificate::fromFileName(certFile);
-    addToCertificateTable(certs);
+    for (int i = 0; i < certFiles.size(); i++) {
+        QString certFile = certFiles.at(i);
+        QList<Certificate> certs = Certificate::fromFileName(certFile);
+        addToCertificateTable(certs);
+    }
     certificateView->resizeColumnsToContents();
     certificateView->setColumnWidth(0, 60);
 }


More information about the Trustbridge-commits mailing list