From 76d068101f5123cd76f6c1ec7d2bd90b7762c3f6 Mon Sep 17 00:00:00 2001 From: Boris Pek Date: Sun, 6 Oct 2024 23:20:07 +0300 Subject: [PATCH] Current version of Psi+ is 1.5.2054 It is based on: * psi: ce742e62 * plugins: 347230b * psimedia: 478567e * resources: fc4cfc1 --- src/serverlistquerier.cpp | 11 +++-------- src/serverlistquerier.h | 2 ++ version | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/serverlistquerier.cpp b/src/serverlistquerier.cpp index 9ba5904a..41b2b3ea 100644 --- a/src/serverlistquerier.cpp +++ b/src/serverlistquerier.cpp @@ -117,17 +117,12 @@ std::optional ServerListQuerier::parseJson(const QByteArray &data) QJsonObject providerObj = providerValue.toObject(); auto jidIt = providerObj.find("jid"); - if (jidIt == providerObj.end() || !jidIt->isString()) { + QString jid; + if (jidIt == providerObj.end() || !jidIt->isString() || (jid = jidIt->toString()).isEmpty()) { parsingErrorOccurred = true; continue; // Skip if "jid" is not found or is not a string } - - QString jid = jidIt->toString(); - if (!jid.isEmpty()) { - jidList.append(jid); - } else { - parsingErrorOccurred = true; // Handle empty jid case - } + jidList.append(jid); } // Emit an error if the list is empty and there was a parsing error diff --git a/src/serverlistquerier.h b/src/serverlistquerier.h index 9d148200..fe2e2a4f 100644 --- a/src/serverlistquerier.h +++ b/src/serverlistquerier.h @@ -23,6 +23,8 @@ #include #include +#include + class QNetworkAccessManager; class ServerListQuerier : public QObject { diff --git a/version b/version index bff79f4b..47ddbd3a 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.5.2053 (2024-10-06, b8bf8dae) +1.5.2054 (2024-10-06, ce742e62)