mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2024-12-16 22:23:07 +00:00
26 lines
514 B
C
26 lines
514 B
C
|
#pragma once
|
||
|
|
||
|
#include <QObject>
|
||
|
#include <QNetworkAccessManager>
|
||
|
|
||
|
class AutoUpdateChecker : public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
explicit AutoUpdateChecker(QObject *parent = nullptr);
|
||
|
|
||
|
Q_INVOKABLE void start();
|
||
|
|
||
|
signals:
|
||
|
void onUpdateAvailable(QString url);
|
||
|
|
||
|
private slots:
|
||
|
void handleUpdateCheckRequestFinished(QNetworkReply* reply);
|
||
|
|
||
|
private:
|
||
|
void parseStringToVersionQuad(QString& string, QVector<int>& version);
|
||
|
|
||
|
QVector<int> m_CurrentVersionQuad;
|
||
|
QNetworkAccessManager m_Nam;
|
||
|
};
|