changeset 567:75e39c52aa94

Check if cert-list filename is null (user canceled open file dialog).
author Raimund Renkert <rrenkert@intevation.de>
date Fri, 23 May 2014 10:24:51 +0200
parents 8728ae882b6a
children 8dbfd0cb534b
files ui/administratorwindow.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ui/administratorwindow.cpp	Thu May 22 18:29:14 2014 +0200
+++ b/ui/administratorwindow.cpp	Fri May 23 10:24:51 2014 +0200
@@ -142,6 +142,9 @@
     QString lastCertFile = mSettings.value("LastCertList", QDir::homePath()).toString();
     QString certFile = QFileDialog::getOpenFileName(
         this, tr("Select certificate list file"), lastCertFile, "*.txt");
+    if (certFile.isNull()) {
+        return;
+    }
     mCertList.readList(certFile.toLocal8Bit().constData());
     if (!mCertList.isValid()) {
         QMessageBox::warning(this, tr("Error!"), tr("Failed to load the certificate list."));

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