From 1df3f5b6df8341e961040fabd997a55a2b4e02f0 Mon Sep 17 00:00:00 2001 From: Hannah von Reth Date: Wed, 14 Aug 2019 14:59:41 +0200 Subject: [PATCH] NSISUpdater: Improve logging for version comparison --- src/gui/updater/ocupdater.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/gui/updater/ocupdater.cpp b/src/gui/updater/ocupdater.cpp index c48202b1d..36c812480 100644 --- a/src/gui/updater/ocupdater.cpp +++ b/src/gui/updater/ocupdater.cpp @@ -335,10 +335,16 @@ void NSISUpdater::versionInfoArrived(const UpdateInfo &info) qint64 infoVersion = Helper::stringVersionToInt(info.version()); qint64 seenVersion = Helper::stringVersionToInt(settings.value(seenVersionC).toString()); qint64 currVersion = Helper::currentVersionToInt(); - if (info.version().isEmpty() - || infoVersion <= currVersion - || infoVersion <= seenVersion) { + if (info.version().isEmpty()) + { + qCInfo(lcUpdater) << "No version information available at the moment"; + setDownloadState(UpToDate); + } else if (infoVersion <= currVersion + || infoVersion <= seenVersion) { qCInfo(lcUpdater) << "Client is on latest version!"; + qCInfo(lcUpdater) << "Your version:" << currVersion; + qCInfo(lcUpdater) << "Skipped version:" << seenVersion; + qCInfo(lcUpdater) << "Available version:" << infoVersion; setDownloadState(UpToDate); } else { QString url = info.downloadUrl(); -- 2.30.2