Updater: show the human readable version in the settings
authorOlivier Goffart <ogoffart@woboq.com>
Tue, 4 Dec 2018 14:21:49 +0000 (15:21 +0100)
committerCamila (Rebase PR Action) <hello@camila.codes>
Tue, 24 Nov 2020 18:22:33 +0000 (18:22 +0000)
The xml looks like this:

   <version>2.5.0.328</version>
   <versionstring>ownCloud Client 2.5.0 alpha1 (build 238)</versionstring>

And we should show the version string

Issue #6602

src/gui/updater/ocupdater.cpp

index fa1ed9b66eaf08e10d2ddf1f7e85d89eeba96459..40748c382b8c7a52a8d9b371443eaaa176e87431 100644 (file)
@@ -141,19 +141,19 @@ void OCUpdater::backgroundCheckForUpdate()
 
 QString OCUpdater::statusString() const
 {
-    QString updateVersion = _updateInfo.version();
+    QString updateVersion = _updateInfo.versionString();
 
     switch (downloadState()) {
     case Downloading:
-        return tr("Downloading version %1. Please wait …").arg(updateVersion);
+        return tr("Downloading %1. Please wait …").arg(updateVersion);
     case DownloadComplete:
-        return tr("%1 version %2 available. Restart application to start the update.").arg(Theme::instance()->appNameGUI(), updateVersion);
+        return tr("%1 available. Restart application to start the update.").arg(Theme::instance()->appNameGUI(), updateVersion);
     case DownloadFailed:
         return tr("Could not download update. Please click <a href='%1'>here</a> to download the update manually.").arg(_updateInfo.web());
     case DownloadTimedOut:
         return tr("Could not check for new updates.");
     case UpdateOnlyAvailableThroughSystem:
-        return tr("New %1 version %2 is available. Please click <a href='%3'>here</a> to download the update.").arg(Theme::instance()->appNameGUI(), updateVersion, _updateInfo.web());
+        return tr("New %1 is available. Please click <a href='%2'>here</a> to download the update.").arg(updateVersion, _updateInfo.web());
     case CheckingServer:
         return tr("Checking update server …");
     case Unknown: