tell user they might downgrade in update popup

This commit is contained in:
fourtf
2019-10-07 19:53:46 +02:00
parent 594c0fb255
commit 0ada53a3c1
3 changed files with 53 additions and 3 deletions
+11 -3
View File
@@ -50,9 +50,17 @@ void UpdateDialog::updateStatusChanged(Updates::Status status)
{
case Updates::UpdateAvailable: {
this->ui_.label->setText(
QString("An update (%1) is available.\n\nDo you want to "
"download and install it?")
.arg(Updates::getInstance().getOnlineVersion()));
(Updates::getInstance().isDowngrade()
? QString(
"The version online (%1) seems to be lower than the "
"current (%2).\nEither a version was reverted or "
"you are running a newer build.\n\nDo you want to "
"download and install it?")
.arg(Updates::getInstance().getOnlineVersion(),
Updates::getInstance().getCurrentVersion())
: QString("An update (%1) is available.\n\nDo you want to "
"download and install it?")
.arg(Updates::getInstance().getOnlineVersion())));
this->updateGeometry();
}
break;