diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index ea0cc27f590..4d5a563e580 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -1500,6 +1500,10 @@ static bool findInBlock(const QTextBlock &block, const QRegularExpression &expr, If the \a from position is 0 (the default) the search begins from the beginning of the document; otherwise it begins at the specified position. + + \warning For historical reasons, the case sensitivity option set on + \a expr is ignored. Instead, the \a options are used to determine + if the search is case sensitive or not. */ QTextCursor QTextDocument::find(const QRegularExpression &expr, int from, FindFlags options) const { diff --git a/src/widgets/widgets/qplaintextedit.cpp b/src/widgets/widgets/qplaintextedit.cpp index 087b7e4d210..dcba223cb03 100644 --- a/src/widgets/widgets/qplaintextedit.cpp +++ b/src/widgets/widgets/qplaintextedit.cpp @@ -2894,11 +2894,14 @@ bool QPlainTextEdit::find(const QString &exp, QTextDocument::FindFlags options) \overload Finds the next occurrence, matching the regular expression, \a exp, using the given - \a options. The QTextDocument::FindCaseSensitively option is ignored for this overload, - use QRegularExpression::CaseInsensitiveOption instead. + \a options. Returns \c true if a match was found and changes the cursor to select the match; otherwise returns \c false. + + \warning For historical reasons, the case sensitivity option set on + \a exp is ignored. Instead, the \a options are used to determine + if the search is case sensitive or not. */ #if QT_CONFIG(regularexpression) bool QPlainTextEdit::find(const QRegularExpression &exp, QTextDocument::FindFlags options) diff --git a/src/widgets/widgets/qtextedit.cpp b/src/widgets/widgets/qtextedit.cpp index 2bc7d06f11a..1a3d0f9e983 100644 --- a/src/widgets/widgets/qtextedit.cpp +++ b/src/widgets/widgets/qtextedit.cpp @@ -2593,11 +2593,14 @@ bool QTextEdit::find(const QString &exp, QTextDocument::FindFlags options) \overload Finds the next occurrence, matching the regular expression, \a exp, using the given - \a options. The QTextDocument::FindCaseSensitively option is ignored for this overload, - use QRegularExpression::CaseInsensitiveOption instead. + \a options. Returns \c true if a match was found and changes the cursor to select the match; otherwise returns \c false. + + \warning For historical reasons, the case sensitivity option set on + \a exp is ignored. Instead, the \a options are used to determine + if the search is case sensitive or not. */ #if QT_CONFIG(regularexpression) bool QTextEdit::find(const QRegularExpression &exp, QTextDocument::FindFlags options)