summaryrefslogtreecommitdiff
path: root/src/core/api/qwebenginescript.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-05-11 17:27:16 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-05-11 22:59:41 +0000
commit1bfd3fd5e2a9565944d14b5106e304dabb414be7 (patch)
tree5c9aab3e843ed28fe036b966892632a9ed032d2d /src/core/api/qwebenginescript.h
parent3eec341d1e4955f0a1faf7fffb480c023bde968f (diff)
downloadqtwebengine-1bfd3fd5e2a9565944d14b5106e304dabb414be7.tar.gz
QtWebEngine: replace qSwap with member-swap where possible
qSwap() is a monster that looks for ADL overloads of swap() and also detects the noexcept of the wrapped swap() function, so it should only be used when the argument type is unknown. In the vast majority of cases, the type is known to be efficiently std::swap()able or to have a member-swap. Call either of these. As a drive-by, unify all member-swap()s to be noexcept. Task-number: QTBUG-97601 Change-Id: I9184cab0ed74a1b32d62cf7c83dc1f1b7814c784 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 99b81083ccee7e1bd28749b1066599670713cefe) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/core/api/qwebenginescript.h')
-rw-r--r--src/core/api/qwebenginescript.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/api/qwebenginescript.h b/src/core/api/qwebenginescript.h
index a9b1bb869..4d2ecd2e5 100644
--- a/src/core/api/qwebenginescript.h
+++ b/src/core/api/qwebenginescript.h
@@ -107,7 +107,7 @@ public:
bool operator==(const QWebEngineScript &other) const;
inline bool operator!=(const QWebEngineScript &other) const
{ return !operator==(other); }
- void swap(QWebEngineScript &other) { qSwap(d, other.d); }
+ void swap(QWebEngineScript &other) noexcept { d.swap(other.d); }
private:
friend class QWebEngineScriptCollectionPrivate;