Refactor NetworkRequest class

Add followUser and unfollowUser methods to TwitchAccount
This commit is contained in:
Rasmus Karlsson
2018-07-07 11:08:57 +00:00
parent cada32edfd
commit 6a418e6e59
27 changed files with 835 additions and 669 deletions
+4 -1
View File
@@ -66,7 +66,8 @@ void Image::loadImage()
NetworkRequest req(this->getUrl());
req.setCaller(this);
req.setUseQuickLoadCache(true);
req.get([this](QByteArray bytes) -> bool {
req.onSuccess([this](auto result) -> bool {
auto bytes = result.getData();
QByteArray copy = QByteArray::fromRawData(bytes.constData(), bytes.length());
QBuffer buffer(&copy);
buffer.open(QIODevice::ReadOnly);
@@ -156,6 +157,8 @@ void Image::loadImage()
return true;
});
req.execute();
}
void Image::gifUpdateTimout()