From 68d75aef76b24086ea676aa1646fec4e9358f0de Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Wed, 13 Mar 2019 00:20:25 +0300 Subject: qstringalgorithms: add find methods Also add qsizetype support. It's needed to add find methods to QStringView Change-Id: I45eac082924e27778c24eebbb19d694221c28978 Reviewed-by: Edward Welbourne Reviewed-by: Thiago Macieira --- src/corelib/tools/qregexp.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/corelib/tools/qregexp.cpp') diff --git a/src/corelib/tools/qregexp.cpp b/src/corelib/tools/qregexp.cpp index 87b30c952e8..589eb745202 100644 --- a/src/corelib/tools/qregexp.cpp +++ b/src/corelib/tools/qregexp.cpp @@ -58,9 +58,6 @@ QT_BEGIN_NAMESPACE -int qFindString(const QChar *haystack, int haystackLen, int from, - const QChar *needle, int needleLen, Qt::CaseSensitivity cs); - // error strings for the regexp parser #define RXERR_OK QT_TRANSLATE_NOOP("QRegExp", "no error occurred") #define RXERR_DISABLED QT_TRANSLATE_NOOP("QRegExp", "disabled feature used") @@ -1423,7 +1420,8 @@ void QRegExpMatchState::match(const QChar *str0, int len0, int pos0, #ifndef QT_NO_REGEXP_OPTIM if (eng->trivial && !oneTest) { - pos = qFindString(str0, len0, pos0, eng->goodStr.unicode(), eng->goodStr.length(), eng->cs); + // ### Qt6: qsize + pos = int(QtPrivate::findString(QStringView(str0, len0), pos0, QStringView(eng->goodStr.unicode(), eng->goodStr.length()), eng->cs)); matchLen = eng->goodStr.length(); matched = (pos != -1); } else -- cgit v1.2.3