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 850fed06 authored by Laurent Montel's avatar Laurent Montel 😁

Remove unused method

parent 161c3658
......@@ -120,19 +120,6 @@ TextFindWidget::~TextFindWidget()
{
}
QRegExp TextFindWidget::findRegExp() const
{
QString str = QRegExp::escape(mSearch->text());
if (mWholeWordAct->isChecked()) {
str = QLatin1String("\\b") + str + QLatin1String("\\b");
}
if (mCaseSensitiveAct->isChecked()) {
return QRegExp(str, Qt::CaseSensitive);
} else {
return QRegExp(str, Qt::CaseInsensitive);
}
}
void TextFindWidget::setFoundMatch(bool match)
{
#ifndef QT_NO_STYLE_STYLESHEET
......
......@@ -39,7 +39,6 @@ public:
QLineEdit *search() const;
void setFoundMatch(bool match);
QRegExp findRegExp() const;
bool isRegularExpression() const;
......
......@@ -102,7 +102,7 @@ void PlainTextEditFindBar::slotReplaceText()
void PlainTextEditFindBar::slotReplaceAllText()
{
QString newText = d->mView->toPlainText().replace(mFindWidget->findRegExp(), mReplaceWidget->replace()->text());
QString newText;
if (mFindWidget->isRegularExpression()) {
newText = d->mView->toPlainText().replace(mFindWidget->searchRegExp(), mReplaceWidget->replace()->text());
} else {
......
......@@ -102,7 +102,7 @@ void RichTextEditFindBar::slotReplaceText()
void RichTextEditFindBar::slotReplaceAllText()
{
QString newText = d->mView->toPlainText().replace(mFindWidget->findRegExp(), mReplaceWidget->replace()->text());
QString newText;
if (mFindWidget->isRegularExpression()) {
newText = d->mView->toPlainText().replace(mFindWidget->searchRegExp(), mReplaceWidget->replace()->text());
} else {
......
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