Fix "New update".
This commit is contained in:
parent
95ee6be7b6
commit
7bad9d1701
2 changed files with 3 additions and 3 deletions
|
@ -139,8 +139,8 @@ int main(int argc, char* argv[]) {
|
||||||
QObject::connect(qApp->system(), &SystemFactory::updatesChecked, [](QPair<QList<UpdateInfo>, QNetworkReply::NetworkError> updates) {
|
QObject::connect(qApp->system(), &SystemFactory::updatesChecked, [](QPair<QList<UpdateInfo>, QNetworkReply::NetworkError> updates) {
|
||||||
QObject::disconnect(qApp->system(), &SystemFactory::updatesChecked, nullptr, nullptr);
|
QObject::disconnect(qApp->system(), &SystemFactory::updatesChecked, nullptr, nullptr);
|
||||||
|
|
||||||
if (!updates.first.isEmpty() && updates.second == QNetworkReply::NoError &&
|
if (!updates.first.isEmpty() && updates.second == QNetworkReply::NoError &&
|
||||||
!SystemFactory::isVersionNewer(updates.first.at(0).m_availableVersion, APP_VERSION)) {
|
SystemFactory::isVersionNewer(updates.first.at(0).m_availableVersion, APP_VERSION)) {
|
||||||
qApp->showGuiMessage(QObject::tr("New version available"),
|
qApp->showGuiMessage(QObject::tr("New version available"),
|
||||||
QObject::tr("Click the bubble for more information."),
|
QObject::tr("Click the bubble for more information."),
|
||||||
QSystemTrayIcon::Information, qApp->mainForm(), false,
|
QSystemTrayIcon::Information, qApp->mainForm(), false,
|
||||||
|
|
|
@ -216,7 +216,7 @@ void SystemFactory::checkForUpdates() const {
|
||||||
|
|
||||||
emit updatesChecked(result);
|
emit updatesChecked(result);
|
||||||
downloader->deleteLater();
|
downloader->deleteLater();
|
||||||
});
|
});
|
||||||
downloader->downloadFile(RELEASES_LIST);
|
downloader->downloadFile(RELEASES_LIST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue