summaryrefslogtreecommitdiffstats
path: root/src/corelib/time/qdatetime.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/time/qdatetime.h')
-rw-r--r--src/corelib/time/qdatetime.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/time/qdatetime.h b/src/corelib/time/qdatetime.h
index 80227afde2..c1c67398a3 100644
--- a/src/corelib/time/qdatetime.h
+++ b/src/corelib/time/qdatetime.h
@@ -267,6 +267,9 @@ class Q_CORE_EXPORT QDateTime
Data &operator=(const Data &other);
~Data();
+ void swap(Data &other) noexcept
+ { std::swap(data, other.data); }
+
bool isShort() const;
void detach();
@@ -290,7 +293,7 @@ public:
QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QDateTime)
QDateTime &operator=(const QDateTime &other) noexcept;
- void swap(QDateTime &other) noexcept { qSwap(d.d, other.d.d); }
+ void swap(QDateTime &other) noexcept { d.swap(other.d); }
bool isNull() const;
bool isValid() const;