QCollatorSortKey Class
La clase QCollatorSortKey puede utilizarse para acelerar la ordenación de cadenas. Más...
| Cabecera: | #include <QCollatorSortKey> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Core)target_link_libraries(mytarget PRIVATE Qt6::Core) |
| qmake: | QT += core |
- Lista de todos los miembros, incluyendo los heredados
- QCollatorSortKey es parte de Clases para datos de cadena y Clases Implícitamente Compartidas.
Nota: Todas las funciones de esta clase son reentrantes.
Funciones Públicas
| QCollatorSortKey(const QCollatorSortKey &other) | |
(since 6.8) | QCollatorSortKey(QCollatorSortKey &&other) |
| ~QCollatorSortKey() | |
| int | compare(const QCollatorSortKey &otherKey) const |
| void | swap(QCollatorSortKey &other) |
| QCollatorSortKey & | operator=(QCollatorSortKey &&other) |
| QCollatorSortKey & | operator=(const QCollatorSortKey &other) |
No miembros relacionados
| bool | operator<(const QCollatorSortKey &lhs, const QCollatorSortKey &rhs) |
Descripción Detallada
La clase QCollatorSortKey es creada siempre por QCollator::sortKey() y se utiliza para el cotejo rápido de cadenas, por ejemplo cuando se cotejan muchas cadenas.
Ver también QCollator, QCollator::sortKey(), y compare().
Documentación de las funciones miembro
QCollatorSortKey::QCollatorSortKey(const QCollatorSortKey &other)
Crea una copia de la clave de compaginación other.
[constexpr noexcept, since 6.8] QCollatorSortKey::QCollatorSortKey(QCollatorSortKey &&other)
Move-construye un nuevo QCollatorSortKey a partir de other.
Nota: El objeto movido-desde other se coloca en un estado parcialmente formado, en el que las únicas operaciones válidas son la destrucción y la asignación de un nuevo valor.
Esta función se introdujo en Qt 6.8.
[noexcept] QCollatorSortKey::~QCollatorSortKey()
Destruye la clave del intercalador.
int QCollatorSortKey::compare(const QCollatorSortKey &otherKey) const
Compara esta clave con otherKey, que debe haber sido creada por el mismo QCollator's sortKey() que esta clave. La comparación se realiza de acuerdo con el orden de QCollator.
Devuelve un valor negativo si esta clave se ordena antes que otherKey, 0 si las dos claves son iguales o un valor positivo si esta clave se ordena después que otherKey.
Véase también operator<().
[noexcept] void QCollatorSortKey::swap(QCollatorSortKey &other)
Intercambia esta tecla de compaginación con other. Esta operación es muy rápida y nunca falla.
[noexcept] QCollatorSortKey &QCollatorSortKey::operator=(QCollatorSortKey &&other)
Mover-asigna other a esta instancia QCollatorSortKey.
Nota: El objeto movido-desde other se coloca en un estado parcialmente formado, en el que las únicas operaciones válidas son la destrucción y la asignación de un nuevo valor.
QCollatorSortKey &QCollatorSortKey::operator=(const QCollatorSortKey &other)
Asigna other a esta tecla de intercalación.
Relacionados No miembros
bool operator<(const QCollatorSortKey &lhs, const QCollatorSortKey &rhs)
Ambas claves deben haber sido creadas por el mismo QCollator's sortKey(). Devuelve true si lhs debe ordenarse antes que rhs, según la QCollator que las creó; en caso contrario devuelve false.
Véase también QCollatorSortKey::compare().
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.