diff options
| author | spycrab <spycrab@users.noreply.github.com> | 2018-03-22 12:20:15 +0100 |
|---|---|---|
| committer | spycrab <spycrab@users.noreply.github.com> | 2018-03-23 10:42:40 +0100 |
| commit | ee3d64145ce76022485bea61a0cad0ada88059fb (patch) | |
| tree | c547ce3883c3bc17e514485fef07ccf01646c061 /Source/Core/UICommon/AutoUpdate.cpp | |
| parent | 2e92d95888f90c14f5f91b1b12525ae019e85edb (diff) | |
Qt: Improve updater
Diffstat (limited to 'Source/Core/UICommon/AutoUpdate.cpp')
| -rw-r--r-- | Source/Core/UICommon/AutoUpdate.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/Source/Core/UICommon/AutoUpdate.cpp b/Source/Core/UICommon/AutoUpdate.cpp index 3313b706fd..dc094f29ac 100644 --- a/Source/Core/UICommon/AutoUpdate.cpp +++ b/Source/Core/UICommon/AutoUpdate.cpp @@ -20,15 +20,6 @@ namespace { -bool SystemSupportsAutoUpdates() -{ -#ifdef _WIN32 - return true; -#else - return false; -#endif -} - #ifdef _WIN32 const char UPDATER_FILENAME[] = "Updater.exe"; @@ -57,10 +48,19 @@ void CleanupFromPreviousUpdate() #endif } // namespace +bool AutoUpdateChecker::SystemSupportsAutoUpdates() +{ +#ifdef _WIN32 + return true; +#else + return false; +#endif +} + void AutoUpdateChecker::CheckForUpdate() { // Don't bother checking if updates are not supported or not enabled. - if (SConfig::GetInstance().m_auto_update_track.empty() || !SystemSupportsAutoUpdates()) + if (!SystemSupportsAutoUpdates() || SConfig::GetInstance().m_auto_update_track.empty()) return; #ifdef _WIN32 @@ -104,7 +104,10 @@ void AutoUpdateChecker::CheckForUpdate() nvi.content_store_url = obj["content-store"].get<std::string>(); nvi.new_shortrev = obj["new"].get<picojson::object>()["name"].get<std::string>(); nvi.new_hash = obj["new"].get<picojson::object>()["hash"].get<std::string>(); + // TODO: generate the HTML changelog from the JSON information. + nvi.changelog_html = "<h2>TBD</h2>"; + OnUpdateAvailable(nvi); } |
