summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qregularexpression.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/text/qregularexpression.cpp')
-rw-r--r--src/corelib/text/qregularexpression.cpp23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/corelib/text/qregularexpression.cpp b/src/corelib/text/qregularexpression.cpp
index d74b759aa9..6544abb646 100644
--- a/src/corelib/text/qregularexpression.cpp
+++ b/src/corelib/text/qregularexpression.cpp
@@ -553,7 +553,7 @@ QT_BEGIN_NAMESPACE
\section2 Caret modes
- The AnchoredMatchOption match option can be used to emulate the
+ The AnchorAtOffsetMatchOption match option can be used to emulate the
QRegExp::CaretAtOffset behaviour. There is no equivalent for the other
QRegExp::CaretMode modes.
@@ -788,9 +788,16 @@ QT_BEGIN_NAMESPACE
No match options are set.
\value AnchoredMatchOption
+ Use AnchorAtOffsetMatchOption instead.
+
+ \value AnchorAtOffsetMatchOption
The match is constrained to start exactly at the offset passed to
match() in order to be successful, even if the pattern string does not
contain any metacharacter that anchors the match at that point.
+ Note that passing this option does not anchor the end of the match
+ to the end of the subject; if you want to fully anchor a regular
+ expression, use anchoredPattern().
+ This enum value has been introduced in Qt 6.0.
\value DontCheckSubjectStringMatchOption
The subject string is not checked for UTF-16 validity before
@@ -832,7 +839,7 @@ static int convertToPcreOptions(QRegularExpression::MatchOptions matchOptions)
{
int options = 0;
- if (matchOptions & QRegularExpression::AnchoredMatchOption)
+ if (matchOptions & QRegularExpression::AnchorAtOffsetMatchOption)
options |= PCRE2_ANCHORED;
if (matchOptions & QRegularExpression::DontCheckSubjectStringMatchOption)
options |= PCRE2_NO_UTF_CHECK;
@@ -1831,12 +1838,9 @@ uint qHash(const QRegularExpression &key, uint seed) noexcept
#if QT_STRINGVIEW_LEVEL < 2
/*!
+ \fn QString QRegularExpression::escape(const QString &str)
\overload
*/
-QString QRegularExpression::escape(const QString &str)
-{
- return escape(QStringView(str));
-}
#endif // QT_STRINGVIEW_LEVEL < 2
/*!
@@ -1897,12 +1901,9 @@ QString QRegularExpression::escape(QStringView str)
#if QT_STRINGVIEW_LEVEL < 2
/*!
\since 5.12
+ \fn QString QRegularExpression::wildcardToRegularExpression(const QString &pattern)
\overload
*/
-QString QRegularExpression::wildcardToRegularExpression(const QString &pattern)
-{
- return wildcardToRegularExpression(QStringView(pattern));
-}
#endif // QT_STRINGVIEW_LEVEL < 2
/*!
@@ -2036,9 +2037,7 @@ QString QRegularExpression::wildcardToRegularExpression(QStringView pattern)
#if QT_STRINGVIEW_LEVEL < 2
/*!
\fn QRegularExpression::anchoredPattern(const QString &expression)
-
\since 5.12
-
\overload
*/
#endif // QT_STRINGVIEW_LEVEL < 2