fix:QCheckBox signal (#1705)

* fix:QCheckBox signal

* fix:QCheckBox signal
This commit is contained in:
xiaoyifang 2024-07-23 17:57:57 +08:00 committed by GitHub
parent 3299596746
commit cd58059695
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 8 deletions

View file

@ -137,7 +137,7 @@ ArticleView::ArticleView( QWidget * parent,
connect( searchPanel->previous, &QPushButton::clicked, this, &ArticleView::on_searchPrevious_clicked );
connect( searchPanel->next, &QPushButton::clicked, this, &ArticleView::on_searchNext_clicked );
connect( searchPanel->close, &QPushButton::clicked, this, &ArticleView::on_searchCloseButton_clicked );
connect( searchPanel->caseSensitive, &QPushButton::clicked, this, &ArticleView::on_searchCaseSensitive_clicked );
connect( searchPanel->caseSensitive, &QCheckBox::toggled, this, &ArticleView::on_searchCaseSensitive_clicked );
connect( searchPanel->lineEdit, &QLineEdit::textEdited, this, &ArticleView::on_searchText_textEdited );
connect( searchPanel->lineEdit, &QLineEdit::returnPressed, this, &ArticleView::on_searchText_returnPressed );
connect( ftsSearchPanel->next, &QPushButton::clicked, this, &ArticleView::on_ftsSearchNext_clicked );
@ -1963,8 +1963,11 @@ void ArticleView::on_searchCloseButton_clicked()
closeSearch();
}
void ArticleView::on_searchCaseSensitive_clicked()
void ArticleView::on_searchCaseSensitive_clicked( bool checked )
{
//clear the previous findText results.
//when the results is empty, the highlight has not been removed.more likely a qt bug.
webview->findText( "" );
performFindOperation( false );
}
@ -2027,11 +2030,6 @@ void ArticleView::performFindOperation( bool backwards )
findText( text, f, [ text, this ]( bool match ) {
bool nomatch = !text.isEmpty() && !match;
if ( nomatch ) {
//clear the previous findText results.
//when the results is empty, the highlight has not been removed.more likely a qt bug.
webview->findText( "" );
}
Utils::Widget::setNoResultColor( searchPanel->lineEdit, nomatch );
} );
}

View file

@ -357,7 +357,7 @@ private slots:
void on_searchText_textEdited();
void on_searchText_returnPressed();
void on_searchCloseButton_clicked();
void on_searchCaseSensitive_clicked();
void on_searchCaseSensitive_clicked( bool );
void on_ftsSearchPrevious_clicked();
void on_ftsSearchNext_clicked();