QCollatorSortKey Class
The QCollatorSortKey class can be used to speed up string collation. More...
Header: | #include <QCollatorSortKey> |
qmake: | QT += core |
Since: | Qt 5.2 |
Note: All functions in this class are reentrant.
Public Functions
QCollatorSortKey(const QCollatorSortKey & other) | |
~QCollatorSortKey() | |
int | compare(const QCollatorSortKey & otherKey) const |
bool | operator<(const QCollatorSortKey & otherKey) const |
QCollatorSortKey & | operator=(const QCollatorSortKey & other) |
QCollatorSortKey & | operator=(QCollatorSortKey && other) |
Detailed Description
The QCollatorSortKey class can be used to speed up string collation.
The QCollatorSortKey class is always created by QCollator::sortKey() and is used for fast strings collation, for example when collating many strings.
See also QCollator and QCollator::sortKey().
Member Function Documentation
QCollatorSortKey::QCollatorSortKey(const QCollatorSortKey & other)
Constructs a copy of the other collator key.
QCollatorSortKey::~QCollatorSortKey()
Destroys the collator key.
int QCollatorSortKey::compare(const QCollatorSortKey & otherKey) const
Compares the key to otherKey. Returns a negative value if the key is less than otherKey, 0 if the key is equal to otherKey or a positive value if the key is greater than otherKey.
See also operator<().
bool QCollatorSortKey::operator<(const QCollatorSortKey & otherKey) const
According to the QCollator that created the key, returns true if the key should be sorted before than otherKey; otherwise returns false.
See also compare().
QCollatorSortKey & QCollatorSortKey::operator=(const QCollatorSortKey & other)
Assigns other to this collator key.