NSISUpdater: Improve logging for version comparison
authorHannah von Reth <hannah.vonreth@owncloud.com>
Wed, 14 Aug 2019 12:59:41 +0000 (14:59 +0200)
committerCamila (Rebase PR Action) <hello@camila.codes>
Tue, 24 Nov 2020 18:22:33 +0000 (18:22 +0000)
src/gui/updater/ocupdater.cpp

index c48202b1d9c2d3d4d624c88665316828034d0de2..36c81248051afe8feb901319dce667651211287d 100644 (file)
@@ -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();