diff options
Diffstat (limited to 'src/corelib/tools/qstring.cpp')
-rw-r--r-- | src/corelib/tools/qstring.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index a2d91c561c..4f8d0e5614 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -100,12 +100,6 @@ QT_BEGIN_NAMESPACE -#ifdef QT_USE_ICU -// qlocale_icu.cpp -extern bool qt_ucol_strcoll(const QChar *source, int sourceLength, const QChar *target, int targetLength, int *result); -#endif - - // internal int qFindString(const QChar *haystack, int haystackLen, int from, const QChar *needle, int needleLen, Qt::CaseSensitivity cs); @@ -5011,12 +5005,11 @@ int QString::localeAwareCompare_helper(const QChar *data1, int length1, return result; #elif defined(Q_OS_UNIX) # if defined(QT_USE_ICU) + QLocale locale; int res; - if (qt_ucol_strcoll(data1, length1, data2, length2, &res)) { - if (res == 0) - res = ucstrcmp(data1, length1, data2, length2); + if (QIcu::strcoll(locale.d.constData()->m_localeID, data1, length1, data2, length2, &res)) return res; - } // else fall through + // else fall through # endif // declared in <string.h> int delta = strcoll(toLocal8Bit_helper(data1, length1).constData(), toLocal8Bit_helper(data2, length2).constData()); |