summaryrefslogtreecommitdiffstats
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
committerMarc Mutz <marc.mutz@qt.io>2022-05-11 18:25:08 +0200
commit99b81083ccee7e1bd28749b1066599670713cefe (patch)
treef3e3c7fb18bfd9683cc02c1464b2af0acc17fc23 /src/core/api/qwebenginescript.h
parent3b4ed3123fde1f6e6d47b004cb5a4795b0d64387 (diff)
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 Pick-to: 6.3 6.2 5.15 Change-Id: I9184cab0ed74a1b32d62cf7c83dc1f1b7814c784 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
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;