-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathupdatewidget.h
47 lines (37 loc) · 1.07 KB
/
updatewidget.h
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
36
37
38
39
40
41
42
43
44
45
46
47
#ifndef UPDATEWIDGET_H
#define UPDATEWIDGET_H
#include <QtCore>
#include <QtGui>
#include <QtNetwork>
class UpdateWidget : public QTextBrowser {
Q_OBJECT
public:
UpdateWidget( QWidget *parent = 0 );
~UpdateWidget();
/*
protected:
void changeEvent(QEvent *e);
*/
public:
void checkUpdates( QWidget *parent, QString insteadBinary, bool automatically );
private:
QHttp *m_listServer;
QNetworkProxy *m_networkProxy;
QProgressDialog *m_listLoadProgress;
bool m_automatically;
QString localInsteadVersion;
QString localLauncherVersion;
QString remoteInsteadVersion;
QString remoteLauncherVersion;
QString urlInstead;
QString urlLauncher;
void refreshUpdateList( QString insteadBinary, bool automatically );
void parseUpdateList( QXmlStreamReader *xml );
void generateUpdateMessage();
QString detectInsteadVersion(QString insteadBinary);
int compareVersions( QString ver1, QString ver2 );
private slots:
void listServerDone( bool );
void anchorClickedSlot( const QUrl &link );
};
#endif // UPDATEWIDGET_H