summaryrefslogtreecommitdiffstats
path: root/src/corelib/compat
diff options
context:
space:
mode:
authorTatiana Borisova <tatiana.borisova@qt.io>2024-03-18 17:12:11 +0100
committerTatiana Borisova <tatiana.borisova@qt.io>2024-03-22 14:15:54 +0100
commite2bd247081e632236ee7d32bac90cd2018691dbb (patch)
tree80c82c03e394635da38873a87914b774c83a8cdf /src/corelib/compat
parent043ceca40ffda0a87871e1800578c99273916e60 (diff)
QJsonDocument: use new comparison helper macros
Replace public operators operator==(), operator!=() of QJsonDocument to friend methods comparesEqual(). Use QT_CORE_REMOVED_SINCE and removed_api.cpp to get rid of current comparison methods and replace them with a friend. Task-number: QTBUG-120300 Change-Id: I7b61765c34406b7a9fb7dd8b1fc554c87af6a3f3 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/compat')
-rw-r--r--src/corelib/compat/removed_api.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/compat/removed_api.cpp b/src/corelib/compat/removed_api.cpp
index 9b0dd81b30..3d597d3d90 100644
--- a/src/corelib/compat/removed_api.cpp
+++ b/src/corelib/compat/removed_api.cpp
@@ -971,6 +971,13 @@ bool QJsonArray::operator!=(const QJsonArray &other) const
return !comparesEqual(*this, other);
}
+#include "qjsondocument.h"
+
+bool QJsonDocument::operator==(const QJsonDocument &other) const
+{
+ return comparesEqual(*this, other);
+}
+
#if QT_CONFIG(processenvironment)
#include "qprocess.h" // inlined API