diff options
author | Tatiana Borisova <tatiana.borisova@qt.io> | 2024-04-19 14:43:25 +0200 |
---|---|---|
committer | Tatiana Borisova <tatiana.borisova@qt.io> | 2024-04-30 17:46:34 +0200 |
commit | 5dbd6a44d81d6eb062878fbc0d14c19464308d21 (patch) | |
tree | 0cf6e456a2aecc3b540b66fb41c2f38bf8778e35 /src/corelib/compat/removed_api.cpp | |
parent | 9ed9ef5502dd552ee6e2b69b8e2f93288be56fb8 (diff) |
QMimeType: use modernize comparisons
Replace class operators operator==(), operator!=() of
QMimeType 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: I9776e98c8a3b14d599733c91af61fbc12b1f0e57
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Diffstat (limited to 'src/corelib/compat/removed_api.cpp')
-rw-r--r-- | src/corelib/compat/removed_api.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/compat/removed_api.cpp b/src/corelib/compat/removed_api.cpp index 6101e71f79..7d3d3b5bd6 100644 --- a/src/corelib/compat/removed_api.cpp +++ b/src/corelib/compat/removed_api.cpp @@ -1006,6 +1006,13 @@ bool QJsonValue::operator!=(const QJsonValue &other) const return !comparesEqual(*this, other); } +#include "qmimetype.h" + +bool QMimeType::operator==(const QMimeType &other) const +{ + return comparesEqual(*this, other); +} + #include "qobject.h" int QObject::startTimer(std::chrono::milliseconds time, Qt::TimerType timerType) |