diff options
Diffstat (limited to 'src/widgets/widgets/qtextedit.cpp')
-rw-r--r-- | src/widgets/widgets/qtextedit.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/widgets/widgets/qtextedit.cpp b/src/widgets/widgets/qtextedit.cpp index ab636660d7..0ae63f2dd5 100644 --- a/src/widgets/widgets/qtextedit.cpp +++ b/src/widgets/widgets/qtextedit.cpp @@ -105,6 +105,14 @@ public: else ed->insertFromMimeData(source); } + QVariant loadResource(int type, const QUrl &name) override { + auto *ed = qobject_cast<QTextEdit *>(parent()); + if (!ed) + return QWidgetTextControl::loadResource(type, name); + + QUrl resolvedName = ed->d_func()->resolveUrl(name); + return ed->loadResource(type, resolvedName); + } }; QTextEditPrivate::QTextEditPrivate() @@ -2545,6 +2553,27 @@ bool QTextEdit::find(const QRegExp &exp, QTextDocument::FindFlags options) #endif /*! + \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); +} +#endif + +/*! \fn void QTextEdit::copyAvailable(bool yes) This signal is emitted when text is selected or de-selected in the |