Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 161c3658 authored by Laurent Montel's avatar Laurent Montel 😁

Adapt richtexteditor api

parent a0b55066
......@@ -102,8 +102,12 @@ void RichTextEditFindBar::slotReplaceText()
void RichTextEditFindBar::slotReplaceAllText()
{
//FIXME richtext
const QString newText = d->mView->toPlainText().replace(mFindWidget->findRegExp(), mReplaceWidget->replace()->text());
QString newText = d->mView->toPlainText().replace(mFindWidget->findRegExp(), mReplaceWidget->replace()->text());
if (mFindWidget->isRegularExpression()) {
newText = d->mView->toPlainText().replace(mFindWidget->searchRegExp(), mReplaceWidget->replace()->text());
} else {
newText = d->mView->toPlainText().replace(mFindWidget->search()->text(), mReplaceWidget->replace()->text());
}
d->mView->selectAll();
d->mView->insertPlainText(newText);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment