mirror of
https://github.com/YACReader/yacreader
synced 2025-07-22 23:15:14 -04:00
first version saving some info from comic vine
This commit is contained in:
@ -23,6 +23,11 @@ void HttpWorker::get()
|
||||
this->start();
|
||||
}
|
||||
|
||||
QByteArray HttpWorker::getResult()
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
void HttpWorker::run()
|
||||
{
|
||||
QNetworkAccessManager manager;
|
||||
@ -39,9 +44,10 @@ void HttpWorker::run()
|
||||
|
||||
if(tT.isActive()){
|
||||
// download complete
|
||||
emit dataReady(reply->readAll());
|
||||
result = reply->readAll();
|
||||
emit dataReady(result);
|
||||
tT.stop();
|
||||
} else {
|
||||
emit timeout();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,11 +14,12 @@
|
||||
HttpWorker(const QString & urlString);
|
||||
public slots:
|
||||
void get();
|
||||
QByteArray getResult();
|
||||
private:
|
||||
void run();
|
||||
QUrl url;
|
||||
int httpGetId;
|
||||
QByteArray content;
|
||||
QByteArray result;
|
||||
signals:
|
||||
void dataReady(const QByteArray &);
|
||||
void timeout();
|
||||
|
Reference in New Issue
Block a user