diff options
Diffstat (limited to 'src/corelib/text/qcollator_macx.cpp')
-rw-r--r-- | src/corelib/text/qcollator_macx.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/text/qcollator_macx.cpp b/src/corelib/text/qcollator_macx.cpp index 9a57ef78fc..23c23bd53a 100644 --- a/src/corelib/text/qcollator_macx.cpp +++ b/src/corelib/text/qcollator_macx.cpp @@ -63,8 +63,8 @@ int QCollator::compare(QStringView s1, QStringView s2) const if (!s2.size()) return +1; - if (d->dirty) - d->init(); + d->ensureInitialized(); + if (!d->collator) return s1.compare(s2, caseSensitivity()); @@ -82,8 +82,8 @@ int QCollator::compare(QStringView s1, QStringView s2) const QCollatorSortKey QCollator::sortKey(const QString &string) const { - if (d->dirty) - d->init(); + d->ensureInitialized(); + if (!d->collator) { // What should (or even *can*) we do here ? (See init()'s comment.) qWarning("QCollator doesn't support sort keys for the C locale on Darwin"); |