QStringList: utilize QStringMatcher's support for QStringView
This opportunity was missed when adding the QStringView overload of
QStringList::filter() in 2a99f60cfb
.
Change-Id: I8d679b92de6cc76c4d59fd54f01a25579ab3488f
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
a4f5f25eb0
commit
8f4baa3a22
@ -313,7 +313,7 @@ void QtPrivate::QStringList_sort(QStringList *that, Qt::CaseSensitivity cs)
|
||||
QStringList QtPrivate::QStringList_filter(const QStringList *that, QStringView str,
|
||||
Qt::CaseSensitivity cs)
|
||||
{
|
||||
QStringMatcher matcher(str.data(), str.length(), cs);
|
||||
QStringMatcher matcher(str, cs);
|
||||
QStringList res;
|
||||
for (int i = 0; i < that->size(); ++i)
|
||||
if (matcher.indexIn(that->at(i)) != -1)
|
||||
|
Loading…
Reference in New Issue
Block a user