summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qcursor.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-03-15 21:20:46 +0100
committerMarc Mutz <marc.mutz@qt.io>2022-03-19 16:56:08 +0100
commitc839efb07a6aa3b487dac5f86f905f35ef2c3a08 (patch)
tree6345226a2b0e42cee27dd6f8c6149b86a9f0e25a /src/gui/kernel/qcursor.h
parent81fb9c5b14a89b47ea648c0a25f79b09ef7c92ad (diff)
QtGui: compile-optimize inline swap functions
Instead of using the overly-generic qSwap() monster, use - qt_ptr_swap() for swapping raw pointers - member-swap for swapping smart pointers - std::swap() for swapping scalars In QtCore, this has proven to give a nice reduction in compile time for Qt users, cf. b1b0c2970e480ef460a61f37fa430dc443390358. Pick-to: 6.3 6.2 Task-number: QTBUG-97601 Change-Id: I987ff95e8751a22a4f283655d8225dd16de21178 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/gui/kernel/qcursor.h')
-rw-r--r--src/gui/kernel/qcursor.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/kernel/qcursor.h b/src/gui/kernel/qcursor.h
index c1d45cc41b..0bc54a3d82 100644
--- a/src/gui/kernel/qcursor.h
+++ b/src/gui/kernel/qcursor.h
@@ -90,7 +90,7 @@ public:
QCursor(QCursor &&other) noexcept : d(qExchange(other.d, nullptr)) {}
QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QCursor)
- void swap(QCursor &other) noexcept { qSwap(d, other.d); }
+ void swap(QCursor &other) noexcept { qt_ptr_swap(d, other.d); }
operator QVariant() const;