IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QCollatorSortKey Class

The QCollatorSortKey class can be used to speed up string collation.

This class was introduced in Qt 5.2.

All functions in this class are reentrant.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QCollatorSortKey Class

  • Header: QCollatorSortKey

  • Since: Qt 5.2

  • qmake: QT += core

  • Group: QCollatorSortKey is part of i18n, string-processing, Implicitly Shared Classes

Detailed Description

The QCollatorSortKey class is always created by QCollator::sortKey() and is used for fast strings collation, for example when collating many strings.

See Also

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

See also operator<()

void QCollatorSortKey::swap(QCollatorSortKey &other)

Swaps this collator key with other.

QCollatorSortKey &QCollatorSortKey::operator=(const QCollatorSortKey &other)

Assigns other to this collator key.

QCollatorSortKey &QCollatorSortKey::operator=(QCollatorSortKey &&other)

Move-assigns other to this collator key.

Related Non-Members

 

bool operator<(const QCollatorSortKey &lhs, const QCollatorSortKey &rhs)

According to the QCollator that created the keys, returns true if lhs should be sorted before rhs; otherwise returns false.

See Also

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+