changeset 447:b1b14daf2116

Save the select state of certificate items when closing the app.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 23 Apr 2014 11:56:37 +0200
parents 43090637d6ae
children 5b4ce22186e9
files ui/mainwindow.cpp ui/mainwindow.h
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ui/mainwindow.cpp	Wed Apr 23 11:55:28 2014 +0200
+++ b/ui/mainwindow.cpp	Wed Apr 23 11:56:37 2014 +0200
@@ -270,7 +270,7 @@
     connect(status, SIGNAL(triggered()), this, SLOT(showStatus()));
     connect(help, SIGNAL(triggered()), this, SLOT(showHelp()));
     connect(about, SIGNAL(triggered()), this, SLOT(showAbout()));
-    connect(quit, SIGNAL(triggered()), qApp, SLOT(quit()));
+    connect(quit, SIGNAL(triggered()), this, SLOT(closeApp()));
     setMenuBar(mMenuBar);
 }
 
@@ -330,7 +330,7 @@
     connect(installButton, SIGNAL(clicked()), this, SLOT(installCerts()));
     quitButton = new QPushButton(tr("Quit"));
     quitButton->setFixedHeight(20);
-    connect(quitButton, SIGNAL(clicked()), qApp, SLOT(quit()));
+    connect(quitButton, SIGNAL(clicked()), this, SLOT(closeApp()));
     bottomLayout->insertStretch(0, 10);
     bottomLayout->addWidget(installButton);
     bottomLayout->setAlignment(installButton, Qt::AlignBottom);
@@ -633,3 +633,9 @@
     mSettings.sync();
     return mSettings.status() == QSettings::NoError;
 }
+
+void MainWindow::closeApp()
+{
+    saveUnselectedCertificates();
+    qApp->quit();
+}
--- a/ui/mainwindow.h	Wed Apr 23 11:55:28 2014 +0200
+++ b/ui/mainwindow.h	Wed Apr 23 11:56:37 2014 +0200
@@ -100,6 +100,8 @@
      */
     void loadUnselectedCertificates();
 
+    void closeApp();
+
 private:
     /** @brief check the integrity of available files.
      *

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