mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
30 lines
673 B
C++
30 lines
673 B
C++
#ifndef __CHECKUPDATE_H
|
|
#define __CHECKUPDATE_H
|
|
|
|
#include <QWidget>
|
|
#include <QHttp>
|
|
#include <QHttpResponseHeader>
|
|
#include <QByteArray>
|
|
|
|
class HttpVersionChecker : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
HttpVersionChecker();
|
|
bool thereIsNewVersion();
|
|
public slots:
|
|
void httpRequestFinished(int requestId, bool error);
|
|
void readResponseHeader(const QHttpResponseHeader &);
|
|
void read(const QHttpResponseHeader &);
|
|
void get();
|
|
private:
|
|
QHttp *http;
|
|
int httpGetId;
|
|
QByteArray content;
|
|
bool found;
|
|
signals:
|
|
void newVersionDetected();
|
|
};
|
|
|
|
#endif
|