QCollator(SortKey): add member-swap
This is required for a Qt value type these days. Change-Id: Ibd4e1581a4f4791a410caa10fede92c26b35dd9d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
4225e71038
commit
2c450d90b6
|
|
@ -117,6 +117,13 @@ QCollator &QCollator::operator=(const QCollator &other)
|
|||
return *this;
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn void QCollator::swap(QCollator &other)
|
||||
|
||||
Swaps this collator with \a other. This function is very fast and
|
||||
never fails.
|
||||
*/
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue