mirror of
https://github.com/YACReader/yacreader
synced 2025-07-19 05:24:57 -04:00
HttpWorker added, performs a http request in a background thread
ComicVineDialog, work in progress...
This commit is contained in:
29
common/http_worker.h
Normal file
29
common/http_worker.h
Normal file
@ -0,0 +1,29 @@
|
||||
#ifndef __HTTP_WORKER_H
|
||||
#define __HTTP_WORKER_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QHttp>
|
||||
#include <QHttpResponseHeader>
|
||||
#include <QByteArray>
|
||||
#include <QThread>
|
||||
#include <QUrl>
|
||||
#include "yacreader_global.h"
|
||||
|
||||
class HttpWorker : public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
HttpWorker(const QString & urlString);
|
||||
public slots:
|
||||
void get();
|
||||
private:
|
||||
void run();
|
||||
QUrl url;
|
||||
int httpGetId;
|
||||
QByteArray content;
|
||||
signals:
|
||||
void dataReady(const QByteArray &);
|
||||
void timeout();
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user