| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <string> |
| 7 |
|
| 8 |
#include <QThread> |
| 9 |
|
| 10 |
#include "UICommon/AutoUpdate.h" |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
class QWidget; |
| 15 |
|
| 16 |
class Updater : public QThread, public AutoUpdateChecker |
| 17 |
{ |
| 18 |
Q_OBJECT |
| 19 |
public: |
| 20 |
explicit Updater(QWidget* parent, std::string update_track, std::string hash_override); |
| 21 |
|
| 22 |
void run() override; |
| 23 |
void OnUpdateAvailable(const NewVersionInformation& info) override; |
| 24 |
void CheckForUpdate(); |
| 25 |
|
| 26 |
private: |
| 27 |
QWidget* m_parent; |
| 28 |
std::string m_update_track; |
| 29 |
std::string m_hash_override; |
| 30 |
}; |