19 qWarning(
"Only the C and system collation locales are supported "
20 "with the POSIX collation implementation");
23 qWarning(
"Case insensitive sorting unsupported in the posix collation implementation");
26 qWarning(
"Numeric mode unsupported in the posix collation implementation");
28 qWarning(
"Ignoring punctuation unsupported in the posix collation implementation");
47 return s2.size() ? -1 : 0;
72 auto availableSizeIncludingNullTerminator =
result.size();
73 size_t neededSizeExcludingNullTerminator = std::wcsxfrm(
74 result.data(), original.
constData(), availableSizeIncludingNullTerminator);
75 if (neededSizeExcludingNullTerminator >
size_t(availableSizeIncludingNullTerminator - 1)) {
76 result.resize(neededSizeExcludingNullTerminator + 1);
77 availableSizeIncludingNullTerminator =
result.size();
78 neededSizeExcludingNullTerminator = std::wcsxfrm(
result.data(), original.
constData(),
79 availableSizeIncludingNullTerminator);
80 Q_ASSERT(neededSizeExcludingNullTerminator
81 ==
size_t(availableSizeIncludingNullTerminator - 1));
83 result.resize(neededSizeExcludingNullTerminator + 1);
84 result[neededSizeExcludingNullTerminator] = 0;
91 return std::wcscmp(
d->
m_key.constData(), otherKey.
d->
m_key.constData());
Qt::CaseSensitivity caseSensitivity
QExplicitlySharedDataPointer< QCollatorSortKeyPrivate > d
int compare(const QCollatorSortKey &key) const
Compares this key to otherKey, which must have been created by the same QCollator's sortKey() as this...
QCollatorSortKey sortKey(const QString &string) const
Returns a sortKey for string.
int compare(const QString &s1, const QString &s2) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Qt::CaseSensitivity caseSensitivity() const
Returns case sensitivity of the collator.
static QLocale system()
Returns a QLocale object initialized to the system locale.
\macro QT_RESTRICTED_CAST_FROM_ASCII
constexpr size_type size() const noexcept
const_iterator cbegin() const noexcept
const_iterator cend() const noexcept
const T * constData() const
Combined button and popup list for selecting options.
static void stringToWCharArray(QVarLengthArray< wchar_t > &ret, QStringView string)
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat s1
GLenum GLuint GLenum GLsizei length