20#include <QtCore/private/qglobal_p.h>
24#include <QtCore/qloggingcategory.h>
25#if QT_CONFIG(icu) || defined(Q_OS_ANDROID)
26#include <unicode/ucol.h>
27#elif defined(Q_OS_MACOS)
28#include <CoreServices/CoreServices.h>
29#elif defined(Q_OS_WIN)
30#include <qt_windows.h>
33#include "qjniobject.h"
39Q_DECLARE_LOGGING_CATEGORY(lcQCollator)
41#if QT_CONFIG(icu) || defined(Q_OS_ANDROID)
42typedef UCollator *CollatorType;
43typedef QByteArray CollatorKeyType;
44const CollatorType NoCollator =
nullptr;
46#elif defined(Q_OS_MACOS)
47typedef CollatorRef CollatorType;
48typedef QList<UCCollationValue> CollatorKeyType;
49const CollatorType NoCollator = 0;
51#elif defined(Q_OS_WIN)
52typedef QByteArray CollatorKeyType;
53typedef int CollatorType;
54const CollatorType NoCollator = 0;
57typedef QList<
wchar_t> CollatorKeyType;
63Q_DECLARE_JNI_CLASS(QtCollator,
"org/qtproject/qt/android/QtCollator")
64Q_DECLARE_JNI_CLASS(Collator,
"android/icu/text/Collator")
85 bool isC()
const {
return locale.language() == QLocale::C; }
QCollatorPrivate(const QLocale &locale)
static QCollatorSortKey sortKeyFromData(CollatorKeyType &&data)
QCollatorSortKeyPrivate(CollatorKeyType &&list)
Combined button and popup list for selecting options.
const CollatorType NoCollator
GenerationalCollator(const QCollator ©)
GenerationalCollator()=default