From 752992760b5b0e6e09037fe0f03ca212ffc2c05c Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sat, 12 May 2018 19:50:22 +0200 Subject: [PATCH] Fix windows-specific compilation error --- src/providers/twitch/twitchaccount.cpp | 6 +++--- src/util/networkrequest.hpp | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/providers/twitch/twitchaccount.cpp b/src/providers/twitch/twitchaccount.cpp index f87aa0e08..9a0788496 100644 --- a/src/providers/twitch/twitchaccount.cpp +++ b/src/providers/twitch/twitchaccount.cpp @@ -77,7 +77,7 @@ void TwitchAccount::loadIgnores() QString url("https://api.twitch.tv/kraken/users/" + this->getUserId() + "/blocks"); util::NetworkRequest req(url); - req.setRequestType(util::NetworkRequest::GET); + req.setRequestType(util::NetworkRequest::GetRequest); req.setCaller(QThread::currentThread()); req.makeAuthorizedV5(this->getOAuthClient(), this->getOAuthToken()); req.onSuccess([=](const rapidjson::Document &document) { @@ -125,7 +125,7 @@ void TwitchAccount::ignore(const QString &targetName, targetUserID); util::NetworkRequest req(url); - req.setRequestType(util::NetworkRequest::PUT); + req.setRequestType(util::NetworkRequest::PutRequest); req.setCaller(QThread::currentThread()); req.makeAuthorizedV5(this->getOAuthClient(), this->getOAuthToken()); @@ -177,7 +177,7 @@ void TwitchAccount::unignore(const QString &targetName, targetUserID); util::NetworkRequest req(url); - req.setRequestType(util::NetworkRequest::DELETE); + req.setRequestType(util::NetworkRequest::DeleteRequest); req.setCaller(QThread::currentThread()); req.makeAuthorizedV5(this->getOAuthClient(), this->getOAuthToken()); diff --git a/src/util/networkrequest.hpp b/src/util/networkrequest.hpp index aac4276e1..2c9b158e5 100644 --- a/src/util/networkrequest.hpp +++ b/src/util/networkrequest.hpp @@ -64,10 +64,10 @@ class NetworkRequest { public: enum RequestType { - GET, - POST, - PUT, - DELETE, + GetRequest, + PostRequest, + PutRequest, + DeleteRequest, }; private: @@ -302,16 +302,16 @@ public: void execute() { switch (this->data.requestType) { - case GET: { + case GetRequest: { this->executeGet(); } break; - case PUT: { + case PutRequest: { debug::Log("Call PUT request!"); this->executePut(); } break; - case DELETE: { + case DeleteRequest: { debug::Log("Call DELETE request!"); this->executeDelete(); } break; @@ -394,15 +394,15 @@ private: [timer, data = std::move(this->data), worker]() { QNetworkReply *reply; switch (data.requestType) { - case GET: { + case GetRequest: { reply = NetworkManager::NaM.get(data.request); } break; - case PUT: { + case PutRequest: { reply = NetworkManager::NaM.put(data.request, data.payload); } break; - case DELETE: { + case DeleteRequest: { reply = NetworkManager::NaM.deleteResource(data.request); } break; }