diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2018-03-23 11:08:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-23 11:08:48 +0100 |
| commit | 773ec975f398d19b38b2cf6caf345bf9e80b902c (patch) | |
| tree | 42eaa662a42398f87a5d2a5d19136ca57222ca35 /Source/Core/UICommon/AutoUpdate.cpp | |
| parent | 71846a6daa3c510f96e08d631fb97546dc9719ca (diff) | |
| parent | ee3d64145ce76022485bea61a0cad0ada88059fb (diff) | |
Merge pull request #6489 from spycrab/qt_updater
Qt: Improve and better integrate 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); } |
