-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdatechecker.h
More file actions
35 lines (27 loc) · 836 Bytes
/
updatechecker.h
File metadata and controls
35 lines (27 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef UPDATECHECKER_H
#define UPDATECHECKER_H
#include <QNetworkAccessManager>
#include <QVersionNumber>
#include <QNetworkReply>
#include <QObject>
#include <QString>
class UpdateChecker : public QObject
{
Q_OBJECT
public:
explicit UpdateChecker(QObject *parent = nullptr);
~UpdateChecker();
void checkForUpdates(const QString ¤tVersion);
signals:
void updateAvailable(const QString &newVersion, const QString &releaseNotesUrl);
void noUpdateAvailable();
void checkFailed(const QString &error);
private slots:
void onVersionCheckFinished();
private:
QNetworkAccessManager *m_networkManager;
QString m_currentVersion;
// points to my repository
const QString UPDATE_CHECK_URL = "https://repo.polimorph.dev/PhoneAudioLink/latest-version.json";
};
#endif // UPDATECHECKER_H