diff options
author | Marc Mutz <marc.mutz@qt.io> | 2022-10-06 07:14:45 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2022-10-07 18:11:36 +0200 |
commit | dd562b36720b78caffe5c53bda4ed8449bf6fe06 (patch) | |
tree | d5a515a58da4c4065f583360a41a04cd82d21276 /tests/auto/widgets/kernel | |
parent | e08fa9cc01f11ce61258e0d9a138118bff3453c8 (diff) |
Replace qExchange with std::exchange
None of these users require C++20 constexpr or C++23 noexcept, the
only remaining difference between std::exchange and qExchange.
This leaves a single qExchange() user, in QScopedValueRollback, that
requires the constexpr version, only available from C++20, and thus
remains unported.
Task-number: QTBUG-99313
Change-Id: Iea46f6ed61d6bd8a5b2fd9d9ec4d70c980b443a2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/widgets/kernel')
-rw-r--r-- | tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index 2d8e267730..e6d46b16bf 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -5513,7 +5513,7 @@ public: } QObjectCastChecker(QObjectCastChecker &&other) noexcept - : m_target(qExchange(other.m_target, nullptr)) + : m_target(std::exchange(other.m_target, nullptr)) {} QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QObjectCastChecker) |