From 1293a36613c6f93e612784b3a2861c69581c3ffb Mon Sep 17 00:00:00 2001 From: Martchus Date: Mon, 8 Apr 2024 14:17:04 +0200 Subject: [PATCH] Fix compilation with Qt 5 --- syncthingconnector/syncthingconnection_requests.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/syncthingconnector/syncthingconnection_requests.cpp b/syncthingconnector/syncthingconnection_requests.cpp index 6a068ad..3ee0b59 100644 --- a/syncthingconnector/syncthingconnection_requests.cpp +++ b/syncthingconnector/syncthingconnection_requests.cpp @@ -1621,7 +1621,13 @@ static void readSyncthingItems(const QJsonArray &array, std::vector(jsonItemObj.value(QLatin1String("size")).toInteger()); + item.size = static_cast(jsonItemObj.value(QLatin1String("size")) +#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) + .toInteger() +#else + .toDouble() +#endif + ); item.index = index; item.level = level; if (type == QLatin1String("FILE_INFO_TYPE_FILE")) {