[PATCH 3 of 4] Save the select state of certificate items when closing the app
Wald Commits
scm-commit at wald.intevation.org
Wed Apr 23 11:57:43 CEST 2014
# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1398246997 -7200
# Node ID b1b14daf2116b3c93e65d9b268c1973a252376ee
# Parent 43090637d6aed245d3799f08f0c537fbf70c8779
Save the select state of certificate items when closing the app.
diff -r 43090637d6ae -r b1b14daf2116 ui/mainwindow.cpp
--- 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();
+}
diff -r 43090637d6ae -r b1b14daf2116 ui/mainwindow.h
--- 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.
*
More information about the Trustbridge-commits
mailing list