changeset 1324:b6fb5d347023

Store last folder from which certificates were added.
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 14 Oct 2014 18:11:36 +0200
parents c582b935c120
children 303de3160a83
files ui/administratorwindow.cpp
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ui/administratorwindow.cpp	Tue Oct 14 18:10:17 2014 +0200
+++ b/ui/administratorwindow.cpp	Tue Oct 14 18:11:36 2014 +0200
@@ -184,11 +184,14 @@
 void AdministratorWindow::addCertificates()
 {
     QStringList certFiles = QFileDialog::getOpenFileNames(
-        this, tr("Select certificate"), QDir::homePath(), "*.pem *.der *.crt *.cer");
+        this, tr("Select certificate"), mSettings.value("LastCertAddDir", QDir::homePath()).toString(),
+            "*.pem *.der *.crt *.cer");
     for (int i = 0; i < certFiles.size(); i++) {
         QString certFile = certFiles.at(i);
         QList<Certificate> certs = Certificate::fromFileName(certFile);
         addToCertificateTable(certs);
+        QDir certDir (certFile);
+        mSettings.setValue("LastCertAddDir", certDir.absolutePath());
     }
     certificateView->resizeColumnsToContents();
     certificateView->setColumnWidth(0, 60);

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