mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Merge pull request #11018 from Dentomologist/add_updater_error_messages
Add updater error messages
This commit is contained in:
@ -558,12 +558,7 @@ void MenuBar::InstallUpdateManually()
|
||||
auto* const updater = new Updater(this->parentWidget(), manual_track,
|
||||
Config::Get(Config::MAIN_AUTOUPDATE_HASH_OVERRIDE));
|
||||
|
||||
if (!updater->CheckForUpdate())
|
||||
{
|
||||
ModalMessageBox::information(
|
||||
this, tr("Update"),
|
||||
tr("You are running the latest version available on this update track."));
|
||||
}
|
||||
updater->CheckForUpdate();
|
||||
}
|
||||
|
||||
void MenuBar::AddHelpMenu()
|
||||
|
@ -29,21 +29,19 @@ Updater::Updater(QWidget* parent, std::string update_track, std::string hash_ove
|
||||
|
||||
void Updater::run()
|
||||
{
|
||||
AutoUpdateChecker::CheckForUpdate(m_update_track, m_hash_override);
|
||||
AutoUpdateChecker::CheckForUpdate(m_update_track, m_hash_override,
|
||||
AutoUpdateChecker::CheckType::Automatic);
|
||||
}
|
||||
|
||||
bool Updater::CheckForUpdate()
|
||||
void Updater::CheckForUpdate()
|
||||
{
|
||||
m_update_available = false;
|
||||
AutoUpdateChecker::CheckForUpdate(m_update_track, m_hash_override);
|
||||
|
||||
return m_update_available;
|
||||
AutoUpdateChecker::CheckForUpdate(m_update_track, m_hash_override,
|
||||
AutoUpdateChecker::CheckType::Manual);
|
||||
}
|
||||
|
||||
void Updater::OnUpdateAvailable(const NewVersionInformation& info)
|
||||
{
|
||||
bool later = false;
|
||||
m_update_available = true;
|
||||
|
||||
std::optional<int> choice = RunOnObject(m_parent, [&] {
|
||||
QDialog* dialog = new QDialog(m_parent);
|
||||
|
@ -21,11 +21,10 @@ public:
|
||||
|
||||
void run() override;
|
||||
void OnUpdateAvailable(const NewVersionInformation& info) override;
|
||||
bool CheckForUpdate();
|
||||
void CheckForUpdate();
|
||||
|
||||
private:
|
||||
QWidget* m_parent;
|
||||
std::string m_update_track;
|
||||
std::string m_hash_override;
|
||||
bool m_update_available = false;
|
||||
};
|
||||
|
Reference in New Issue
Block a user