fix - update version notification logic

This commit is contained in:
Yuriy Puchkov
2020-12-18 14:55:45 +02:00
parent 57771d31e5
commit aee8a55292

View File

@@ -159,8 +159,9 @@ void Controller::handleReplyCheckUpdates(QNetworkReply* reply)
QJsonDocument response = QJsonDocument::fromJson(reply->readAll());
QJsonObject json = response.object();
m_appLatestVersion = json["tag_name"].toString().replace("v", "");
if (m_appLatestVersion.compare(
QStringLiteral(APP_VERSION).replace("v", "")) < 0) {
if (QStringLiteral(APP_VERSION)
.replace("v", "")
.compare(m_appLatestVersion) < 0) {
m_appLatestUrl = json["html_url"].toString();
QString newVersion =
tr("New version %1 is available").arg(m_appLatestVersion);