changeset 462:091ad56c2715

Change current certificates file name. Some cleanups.
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 23 Apr 2014 15:32:24 +0000
parents 1ce835c40eb7
children 5200b8e9b2ae
files ui/administratorwindow.cpp
diffstat 1 files changed, 4 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/ui/administratorwindow.cpp	Wed Apr 23 16:37:17 2014 +0200
+++ b/ui/administratorwindow.cpp	Wed Apr 23 15:32:24 2014 +0000
@@ -32,7 +32,7 @@
 AdministratorWindow::AdministratorWindow() {
     setWindowTitle(tr("TrustBridge Administration"));
     QString path = QStandardPaths::locate(
-        QStandardPaths::DataLocation, QString("certlist_last.txt"));
+        QStandardPaths::DataLocation, QString("current_certificates.txt"));
     mCertList.readList(path.toLocal8Bit());
     createActions();
     createMenuBar();
@@ -138,16 +138,12 @@
 
 void AdministratorWindow::loadCertificateFile()
 {
-    QString path = QStandardPaths::locate(
-        QStandardPaths::DataLocation, QString("certlist_last.txt"));
     QString certFile = QFileDialog::getOpenFileName(
-        this, tr("Select certificate list file"), path, "*.txt");
-    qDebug() << "selected: " + certFile;
+        this, tr("Select certificate list file"), QDir::homePath(), "*.txt");
     mCertList.readList(certFile.toLocal8Bit().constData());
     if (!mCertList.isValid()) {
         qDebug() << "Not a valid list.";
-    }
-    else {
+    } else {
         certificateModel->removeAll();
         loadCertificateTable();
     }
@@ -162,7 +158,7 @@
 void AdministratorWindow::addCertificates()
 {
     QStringList certFiles = QFileDialog::getOpenFileNames(
-        this, tr("Select certificate"), QDir::homePath(), "*.pem *.der");
+        this, tr("Select certificate"), QDir::homePath(), "*.pem *.der *.crt");
     for (int i = 0; i < certFiles.size(); i++) {
         QString certFile = certFiles.at(i);
         QList<Certificate> certs = Certificate::fromFileName(certFile);

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