Config: Port AutoUpdate settings to new config system.

This commit is contained in:
Admiral H. Curtiss
2021-12-27 19:09:47 +01:00
parent 8d237eb102
commit 96fa0919be
13 changed files with 44 additions and 52 deletions

View File

@ -3,6 +3,8 @@
#include "DolphinQt/Updater.h"
#include <utility>
#include <QCheckBox>
#include <QDialog>
#include <QDialogButtonBox>
@ -18,20 +20,22 @@
// Refer to docs/autoupdate_overview.md for a detailed overview of the autoupdate process
Updater::Updater(QWidget* parent) : m_parent(parent)
Updater::Updater(QWidget* parent, std::string update_track, std::string hash_override)
: m_parent(parent), m_update_track(std::move(update_track)),
m_hash_override(std::move(hash_override))
{
connect(this, &QThread::finished, this, &QObject::deleteLater);
}
void Updater::run()
{
AutoUpdateChecker::CheckForUpdate();
AutoUpdateChecker::CheckForUpdate(m_update_track, m_hash_override);
}
bool Updater::CheckForUpdate()
{
m_update_available = false;
AutoUpdateChecker::CheckForUpdate();
AutoUpdateChecker::CheckForUpdate(m_update_track, m_hash_override);
return m_update_available;
}