diff --git a/src/controls/replacebar.cpp b/src/controls/replacebar.cpp index 6a69955c..6348496e 100644 --- a/src/controls/replacebar.cpp +++ b/src/controls/replacebar.cpp @@ -133,7 +133,7 @@ void ReplaceBar::activeInput(QString text, QString file, int row, int column, in void ReplaceBar::handleSkip() { qDebug() << "handleSkip"; - emit replaceSkip(m_replaceFile, m_replaceLine->lineEdit()->text(), Qt::CaseSensitive); + emit replaceSkip(m_replaceFile, m_replaceLine->lineEdit()->text()); } void ReplaceBar::replaceClose() diff --git a/src/controls/replacebar.h b/src/controls/replacebar.h index cf7f8106..893fe82f 100644 --- a/src/controls/replacebar.h +++ b/src/controls/replacebar.h @@ -36,7 +36,7 @@ class ReplaceBar : public DFloatingWidget Q_SIGNALS: void pressEsc(); void replaceNext(QString file, QString replaceText, QString withText); - void replaceSkip(QString file, QString keyword, Qt::CaseSensitivity caseFlag); + void replaceSkip(QString file, QString keyword); void replaceRest(QString replaceText, QString withText); void replaceAll(QString replaceText, QString withText); void beforeReplace(QString _); diff --git a/src/widgets/window.cpp b/src/widgets/window.cpp index 71b1f8ad..458f705d 100644 --- a/src/widgets/window.cpp +++ b/src/widgets/window.cpp @@ -3419,17 +3419,17 @@ void Window::handleReplaceRest(const QString &replaceText, const QString &withTe qDebug() << "handleReplaceRest end"; } -void Window::handleReplaceSkip(QString file, QString keyword, Qt::CaseSensitivity caseFlag) +void Window::handleReplaceSkip(QString file, QString keyword) { - qDebug() << "handleReplaceSkip" << file << keyword << caseFlag; + qDebug() << "handleReplaceSkip" << file << keyword; EditWrapper *wrapper = currentWrapper(); - handleUpdateSearchKeyword(m_replaceBar, file, keyword, caseFlag); + handleUpdateSearchKeyword(m_replaceBar, file, keyword, Qt::CaseSensitive); if (QString::compare(m_keywordForSearch, m_keywordForSearchAll, Qt::CaseInsensitive) != 0) { m_keywordForSearchAll.clear(); wrapper->textEditor()->clearFindMatchSelections(); qDebug() << "m_keywordForSearchAll is not equal to m_keywordForSearch, clear it"; } else { - wrapper->textEditor()->highlightKeywordInView(m_keywordForSearchAll, caseFlag); + wrapper->textEditor()->highlightKeywordInView(m_keywordForSearchAll, Qt::CaseSensitive); qDebug() << "m_keywordForSearchAll is equal to m_keywordForSearch, highlight it"; } #if 0 diff --git a/src/widgets/window.h b/src/widgets/window.h index 21e60ae3..b3a36d23 100644 --- a/src/widgets/window.h +++ b/src/widgets/window.h @@ -177,7 +177,7 @@ public Q_SLOTS: void handleReplaceAll(const QString &replaceText, const QString &withText); void handleReplaceNext(const QString &file, const QString &replaceText, const QString &withText); void handleReplaceRest(const QString &replaceText, const QString &withText); - void handleReplaceSkip(QString file, QString keyword, Qt::CaseSensitivity caseFlag); + void handleReplaceSkip(QString file, QString keyword); void handleRemoveSearchKeyword(); void handleUpdateSearchKeyword(QWidget *widget, const QString &file, const QString &keyword, diff --git a/tests/src/widgets/ut_window.cpp b/tests/src/widgets/ut_window.cpp index d04576ba..ec68eaaa 100644 --- a/tests/src/widgets/ut_window.cpp +++ b/tests/src/widgets/ut_window.cpp @@ -1502,7 +1502,7 @@ TEST(UT_Window_handleReplaceSkip, UT_Window_handleReplaceSkip) window->addTabWithWrapper(a,"aa","aad","aadd",0); window->addTabWithWrapper(a,"bb","aad","aadd",1); window->m_settings =Settings::instance(); - window->handleReplaceSkip("aa", "", Qt::CaseSensitive); + window->handleReplaceSkip("aa", ""); EXPECT_NE(window,nullptr); window->deleteLater();