path: root/src/widgets/widgets/qtextedit.cpp
diff options
authorSamuel Gaist <>2018-08-19 18:05:55 +0200
committerSamuel Gaist <>2018-10-08 13:53:39 +0000
commitd348363673e088da8d9fd10fa627529ade14a987 (patch)
tree6fe3a85f5491fe9b0047357051af92e6c14a8e17 /src/widgets/widgets/qtextedit.cpp
parent0c8299462383b20ccaee1a43ec2acd264adf5640 (diff)
Implement QRegularExpression overload for QTextEdit::find
This patch adds the missing overload for QRegularExpression to match the QRegExp one for QTextEdit. [ChangeLog][QtWidgets][QTextEdit] Added QRegularExpression find() method overload. Change-Id: Ic7be224dcc59fc8d832daddd1999a713b7f04253 Reviewed-by: Luca Beldi <> Reviewed-by: David Faure <>
Diffstat (limited to 'src/widgets/widgets/qtextedit.cpp')
1 files changed, 21 insertions, 0 deletions
diff --git a/src/widgets/widgets/qtextedit.cpp b/src/widgets/widgets/qtextedit.cpp
index e3a45680ef..038d76a0fe 100644
--- a/src/widgets/widgets/qtextedit.cpp
+++ b/src/widgets/widgets/qtextedit.cpp
@@ -2534,6 +2534,27 @@ bool QTextEdit::find(const QRegExp &exp, QTextDocument::FindFlags options)
+ \fn bool QTextEdit::find(const QRegularExpression &exp, QTextDocument::FindFlags options)
+ \since 5.13
+ \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.
+ Returns \c true if a match was found and changes the cursor to select the match;
+ otherwise returns \c false.
+#if QT_CONFIG(regularexpression)
+bool QTextEdit::find(const QRegularExpression &exp, QTextDocument::FindFlags options)
+ Q_D(QTextEdit);
+ return d->control->find(exp, options);
\fn void QTextEdit::copyAvailable(bool yes)
This signal is emitted when text is selected or de-selected in the