mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 00:14:06 +00:00
fix:QCheckBox signal (#1705)
* fix:QCheckBox signal * fix:QCheckBox signal
This commit is contained in:
parent
3299596746
commit
cd58059695
|
@ -137,7 +137,7 @@ ArticleView::ArticleView( QWidget * parent,
|
||||||
connect( searchPanel->previous, &QPushButton::clicked, this, &ArticleView::on_searchPrevious_clicked );
|
connect( searchPanel->previous, &QPushButton::clicked, this, &ArticleView::on_searchPrevious_clicked );
|
||||||
connect( searchPanel->next, &QPushButton::clicked, this, &ArticleView::on_searchNext_clicked );
|
connect( searchPanel->next, &QPushButton::clicked, this, &ArticleView::on_searchNext_clicked );
|
||||||
connect( searchPanel->close, &QPushButton::clicked, this, &ArticleView::on_searchCloseButton_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::textEdited, this, &ArticleView::on_searchText_textEdited );
|
||||||
connect( searchPanel->lineEdit, &QLineEdit::returnPressed, this, &ArticleView::on_searchText_returnPressed );
|
connect( searchPanel->lineEdit, &QLineEdit::returnPressed, this, &ArticleView::on_searchText_returnPressed );
|
||||||
connect( ftsSearchPanel->next, &QPushButton::clicked, this, &ArticleView::on_ftsSearchNext_clicked );
|
connect( ftsSearchPanel->next, &QPushButton::clicked, this, &ArticleView::on_ftsSearchNext_clicked );
|
||||||
|
@ -1963,8 +1963,11 @@ void ArticleView::on_searchCloseButton_clicked()
|
||||||
closeSearch();
|
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 );
|
performFindOperation( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2027,11 +2030,6 @@ void ArticleView::performFindOperation( bool backwards )
|
||||||
|
|
||||||
findText( text, f, [ text, this ]( bool match ) {
|
findText( text, f, [ text, this ]( bool match ) {
|
||||||
bool nomatch = !text.isEmpty() && !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 );
|
Utils::Widget::setNoResultColor( searchPanel->lineEdit, nomatch );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
|
@ -357,7 +357,7 @@ private slots:
|
||||||
void on_searchText_textEdited();
|
void on_searchText_textEdited();
|
||||||
void on_searchText_returnPressed();
|
void on_searchText_returnPressed();
|
||||||
void on_searchCloseButton_clicked();
|
void on_searchCloseButton_clicked();
|
||||||
void on_searchCaseSensitive_clicked();
|
void on_searchCaseSensitive_clicked( bool );
|
||||||
|
|
||||||
void on_ftsSearchPrevious_clicked();
|
void on_ftsSearchPrevious_clicked();
|
||||||
void on_ftsSearchNext_clicked();
|
void on_ftsSearchNext_clicked();
|
||||||
|
|
Loading…
Reference in a new issue