qt5base-lts/tests/auto/corelib/text/qregularexpression
Giuseppe D'Angelo 529f052add Port QRegularExpression to QStringView, drop QStringRef
The idea is pretty simple -- add QRegularExpression matching over
QStringView. When matching over a QString, keep the string
alive (by taking a copy), and set the view onto that string.
Otherwise, just use the view provided by the user (who is then
responsible for ensuring the data stays valid while matching).

Do just minor refactorings to support this use case in a cleaner
fashion.

In QRegularExpressionMatch drop the QStringRef-returning methods, as
they cannot work any more -- in the general case there won't be a
QString to build a QStringRef from.

[ChangeLog][QtCore][QRegularExpression] All the APIs dealing
with QStringRef have been ported to QStringView, following
QStringRef deprecation in Qt 6.0.

Change-Id: Ic367991d9583cc108c045e4387c9b7288c8f1ffd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-31 21:46:32 +02:00
..
.gitignore
CMakeLists.txt Regenerate tests/auto/corelib/text 2019-11-12 17:26:05 +00:00
qregularexpression.pro
tst_qregularexpression.cpp Port QRegularExpression to QStringView, drop QStringRef 2020-05-31 21:46:32 +02:00