mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2025-07-04 00:36:36 +00:00
Include version string in update tooltip
This commit is contained in:
parent
e75dce2543
commit
34aacc90d7
@ -116,7 +116,8 @@ void AutoUpdateChecker::handleUpdateCheckRequestFinished(QNetworkReply* reply)
|
|||||||
if (currentVer < latestVer) {
|
if (currentVer < latestVer) {
|
||||||
qDebug() << "Update available";
|
qDebug() << "Update available";
|
||||||
|
|
||||||
emit onUpdateAvailable(updateObj["browser_url"].toString());
|
emit onUpdateAvailable(updateObj["version"].toString(),
|
||||||
|
updateObj["browser_url"].toString());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (currentVer > latestVer) {
|
else if (currentVer > latestVer) {
|
||||||
|
@ -12,7 +12,7 @@ public:
|
|||||||
Q_INVOKABLE void start();
|
Q_INVOKABLE void start();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void onUpdateAvailable(QString url);
|
void onUpdateAvailable(QString newVersion, QString url);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void handleUpdateCheckRequestFinished(QNetworkReply* reply);
|
void handleUpdateCheckRequestFinished(QNetworkReply* reply);
|
||||||
|
@ -235,7 +235,6 @@ ApplicationWindow {
|
|||||||
ToolTip.delay: 1000
|
ToolTip.delay: 1000
|
||||||
ToolTip.timeout: 3000
|
ToolTip.timeout: 3000
|
||||||
ToolTip.visible: hovered
|
ToolTip.visible: hovered
|
||||||
ToolTip.text: "Update available for Moonlight"
|
|
||||||
|
|
||||||
// Invisible until we get a callback notifying us that
|
// Invisible until we get a callback notifying us that
|
||||||
// an update is available
|
// an update is available
|
||||||
@ -243,8 +242,9 @@ ApplicationWindow {
|
|||||||
|
|
||||||
onClicked: Qt.openUrlExternally(browserUrl);
|
onClicked: Qt.openUrlExternally(browserUrl);
|
||||||
|
|
||||||
function updateAvailable(url)
|
function updateAvailable(version, url)
|
||||||
{
|
{
|
||||||
|
ToolTip.text = "Update available for Moonlight: Version " + version
|
||||||
updateButton.browserUrl = url
|
updateButton.browserUrl = url
|
||||||
updateButton.visible = true
|
updateButton.visible = true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user