From 169ae6ed1f70ce9d112a0a24ca7c8584439b9c40 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 12 Nov 2020 13:10:45 +0100 Subject: [PATCH] proper null json value --- .../services/owncloud/network/owncloudnetworkfactory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librssguard/services/owncloud/network/owncloudnetworkfactory.cpp b/src/librssguard/services/owncloud/network/owncloudnetworkfactory.cpp index 1c09c200d..536f939e8 100644 --- a/src/librssguard/services/owncloud/network/owncloudnetworkfactory.cpp +++ b/src/librssguard/services/owncloud/network/owncloudnetworkfactory.cpp @@ -188,7 +188,7 @@ bool OwnCloudNetworkFactory::createFeed(const QString& url, int parent_id) { auto nextcloud_version = status().version(); if (SystemFactory::isVersionEqualOrNewer(nextcloud_version, QSL("15.1.0"))) { - json["folderId"] = parent_id == 0 ? QJsonValue::Null : parent_id; + json["folderId"] = parent_id == 0 ? QJsonValue(QJsonValue::Type::Null) : parent_id; } else { json["folderId"] = parent_id; @@ -534,7 +534,7 @@ RootItem* OwnCloudGetFeedsCategoriesResponse::feedsCategories(bool obtain_icons) // NOTE: Starting with News 15.1.0, top-level feeds do not have parent folder ID 0, but JSON "null". // Luckily, if folder ID is not convertible to int, then default 0 value is returned. - cats.value(QString::number(item["folderId"].toInt()))->appendChild(feed); + cats.value(QString::number(item["folderId"].toInt(0)))->appendChild(feed); qDebugNN << LOGSEC_NEXTCLOUD << "Custom ID of next fetched processed feed is" << QUOTE_W_SPACE_DOT(feed->customId());