The QCollatorSortKey class can be used to speed up string collation. 更多...
头: | #include <QCollatorSortKey> |
qmake: | QT += core |
Since: | Qt 5.2 |
该类在 Qt 5.2 引入。
注意: 此类的所有函数 可重入 .
QCollatorSortKey (const QCollatorSortKey & other ) | |
QCollatorSortKey & | operator= (QCollatorSortKey && other ) |
QCollatorSortKey & | operator= (const QCollatorSortKey & other ) |
~QCollatorSortKey () | |
int | compare (const QCollatorSortKey & otherKey ) const |
void | swap (QCollatorSortKey & other ) |
bool | operator< (const QCollatorSortKey & lhs , const QCollatorSortKey & rhs ) |
The QCollatorSortKey class is always created by QCollator::sortKey () and is used for fast strings collation, for example when collating many strings.
另请参阅 QCollator and QCollator::sortKey ().
构造副本为 other collator key.
移动赋值 other to this collator key.
赋值 other to this collator key.
Destroys the collator key.
Compares this 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 .
另请参阅 operator< ().
Swaps this collator key with other .
According to the
QCollator
that created the keys, returns
true
if
lhs
should be sorted before
rhs
;否则返回
false
.
另请参阅 QCollatorSortKey::compare ().