summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-10-06 07:07:55 +0200
committerMarc Mutz <marc.mutz@qt.io>2022-10-06 10:14:19 +0200
commit6f96f90b968f342f73e8fb5e79420047a0ba296c (patch)
tree02c1208a0d5ae935d5bdf8f98a61229b83004655 /src
parent6f3fc9da651a2de2e345e9719ce83a639d40464d (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. Task-number: QTBUG-99313 Change-Id: Ic5a0bd36d715af2cbc5f9936fdff665ee6eeea4e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: David Edmundson <davidedmundson@kde.org>
Diffstat (limited to 'src')
-rw-r--r--src/client/qwaylanddisplay.cpp4
-rw-r--r--src/compositor/compositor_api/qwaylandcompositor.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index 2d82f447a..275a4a144 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -345,9 +345,9 @@ QWaylandDisplay::~QWaylandDisplay(void)
if (mSyncCallback)
wl_callback_destroy(mSyncCallback);
- qDeleteAll(qExchange(mInputDevices, {}));
+ qDeleteAll(std::exchange(mInputDevices, {}));
- for (QWaylandScreen *screen : qExchange(mScreens, {})) {
+ for (QWaylandScreen *screen : std::exchange(mScreens, {})) {
QWindowSystemInterface::handleScreenRemoved(screen);
}
qDeleteAll(mWaitingScreens);
diff --git a/src/compositor/compositor_api/qwaylandcompositor.cpp b/src/compositor/compositor_api/qwaylandcompositor.cpp
index 66f5eba4a..26328342f 100644
--- a/src/compositor/compositor_api/qwaylandcompositor.cpp
+++ b/src/compositor/compositor_api/qwaylandcompositor.cpp
@@ -213,7 +213,7 @@ void QWaylandCompositorPrivate::init()
initialized = true;
- for (const QPointer<QObject> &object : qExchange(polish_objects, {})) {
+ for (const QPointer<QObject> &object : std::exchange(polish_objects, {})) {
if (object) {
QEvent polishEvent(QEvent::Polish);
QCoreApplication::sendEvent(object.data(), &polishEvent);