From 5f755a7c97bbbf70d8e488df2e76b3a1603b6d19 Mon Sep 17 00:00:00 2001 From: Martchus Date: Mon, 6 Jan 2025 16:33:29 +0100 Subject: [PATCH] Restore compatibility with Qt 5 --- syncthingconnector/syncthingconnectionmockhelpers.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncthingconnector/syncthingconnectionmockhelpers.cpp b/syncthingconnector/syncthingconnectionmockhelpers.cpp index 2d252d7a..84272eb7 100644 --- a/syncthingconnector/syncthingconnectionmockhelpers.cpp +++ b/syncthingconnector/syncthingconnectionmockhelpers.cpp @@ -222,7 +222,7 @@ MockedReply *MockedReply::forRequest(const QString &method, const QString &path, const auto minIndex = (page - 1) * perPage; const auto maxIndex = minIndex + perPage - 1; auto currentIndex = 0; - auto obj = QJsonDocument::fromJson(QByteArray(needed)).object(); + auto obj = QJsonDocument::fromJson(QByteArray(needed.data(), static_cast(needed.size()))).object(); auto keys = obj.keys(); auto filteredObj = QJsonObject(); for (const auto &key : keys) {