diff options
author | aqua <aqua@iserlohn-fortress.net> | 2024-04-23 11:22:02 +0300 |
---|---|---|
committer | aqua <aqua@iserlohn-fortress.net> | 2024-04-23 11:38:55 +0300 |
commit | 3f72c39fb0e95d45d15bde64661040e920574a85 (patch) | |
tree | 49bde891396d92ecd61c3d833e071c897f1eabe2 /src/mainwindow/widgets | |
parent | Fix compile error with meson unstable-kconfig module (diff) | |
download | smolbote-3f72c39fb0e95d45d15bde64661040e920574a85.tar.xz |
Ported to qt6
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); }); } |