[PATCH 1 of 2] (issue 27)Only close if no new list is available
Wald Commits
scm-commit at wald.intevation.org
Tue Jul 1 15:44:53 CEST 2014
# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1404222030 -7200
# Node ID e4abb41484a068f17c5ceb27f8f4a5643572ee87
# Parent 6df31cb47d544dfa35b1cec1c8985d1c65c6b624
(issue 27)Only close if no new list is available
diff -r 6df31cb47d54 -r e4abb41484a0 ui/mainwindow.cpp
--- a/ui/mainwindow.cpp Tue Jul 01 14:37:45 2014 +0200
+++ b/ui/mainwindow.cpp Tue Jul 01 15:40:30 2014 +0200
@@ -1134,3 +1134,13 @@
mUpdatesWidget->resize(old.width(), old.height() - mUpdatesManual->height());
}
}
+
+void MainWindow::closeEvent(QCloseEvent *event)
+{
+ if (getState() == NewListAvailable) {
+ /* Only minimize to tray if there is a new list */
+ QMainWindow::closeEvent(event);
+ return;
+ }
+ return closeApp();
+}
diff -r 6df31cb47d54 -r e4abb41484a0 ui/mainwindow.h
--- a/ui/mainwindow.h Tue Jul 01 14:37:45 2014 +0200
+++ b/ui/mainwindow.h Tue Jul 01 15:40:30 2014 +0200
@@ -130,7 +130,7 @@
void loadUnselectedCertificates();
protected:
- virtual void closeEvent(QCloseEvent *event) {return closeApp();}
+ virtual void closeEvent(QCloseEvent *event);
protected slots:
/** @brief cleanup and close the main window
More information about the Trustbridge-commits
mailing list