Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/controls/replacebar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/controls/replacebar.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 _);
Expand Down
8 changes: 4 additions & 4 deletions src/widgets/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/window.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/src/widgets/ut_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Loading