diff ui/administratorwindow.cpp @ 401:e11409381e16

Changed path for load certificatelist and add certificate.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 16 Apr 2014 11:03:18 +0200
parents d481b1d0956f
children 17e1c8f37d72
line wrap: on
line diff
--- a/ui/administratorwindow.cpp	Wed Apr 16 10:08:32 2014 +0200
+++ b/ui/administratorwindow.cpp	Wed Apr 16 11:03:18 2014 +0200
@@ -131,8 +131,10 @@
 
 void AdministratorWindow::loadCertificateFile()
 {
+    QString path = QStandardPaths::locate(
+        QStandardPaths::DataLocation, QString("certlist_last.txt"));
     QString certFile = QFileDialog::getOpenFileName(
-        this, tr("Select certificate file"), "/home/rrenkert/local-home/projects/m13/src/repo/ui/tests/data/", "*.txt");
+        this, tr("Select certificate file"), path, "*.txt");
     qDebug() << "selected: " + certFile;
     certList.readList(certFile.toLocal8Bit().constData());
     if (!certList.isValid()) {
@@ -153,7 +155,7 @@
 void AdministratorWindow::addCertificates()
 {
     QString certFile = QFileDialog::getOpenFileName(
-        this, tr("Select certificate"), "/home/rrenkert/local-home/projects/m13/src/repo/ui/tests/data/", "*.pem *.der");
+        this, tr("Select certificate"), QDir::homePath(), "*.pem *.der");
     QList<Certificate> certs = Certificate::fromFileName(certFile);
     addToCertificateTable(certs);
 }

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