summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/network/secureudpserver/server.cpp2
-rw-r--r--src/corelib/kernel/qcore_mac_p.h6
-rw-r--r--src/corelib/kernel/qwinregistry_p.h2
-rw-r--r--src/corelib/tools/qduplicatetracker_p.h4
-rw-r--r--src/corelib/tools/qshareddata.h2
-rw-r--r--src/corelib/tools/qshareddata_impl.h2
-rw-r--r--src/widgets/kernel/qwidgetrepaintmanager.cpp2
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp2
8 files changed, 11 insertions, 11 deletions
diff --git a/examples/network/secureudpserver/server.cpp b/examples/network/secureudpserver/server.cpp
index 3f39cbb739..8684c66c74 100644
--- a/examples/network/secureudpserver/server.cpp
+++ b/examples/network/secureudpserver/server.cpp
@@ -213,7 +213,7 @@ void DtlsServer::decryptDatagram(QDtls *connection, const QByteArray &clientMess
//! [14]
void DtlsServer::shutdown()
{
- for (const auto &connection : qExchange(knownClients, {}))
+ for (const auto &connection : std::exchange(knownClients, {}))
connection->shutdown(&serverSocket);
serverSocket.close();
diff --git a/src/corelib/kernel/qcore_mac_p.h b/src/corelib/kernel/qcore_mac_p.h
index ff909a3ff2..f9e7dbcdce 100644
--- a/src/corelib/kernel/qcore_mac_p.h
+++ b/src/corelib/kernel/qcore_mac_p.h
@@ -92,7 +92,7 @@ public:
QAppleRefCounted(QAppleRefCounted &&other)
noexcept(std::is_nothrow_move_assignable<T>::value &&
std::is_nothrow_move_constructible<T>::value)
- : value(qExchange(other.value, T())) {}
+ : value(std::exchange(other.value, T())) {}
QAppleRefCounted(const QAppleRefCounted &other) : value(other.value) { if (value) RetainFunction(value); }
~QAppleRefCounted() { if (value) ReleaseFunction(value); }
operator T() const { return value; }
@@ -258,7 +258,7 @@ public:
Q_DISABLE_COPY(QAppleLogActivity)
QAppleLogActivity(QAppleLogActivity &&other)
- : activity(qExchange(other.activity, nullptr)), state(other.state)
+ : activity(std::exchange(other.activity, nullptr)), state(other.state)
{
}
@@ -333,7 +333,7 @@ public:
QMacNotificationObserver(const QMacNotificationObserver &other) = delete;
QMacNotificationObserver(QMacNotificationObserver &&other)
- : observer(qExchange(other.observer, nullptr))
+ : observer(std::exchange(other.observer, nullptr))
{
}
diff --git a/src/corelib/kernel/qwinregistry_p.h b/src/corelib/kernel/qwinregistry_p.h
index 888f8e0ce5..0de1bfe0f5 100644
--- a/src/corelib/kernel/qwinregistry_p.h
+++ b/src/corelib/kernel/qwinregistry_p.h
@@ -34,7 +34,7 @@ public:
~QWinRegistryKey();
QWinRegistryKey(QWinRegistryKey &&other) noexcept
- : m_key(qExchange(other.m_key, nullptr)) {}
+ : m_key(std::exchange(other.m_key, nullptr)) {}
QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QWinRegistryKey)
void swap(QWinRegistryKey &other) noexcept { qSwap(m_key, other.m_key); }
diff --git a/src/corelib/tools/qduplicatetracker_p.h b/src/corelib/tools/qduplicatetracker_p.h
index 4d0e6e4777..950220184f 100644
--- a/src/corelib/tools/qduplicatetracker_p.h
+++ b/src/corelib/tools/qduplicatetracker_p.h
@@ -56,13 +56,13 @@ class QDuplicateTracker {
auto insert(const T &e) {
auto it = QSet<T>::insert(e);
const auto n = this->size();
- return std::pair{it, qExchange(setSize, n) != n};
+ return std::pair{it, std::exchange(setSize, n) != n};
}
auto insert(T &&e) {
auto it = QSet<T>::insert(std::move(e));
const auto n = this->size();
- return std::pair{it, qExchange(setSize, n) != n};
+ return std::pair{it, std::exchange(setSize, n) != n};
}
};
Set set{Prealloc};
diff --git a/src/corelib/tools/qshareddata.h b/src/corelib/tools/qshareddata.h
index 813e9d6c7a..826152b63a 100644
--- a/src/corelib/tools/qshareddata.h
+++ b/src/corelib/tools/qshareddata.h
@@ -49,7 +49,7 @@ public:
const T *data() const noexcept { return d; }
const T *get() const noexcept { return d; }
const T *constData() const noexcept { return d; }
- T *take() noexcept { return qExchange(d, nullptr); }
+ T *take() noexcept { return std::exchange(d, nullptr); }
QSharedDataPointer() noexcept : d(nullptr) { }
~QSharedDataPointer() { if (d && !d->ref.deref()) delete d; }
diff --git a/src/corelib/tools/qshareddata_impl.h b/src/corelib/tools/qshareddata_impl.h
index a0216397cc..e0b4695e36 100644
--- a/src/corelib/tools/qshareddata_impl.h
+++ b/src/corelib/tools/qshareddata_impl.h
@@ -92,7 +92,7 @@ public:
constexpr T *take() noexcept
{
- return qExchange(d, nullptr);
+ return std::exchange(d, nullptr);
}
bool isShared() const noexcept
diff --git a/src/widgets/kernel/qwidgetrepaintmanager.cpp b/src/widgets/kernel/qwidgetrepaintmanager.cpp
index 02a489c03d..effa91ca22 100644
--- a/src/widgets/kernel/qwidgetrepaintmanager.cpp
+++ b/src/widgets/kernel/qwidgetrepaintmanager.cpp
@@ -988,7 +988,7 @@ void QWidgetRepaintManager::flush()
if (!hasNeedsFlushWidgets)
return;
- for (QWidget *w : qExchange(needsFlushWidgets, {})) {
+ for (QWidget *w : std::exchange(needsFlushWidgets, {})) {
QWidgetPrivate *wd = w->d_func();
Q_ASSERT(wd->needsFlush);
QPlatformTextureList *widgetTexturesForNative = wd->textureChildSeen ? widgetTexturesFor(tlw, w) : nullptr;
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)