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>
31#elif defined(Q_OS_WASM)
32#include <emscripten/val.h>
35#include "qjniobject.h"
41Q_DECLARE_LOGGING_CATEGORY(lcQCollator)
43#if QT_CONFIG(icu) || defined(Q_OS_ANDROID)
44typedef UCollator *CollatorType;
45typedef QByteArray CollatorKeyType;
46const CollatorType NoCollator =
nullptr;
48#elif defined(Q_OS_MACOS)
49typedef CollatorRef CollatorType;
50typedef QList<UCCollationValue> CollatorKeyType;
51const CollatorType NoCollator = 0;
53#elif defined(Q_OS_WIN)
54typedef QByteArray CollatorKeyType;
55typedef int CollatorType;
56const CollatorType NoCollator = 0;
58#elif defined(Q_OS_WASM)
59typedef emscripten::val *CollatorType;
60struct QCollatorSortKeyWasm
63 emscripten::val collator = emscripten::val::undefined();
65typedef QCollatorSortKeyWasm CollatorKeyType;
66const CollatorType NoCollator =
nullptr;
69typedef QList<
wchar_t> CollatorKeyType;
75Q_DECLARE_JNI_CLASS(QtCollator,
"org/qtproject/qt/android/QtCollator")
76Q_DECLARE_JNI_CLASS(Collator,
"android/icu/text/Collator")
97 bool isC()
const {
return locale.language() == QLocale::C; }
QCollatorPrivate(const QLocale &locale)
static QCollatorSortKey sortKeyFromData(CollatorKeyType &&data)
QCollatorSortKeyPrivate(CollatorKeyType &&list)
~GenerationalCollatorHolder()
Combined button and popup list for selecting options.
const CollatorType NoCollator
GenerationalCollator(const QCollator ©)
GenerationalCollator()=default