From 93886156dd979767b6877b9e15ce5c62bc35be1f Mon Sep 17 00:00:00 2001 From: Petr Bena Date: Thu, 30 Oct 2014 05:01:15 -0400 Subject: [PATCH] resolved some API warnings --- huggle/apiquery.cpp | 5 +++++ huggle/apiquery.hpp | 1 + 2 files changed, 6 insertions(+) diff --git a/huggle/apiquery.cpp b/huggle/apiquery.cpp index e2c32ddeb..4a5145b45 100644 --- a/huggle/apiquery.cpp +++ b/huggle/apiquery.cpp @@ -33,6 +33,8 @@ void ApiQuery::ConstructUrl() } if (this->Parameters.length() > 0) this->URL += "&" + this->Parameters; + if (this->IsContinuous) + this->URL += "&rawcontinue=1"; switch (this->RequestFormat) { case XML: @@ -59,6 +61,8 @@ QString ApiQuery::ConstructParameterLessUrl() url = Configuration::GetProjectScriptURL(this->GetSite()) + "api.php?action=" + this->ActionPart; else url = Configuration::GetURLProtocolPrefix(this->GetSite()) + this->OverrideWiki + "api.php?action=" + this->ActionPart; + if (this->IsContinuous) + url += "&rawcontinue=1"; switch (this->RequestFormat) { case XML: @@ -214,6 +218,7 @@ void ApiQuery::SetAction(const Action action) return; case ActionQuery: this->ActionPart = "query"; + this->IsContinuous = true; this->EnforceLogin = false; return; case ActionLogin: diff --git a/huggle/apiquery.hpp b/huggle/apiquery.hpp index 61cc7a85a..9f9c4b738 100644 --- a/huggle/apiquery.hpp +++ b/huggle/apiquery.hpp @@ -85,6 +85,7 @@ namespace Huggle bool UsingPOST = false; //! This is a requested format in which the result should be written in Format RequestFormat; + bool IsContinuous = false; //! This is an url of api request, you probably don't want to change it unless //! you want to construct whole api request yourself QString URL = "";