QCollator: port from QString::compare_helper to QtPrivate::compareStrings

The call becomes simpler, and QCollator no longer needs to befriend
QString.

Pick-to: 6.3
Change-Id: Ie2c977dc39973423f07563a0702a83fa3c75270d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This commit is contained in:
Marc Mutz 2022-01-26 14:07:07 +01:00
parent acaba63260
commit 40828992eb
2 changed files with 1 additions and 4 deletions

View File

@ -123,9 +123,7 @@ int QCollator::compare(QStringView s1, QStringView s2) const
reinterpret_cast<const UChar *>(s2.data()), s2.size());
}
return QString::compare_helper(s1.data(), s1.size(),
s2.data(), s2.size(),
d->caseSensitivity);
return QtPrivate::compareStrings(s1, s2, d->caseSensitivity);
}
QCollatorSortKey QCollator::sortKey(const QString &string) const

View File

@ -1129,7 +1129,6 @@ private:
void replace_helper(size_t *indices, qsizetype nIndices, qsizetype blen, const QChar *after, qsizetype alen);
friend class QStringView;
friend class QByteArray;
friend class QCollator;
friend struct QAbstractConcatenable;
template <typename T> static