diff options
Diffstat (limited to 'src/corelib/tools/qcollator.h')
-rw-r--r-- | src/corelib/tools/qcollator.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/corelib/tools/qcollator.h b/src/corelib/tools/qcollator.h index 011c2a8d02..e5abc91967 100644 --- a/src/corelib/tools/qcollator.h +++ b/src/corelib/tools/qcollator.h @@ -61,8 +61,10 @@ public: QCollatorSortKey &operator=(const QCollatorSortKey &other); #ifdef Q_COMPILER_RVALUE_REFS inline QCollatorSortKey &operator=(QCollatorSortKey &&other) - { qSwap(d, other.d); return *this; } + { swap(other); return *this; } #endif + void swap(QCollatorSortKey &other) + { d.swap(other.d); } bool operator<(const QCollatorSortKey &key) const; int compare(const QCollatorSortKey &key) const; @@ -84,6 +86,9 @@ public: ~QCollator(); QCollator &operator=(const QCollator &); + void swap(QCollator &other) + { qSwap(d, other.d); } + void setLocale(const QLocale &locale); QLocale locale() const; |