Mercurial > trustbridge
changeset 1256:8ceaa189570d
(issue44) also accept that an update happened if the current version is newer
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Fri, 26 Sep 2014 11:31:12 +0200 (2014-09-26) |
parents | 2a1aa9df8f11 |
children | 8bfbfd4ea568 |
files | ui/mainwindow.cpp |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/ui/mainwindow.cpp Thu Sep 25 17:58:12 2014 +0200 +++ b/ui/mainwindow.cpp Fri Sep 26 11:31:12 2014 +0200 @@ -514,12 +514,12 @@ QDateTime swAvailableLastMod = mSettings.value("Software/availableDate").toDateTime(); - if (swAvailableLastMod.isValid()) { - qDebug() << "Installed an update: " << swInstalledLastMod << - " available " << swAvailableLastMod; - syslog_info_printf ("Software has been updated to version: %s\n", + if (swAvailableLastMod.isValid() && swInstalledLastMod.isValid()) { + if (swInstalledLastMod >= swAvailableLastMod) { + qDebug() << "Installed an update: " << swInstalledLastMod << + " available " << swAvailableLastMod; + syslog_info_printf ("Software has been updated to version: %s\n", QApplication::applicationVersion().toUtf8().constData()); - if (swInstalledLastMod == swAvailableLastMod) { QString fileName = mSettings.value("Software/available").toString(); if (fileName.isEmpty()) { qDebug() << "Software marked as available but no filename set.";