Fix JsonApiJob incorrect 'statuscode' parsing.

Signed-off-by: alex-z <blackslayer4@gmail.com>
This commit is contained in:
alex-z 2021-10-07 16:43:54 +03:00
parent c1dab7e4cb
commit 1b8448402a

View file

@ -901,7 +901,7 @@ bool JsonApiJob::finished()
qCWarning(lcJsonApiJob) << "Nothing changed so nothing to retrieve - status code: " << httpStatusCode;
statusCode = httpStatusCode;
} else {
QRegExp rex(R"("statuscode":(\d+),)");
QRegExp rex(R"("statuscode":(\d+))");
// example: "{"ocs":{"meta":{"status":"ok","statuscode":100,"message":null},"data":{"version":{"major":8,"minor":"... (504)
if (jsonStr.contains(rex)) {
statusCode = rex.cap(1).toInt();