[PATCH 3 of 3] Close the application if nothing new is available and in tray mode

Wald Commits scm-commit at wald.intevation.org
Thu Aug 28 11:26:57 CEST 2014


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1409217969 -7200
# Node ID 0a4f7235e7590bd6e26010aa5adbb6a61ff640af
# Parent  423e31ac656eab7a5ad56180a1e9e5d6737c2ca2
Close the application if nothing new is available and in tray mode.

diff -r 423e31ac656e -r 0a4f7235e759 ui/mainwindow.cpp
--- a/ui/mainwindow.cpp	Thu Aug 28 11:25:55 2014 +0200
+++ b/ui/mainwindow.cpp	Thu Aug 28 11:26:09 2014 +0200
@@ -1393,6 +1393,12 @@
         mLastUpdateCheck->show();
         syslog_info_printf(tr("Sucessfully checked for updates.").toUtf8().constData());
     }
+    if (getState() != NewSoftwareAvailable && getState() != NewListAvailable && mTrayMode) {
+        qDebug() << "Shutting down as no list or Software is available.";
+        closeApp();
+    } else {
+        mTrayIcon->show();
+    }
 }
 
 int MainWindow::changeCount()


More information about the Trustbridge-commits mailing list