Manager: Fix the status bar update message showing even on latest builds
Also fix translations and show an error message if the check fails
This commit is contained in:
@@ -775,16 +775,18 @@ void
|
||||
VMManagerMain::backgroundUpdateCheckComplete(const UpdateCheck::UpdateResult &result)
|
||||
{
|
||||
qDebug() << "Check complete: update available?" << result.updateAvailable;
|
||||
auto type = result.channel == UpdateCheck::UpdateChannel::CI ? tr("Build") : tr("Version");
|
||||
const auto updateMessage = QString("%1: %2 %3").arg( tr("An update to 86Box is available"), type, result.latestVersion);
|
||||
emit updateStatusLeft(updateMessage);
|
||||
if (result.updateAvailable) {
|
||||
auto type = result.channel == UpdateCheck::UpdateChannel::CI ? tr("Build") : tr("Version");
|
||||
const auto updateMessage = QString("%1: %2 %3").arg( tr("An update to 86Box is available"), type, result.latestVersion);
|
||||
emit updateStatusLeft(updateMessage);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
VMManagerMain::backgroundUpdateCheckError(const QString &errorMsg)
|
||||
{
|
||||
qDebug() << "Update check failed with the following error:" << errorMsg;
|
||||
// TODO: Update the status bar
|
||||
emit updateStatusLeft(tr("An error has occurred while checking for updates: %1").arg(errorMsg));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user