diff options
author | Petr Mrázek <peterix@gmail.com> | 2014-07-14 00:57:54 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-07-14 00:57:54 +0200 |
commit | 3821569363bdc13c59704c2f37c5de9fee5a21e2 (patch) | |
tree | c30fd938bf3f7076084916a1a0980115341445d6 /logic/updater/UpdateChecker.cpp | |
parent | d8d6f5929b1a0104b31d381a45799849c6d82636 (diff) | |
download | MultiMC-3821569363bdc13c59704c2f37c5de9fee5a21e2.tar MultiMC-3821569363bdc13c59704c2f37c5de9fee5a21e2.tar.gz MultiMC-3821569363bdc13c59704c2f37c5de9fee5a21e2.tar.lz MultiMC-3821569363bdc13c59704c2f37c5de9fee5a21e2.tar.xz MultiMC-3821569363bdc13c59704c2f37c5de9fee5a21e2.zip |
Show changelog even when there are no new updates available.
Diffstat (limited to 'logic/updater/UpdateChecker.cpp')
-rw-r--r-- | logic/updater/UpdateChecker.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/logic/updater/UpdateChecker.cpp b/logic/updater/UpdateChecker.cpp index c2895430..6669d333 100644 --- a/logic/updater/UpdateChecker.cpp +++ b/logic/updater/UpdateChecker.cpp @@ -59,7 +59,7 @@ void UpdateChecker::checkForUpdate(bool notifyNoUpdate) QLOG_DEBUG() << "Channel list isn't loaded yet. Loading channel list and deferring " "update check."; m_checkUpdateWaiting = true; - updateChanList(); + updateChanList(notifyNoUpdate); return; } @@ -170,7 +170,7 @@ void UpdateChecker::updateCheckFailed() QLOG_ERROR() << "Update check failed for reasons unknown."; } -void UpdateChecker::updateChanList() +void UpdateChecker::updateChanList(bool notifyNoUpdate) { QLOG_DEBUG() << "Loading the channel list."; @@ -185,13 +185,14 @@ void UpdateChecker::updateChanList() m_chanListLoading = true; NetJob *job = new NetJob("Update System Channel List"); job->addNetAction(ByteArrayDownload::make(QUrl(m_channelListUrl))); - QObject::connect(job, &NetJob::succeeded, this, &UpdateChecker::chanListDownloadFinished); + connect(job, &NetJob::succeeded, [this, notifyNoUpdate]() + { chanListDownloadFinished(notifyNoUpdate); }); QObject::connect(job, &NetJob::failed, this, &UpdateChecker::chanListDownloadFailed); chanListJob.reset(job); job->start(); } -void UpdateChecker::chanListDownloadFinished() +void UpdateChecker::chanListDownloadFinished(bool notifyNoUpdate) { QByteArray data; { @@ -250,7 +251,7 @@ void UpdateChecker::chanListDownloadFinished() // If we're waiting to check for updates, do that now. if (m_checkUpdateWaiting) - checkForUpdate(false); + checkForUpdate(notifyNoUpdate); emit channelListLoaded(); } |