summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qcollator_icu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qcollator_icu.cpp')
-rw-r--r--src/corelib/tools/qcollator_icu.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/tools/qcollator_icu.cpp b/src/corelib/tools/qcollator_icu.cpp
index fd621983d3..ab45b9a1a1 100644
--- a/src/corelib/tools/qcollator_icu.cpp
+++ b/src/corelib/tools/qcollator_icu.cpp
@@ -55,6 +55,8 @@ QT_BEGIN_NAMESPACE
void QCollatorPrivate::init()
{
cleanup();
+ if (isC())
+ return;
UErrorCode status = U_ZERO_ERROR;
QByteArray name = QLocalePrivate::get(locale)->bcp47Name('_');
@@ -140,6 +142,8 @@ QCollatorSortKey QCollator::sortKey(const QString &string) const
{
if (d->dirty)
d->init();
+ if (d->isC())
+ return QCollatorSortKey(new QCollatorSortKeyPrivate(string.toUtf8()));
if (d->collator) {
QByteArray result(16 + string.size() + (string.size() >> 2), Qt::Uninitialized);