diff options
Diffstat (limited to 'logic/updater/UpdateChecker.cpp')
-rw-r--r-- | logic/updater/UpdateChecker.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/logic/updater/UpdateChecker.cpp b/logic/updater/UpdateChecker.cpp index d0795c0d..8a280dd1 100644 --- a/logic/updater/UpdateChecker.cpp +++ b/logic/updater/UpdateChecker.cpp @@ -17,13 +17,14 @@ #include "MultiMC.h" -#include "config.h" #include "logger/QsLog.h" #include <QJsonObject> #include <QJsonArray> #include <QJsonValue> +#include <settingsobject.h> + #define API_VERSION 0 #define CHANLIST_FORMAT 0 @@ -70,9 +71,8 @@ void UpdateChecker::checkForUpdate(bool notifyNoUpdate) m_updateChecking = true; - // Get the URL for the channel we're using. - // TODO: Allow user to select channels. For now, we'll just use the current channel. - QString updateChannel = m_currentChannel; + // Get the channel we're checking. + QString updateChannel = MMC->settings()->get("UpdateChannel").toString(); // Find the desired channel within the channel list and get its repo URL. If if cannot be // found, error. @@ -142,8 +142,6 @@ void UpdateChecker::updateCheckFinished(bool notifyNoUpdate) if (newestVersion.value("Id").toVariant().toInt() < version.value("Id").toVariant().toInt()) { - QLOG_DEBUG() << "Found newer version with ID" - << version.value("Id").toVariant().toInt(); newestVersion = version; } } @@ -153,6 +151,7 @@ void UpdateChecker::updateCheckFinished(bool notifyNoUpdate) int newBuildNumber = newestVersion.value("Id").toVariant().toInt(); if (newBuildNumber != MMC->version().build) { + QLOG_DEBUG() << "Found newer version with ID" << newBuildNumber; // Update! emit updateAvailable(m_repoUrl, newestVersion.value("Name").toVariant().toString(), newBuildNumber); @@ -262,3 +261,4 @@ void UpdateChecker::chanListDownloadFailed() QLOG_ERROR() << "Failed to download channel list."; emit channelListLoaded(); } + |