summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2023-10-25 03:57:14 +0000
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2023-10-25 11:24:24 +0000
commit5628600a07295db6ed6683e97fafb0c45ddea505 (patch)
treeed94460633b419856bcadb1c32312a99d67e4421
parent993db5a12227b1e4067714ddc626d64a14474a54 (diff)
Revert "QWeakPointer: deprecate its relational operators"
This reverts commit bb23a05905d7dc0e416a646e40592436daa939f2. Reason for revert: this change resulted in a flood of build-breaking warnings in submodules that need to be cleaned up before we try again. Also, the discussion following this change shows that this needs more clarification of the implications and options. Until that is concluded, the status quo is acceptable. Change-Id: Id8f67ed585517935c31e29d48099b1c84b787b74 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
index 1da9a48b60..5dfc4614f9 100644
--- a/src/corelib/tools/qsharedpointer_impl.h
+++ b/src/corelib/tools/qsharedpointer_impl.h
@@ -652,36 +652,28 @@ public:
// std::weak_ptr compatibility:
[[nodiscard]] QSharedPointer<T> lock() const { return toStrongRef(); }
-#if QT_DEPRECATED_SINCE(6, 7)
template <class X>
- QT_DEPRECATED_VERSION_X_6_7("Comparison of QWeakPointers is inconsistent and may lead to crashes. lock() them and then compare the resulting QSharedPointers.")
bool operator==(const QWeakPointer<X> &o) const noexcept
{ return d == o.d && value == static_cast<const T *>(o.value); }
template <class X>
- QT_DEPRECATED_VERSION_X_6_7("Comparison of QWeakPointers is inconsistent and may lead to crashes. lock() them and then compare the resulting QSharedPointers.")
bool operator!=(const QWeakPointer<X> &o) const noexcept
{ return !(*this == o); }
template <class X>
- QT_DEPRECATED_VERSION_X_6_7("Comparison of QWeakPointers is inconsistent and may lead to crashes. lock() them and then compare the resulting QSharedPointers.")
bool operator==(const QSharedPointer<X> &o) const noexcept
{ return d == o.d; }
template <class X>
- QT_DEPRECATED_VERSION_X_6_7("Comparison of QWeakPointers is inconsistent and may lead to crashes. lock() them and then compare the resulting QSharedPointers.")
bool operator!=(const QSharedPointer<X> &o) const noexcept
{ return !(*this == o); }
template <typename X>
- QT_DEPRECATED_VERSION_X_6_7("Comparison of QWeakPointers is inconsistent and may lead to crashes. lock() them and then compare the resulting QSharedPointers.")
friend bool operator==(const QSharedPointer<X> &p1, const QWeakPointer &p2) noexcept
{ return p2 == p1; }
template <typename X>
- QT_DEPRECATED_VERSION_X_6_7("Comparison of QWeakPointers is inconsistent and may lead to crashes. lock() them and then compare the resulting QSharedPointers.")
friend bool operator!=(const QSharedPointer<X> &p1, const QWeakPointer &p2) noexcept
{ return p2 != p1; }
-#endif
friend bool operator==(const QWeakPointer &p, std::nullptr_t)
{ return p.isNull(); }