1 | #pragma once |
---|---|
2 | |
3 | #include <QObject> |
4 | |
5 | class QNetworkAccessManager; |
6 | class QProgressDialog; |
7 | |
8 | class GitQlientUpdater : public QObject |
9 | { |
10 | Q_OBJECT |
11 | signals: |
12 | void newVersionAvailable(); |
13 | |
14 | public: |
15 | explicit GitQlientUpdater(QObject *parent = nullptr); |
16 | ~GitQlientUpdater(); |
17 | |
18 | void checkNewGitQlientVersion(); |
19 | void showInfoMessage(); |
20 | |
21 | private: |
22 | QNetworkAccessManager *mManager = nullptr; |
23 | QProgressDialog *mDownloadLog = nullptr; |
24 | QString mLatestGitQlient; |
25 | QString mChangeLog; |
26 | QString mGitQlientDownloadUrl; |
27 | |
28 | void processUpdateFile(); |
29 | void processChangeLog(); |
30 | void downloadFile(); |
31 | }; |
32 |