aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow')
-rw-r--r--src/mainwindow/mainwindow.cpp6
-rw-r--r--src/mainwindow/widgets/searchform.cpp20
2 files changed, 13 insertions, 13 deletions
diff --git a/src/mainwindow/mainwindow.cpp b/src/mainwindow/mainwindow.cpp
index 18e1b63..c43e001 100644
--- a/src/mainwindow/mainwindow.cpp
+++ b/src/mainwindow/mainwindow.cpp
@@ -7,8 +7,10 @@
*/
#include "mainwindow.h"
+#include "addressbar/addressbar.h"
#include "webengine/webview.h"
#include "widgets/navigationbar.h"
+#include "widgets/searchform.h"
#include "window.h"
#include <QApplication>
#include <QCloseEvent>
@@ -19,13 +21,11 @@
#include <QMenuBar>
#include <QMessageBox>
#include <QShortcut>
+#include <QStatusBar>
#include <QToolBar>
#include <QUrl>
#include <about/aboutdialog.h>
#include <configuration/configuration.h>
-#include "addressbar/addressbar.h"
-#include <QStatusBar>
-#include "widgets/searchform.h"
MainWindow::MainWindow(std::shared_ptr<Configuration> &config, QWidget *parent)
: QMainWindow(parent)
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