diff options
Diffstat (limited to 'src/mainwindow/widgets')
-rw-r--r-- | src/mainwindow/widgets/searchform.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mainwindow/widgets/searchform.cpp b/src/mainwindow/widgets/searchform.cpp index e10933b..af54f5c 100644 --- a/src/mainwindow/widgets/searchform.cpp +++ b/src/mainwindow/widgets/searchform.cpp @@ -10,6 +10,7 @@ #include "ui_searchform.h" #include <QHideEvent> #include <QShowEvent> +#include <QWebEngineFindTextResult> #include <QWebEngineView> SearchForm::SearchForm(QWidget *parent) @@ -26,7 +27,8 @@ SearchForm::SearchForm(QWidget *parent) QWebEnginePage::FindFlags searchFlags; searchFlags.setFlag(QWebEnginePage::FindCaseSensitively, ui->caseSensitivity_checkBox->isChecked()); searchFlags.setFlag(QWebEnginePage::FindBackward, ui->reverseSearch_checkBox->isChecked()); - m_view->findText(ui->lineEdit->text(), searchFlags, [this](bool found) { + m_view->findText(ui->lineEdit->text(), searchFlags, [this](const QWebEngineFindTextResult &result) { + const bool found = result.numberOfMatches() > 0; ui->result_label->setVisible(!found); }); } |