summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-12-17 17:17:35 +0100
committerMontel Laurent <[email protected]>2017-12-17 17:17:35 +0100
commit850fed06f659e79ad6c1053d20d2651fac455db6 (patch)
treed740b4b1e40391a7694d02683aae7ebfe927ef93
parent161c36580126d076f7d172309d579227b198cb63 (diff)
Remove unused method
-rw-r--r--src/texteditor/commonwidget/textfindreplacewidget.cpp13
-rw-r--r--src/texteditor/commonwidget/textfindreplacewidget.h1
-rw-r--r--src/texteditor/plaintexteditor/plaintexteditfindbar.cpp2
-rw-r--r--src/texteditor/richtexteditor/richtexteditfindbar.cpp2
4 files changed, 2 insertions, 16 deletions
diff --git a/src/texteditor/commonwidget/textfindreplacewidget.cpp b/src/texteditor/commonwidget/textfindreplacewidget.cpp
index e5452b0..3a94306 100644
--- a/src/texteditor/commonwidget/textfindreplacewidget.cpp
+++ b/src/texteditor/commonwidget/textfindreplacewidget.cpp
@@ -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
diff --git a/src/texteditor/commonwidget/textfindreplacewidget.h b/src/texteditor/commonwidget/textfindreplacewidget.h
index 2065277..7eafd5a 100644
--- a/src/texteditor/commonwidget/textfindreplacewidget.h
+++ b/src/texteditor/commonwidget/textfindreplacewidget.h
@@ -39,7 +39,6 @@ public:
QLineEdit *search() const;
void setFoundMatch(bool match);
- QRegExp findRegExp() const;
bool isRegularExpression() const;
diff --git a/src/texteditor/plaintexteditor/plaintexteditfindbar.cpp b/src/texteditor/plaintexteditor/plaintexteditfindbar.cpp
index 8555b9a..bd4d4e4 100644
--- a/src/texteditor/plaintexteditor/plaintexteditfindbar.cpp
+++ b/src/texteditor/plaintexteditor/plaintexteditfindbar.cpp
@@ -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 {
diff --git a/src/texteditor/richtexteditor/richtexteditfindbar.cpp b/src/texteditor/richtexteditor/richtexteditfindbar.cpp
index 15089d6..533a1b7 100644
--- a/src/texteditor/richtexteditor/richtexteditfindbar.cpp
+++ b/src/texteditor/richtexteditor/richtexteditfindbar.cpp
@@ -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 {