diff ui/administratorwindow.cpp @ 429:f07bc5de2a87

Adminstration: "Add certificate" can now load multiple certificate files.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 17 Apr 2014 13:22:55 +0200
parents d08e39b913ee
children 6dec8101793c
line wrap: on
line diff
--- 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);
 }

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