summaryrefslogtreecommitdiffstats
path: root/src/corelib/compat
diff options
context:
space:
mode:
authorTatiana Borisova <tatiana.borisova@qt.io>2024-04-19 15:20:05 +0200
committerTatiana Borisova <tatiana.borisova@qt.io>2024-05-06 16:01:28 +0200
commit7b738ffc583a19138d9772d7ed84c8d771c85a77 (patch)
treef4e7cb60eb5b7d695e7d3d16bfeca2a9b48f28ef /src/corelib/compat
parenta074dd561624c94a9f0dce3061529fe0dac9d452 (diff)
QRegularExpression: use modernize comparisons
Replace class operators operator==(), operator!=() of QRegularExpression to friend method comparesEqual() and Q_DECLARE_EQUALITY_COMPARABLE macro. 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-120304 Change-Id: Ib6fc83d29ad9bc710c2fdf32a3d60131fbf298b6 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'src/corelib/compat')
-rw-r--r--src/corelib/compat/removed_api.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/compat/removed_api.cpp b/src/corelib/compat/removed_api.cpp
index 23679bf4cc..ed285dc8f1 100644
--- a/src/corelib/compat/removed_api.cpp
+++ b/src/corelib/compat/removed_api.cpp
@@ -1069,6 +1069,11 @@ qsizetype QRegularExpressionMatch::capturedEnd(QStringView name) const
{
return capturedEnd(QAnyStringView(name));
}
+
+bool QRegularExpression::operator==(const QRegularExpression &other) const
+{
+ return comparesEqual(*this, other);
+}
#endif // QT_CONFIG(regularexpression)
#include "qstring.h" // inlined API