diff --git a/app/backend/autoupdatechecker.cpp b/app/backend/autoupdatechecker.cpp index 5b3455b6..aaa0fcbb 100644 --- a/app/backend/autoupdatechecker.cpp +++ b/app/backend/autoupdatechecker.cpp @@ -116,7 +116,8 @@ void AutoUpdateChecker::handleUpdateCheckRequestFinished(QNetworkReply* reply) if (currentVer < latestVer) { qDebug() << "Update available"; - emit onUpdateAvailable(updateObj["browser_url"].toString()); + emit onUpdateAvailable(updateObj["version"].toString(), + updateObj["browser_url"].toString()); return; } else if (currentVer > latestVer) { diff --git a/app/backend/autoupdatechecker.h b/app/backend/autoupdatechecker.h index 26cdd8dd..97759b95 100644 --- a/app/backend/autoupdatechecker.h +++ b/app/backend/autoupdatechecker.h @@ -12,7 +12,7 @@ public: Q_INVOKABLE void start(); signals: - void onUpdateAvailable(QString url); + void onUpdateAvailable(QString newVersion, QString url); private slots: void handleUpdateCheckRequestFinished(QNetworkReply* reply); diff --git a/app/gui/main.qml b/app/gui/main.qml index df1367cc..dd766bff 100644 --- a/app/gui/main.qml +++ b/app/gui/main.qml @@ -235,7 +235,6 @@ ApplicationWindow { ToolTip.delay: 1000 ToolTip.timeout: 3000 ToolTip.visible: hovered - ToolTip.text: "Update available for Moonlight" // Invisible until we get a callback notifying us that // an update is available @@ -243,8 +242,9 @@ ApplicationWindow { onClicked: Qt.openUrlExternally(browserUrl); - function updateAvailable(url) + function updateAvailable(version, url) { + ToolTip.text = "Update available for Moonlight: Version " + version updateButton.browserUrl = url updateButton.visible = true }