Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
5.15.6
-
None
-
-
529f052add3edbc1afb063a5cbbb118b67434fb6
Description
The QString::fromRawData() documentation indicates how to use QRegularExpression with a QString without making a copy if using raw data.
Unfortunately, this is not possible since QRegularExpressionPrivate::doMatch() uses QString::utf16() which does the copying in this case (as indicated in the documentation of `QString::fromRawData()`).
PCRE2 doesn't need a 0-terminated string since it takes a size. Qt6 uses a QStringView which does not have this problem with utf16().