aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow/widgets/searchform.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-04-17 17:43:38 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-04-17 17:43:38 +0200
commite4ffd8374040d36c22125eeb534d884f56978592 (patch)
tree1917ed64bf8e6e391ebf46de79a6fea41e0dcf68 /src/mainwindow/widgets/searchform.cpp
parentHovering over links shows them in the status bar again (diff)
downloadsmolbote-e4ffd8374040d36c22125eeb534d884f56978592.tar.xz
Style pass
Diffstat (limited to 'src/mainwindow/widgets/searchform.cpp')
-rw-r--r--src/mainwindow/widgets/searchform.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mainwindow/widgets/searchform.cpp b/src/mainwindow/widgets/searchform.cpp
index 79cc0cf..b400079 100644
--- a/src/mainwindow/widgets/searchform.cpp
+++ b/src/mainwindow/widgets/searchform.cpp
@@ -8,8 +8,8 @@
#include "searchform.h"
#include "ui_searchform.h"
-#include <QWebEngineView>
#include <QFocusEvent>
+#include <QWebEngineView>
SearchForm::SearchForm(QWidget *parent)
: QWidget(parent)
@@ -22,12 +22,12 @@ SearchForm::SearchForm(QWidget *parent)
connect(ui->lineEdit, &QLineEdit::returnPressed, this, [this]() {
if(view) {
- QWebEnginePage::FindFlags searchFlags;
- searchFlags.setFlag(QWebEnginePage::FindCaseSensitively, ui->caseSensitivity_checkBox->isChecked());
- searchFlags.setFlag(QWebEnginePage::FindBackward, ui->reverseSearch_checkBox->isChecked());
- view->findText(ui->lineEdit->text(), searchFlags, [this](bool found) {
- ui->result_label->setVisible(!found);
- });
+ QWebEnginePage::FindFlags searchFlags;
+ searchFlags.setFlag(QWebEnginePage::FindCaseSensitively, ui->caseSensitivity_checkBox->isChecked());
+ searchFlags.setFlag(QWebEnginePage::FindBackward, ui->reverseSearch_checkBox->isChecked());
+ view->findText(ui->lineEdit->text(), searchFlags, [this](bool found) {
+ ui->result_label->setVisible(!found);
+ });
}
});
}
@@ -37,19 +37,19 @@ SearchForm::~SearchForm()
delete ui;
}
-void SearchForm::setView(QWebEngineView* view)
+void SearchForm::setView(QWebEngineView *view)
{
this->view = view;
}
-void SearchForm::showEvent(QShowEvent* e)
+void SearchForm::showEvent(QShowEvent *e)
{
e->accept();
ui->lineEdit->setFocus();
ui->lineEdit->selectAll();
}
-void SearchForm::hideEvent(QHideEvent* e)
+void SearchForm::hideEvent(QHideEvent *e)
{
e->accept();
// clear highlighted text when hiding