diff options
Diffstat (limited to 'src/mainwindow')
-rw-r--r-- | src/mainwindow/mainwindow.cpp | 20 | ||||
-rw-r--r-- | src/mainwindow/mainwindow.h | 2 | ||||
-rw-r--r-- | src/mainwindow/subwindow.cpp | 2 | ||||
-rw-r--r-- | src/mainwindow/widgets/dockwidget.h | 2 | ||||
-rw-r--r-- | src/mainwindow/widgets/searchform.cpp | 2 | ||||
-rw-r--r-- | src/mainwindow/widgets/tabwidget.cpp | 2 |
6 files changed, 14 insertions, 16 deletions
diff --git a/src/mainwindow/mainwindow.cpp b/src/mainwindow/mainwindow.cpp index 2b6eb07..e885513 100644 --- a/src/mainwindow/mainwindow.cpp +++ b/src/mainwindow/mainwindow.cpp @@ -8,14 +8,16 @@ #include "mainwindow.h" #include "addressbar/addressbar.h" +#include "browser.h" +#include "subwindow.h" #include "webengine/webview.h" +#include "widgets/dockwidget.h" #include "widgets/navigationbar.h" #include "widgets/searchform.h" -#include "subwindow.h" -#include "browser.h" #include <QApplication> #include <QCloseEvent> -#include "widgets/dockwidget.h" +#include <QJsonArray> +#include <QJsonObject> #include <QLineEdit> #include <QMdiArea> #include <QMdiSubWindow> @@ -26,9 +28,6 @@ #include <QToolBar> #include <QUrl> #include <configuration/configuration.h> -#include <QJsonObject> -#include <QJsonArray> -#include "browser.h" #ifdef PLASMA_BLUR #include <KWindowEffects> @@ -113,7 +112,6 @@ MainWindow::MainWindow(std::shared_ptr<Configuration> &config, QWidget *parent) } }); - // search box auto *searchShortcut = new QShortcut(QKeySequence(config->value<std::string>("mainwindow.shortcuts.search").value().c_str()), this); connect(searchShortcut, &QShortcut::activated, this, [=]() { @@ -147,17 +145,19 @@ void MainWindow::createMenuBar() auto *smolboteMenu = menuBar()->addMenu(qApp->applicationDisplayName()); smolboteMenu->addAction(tr("New subwindow"), this, [this]() { createSubWindow(); - }, QKeySequence(m_config->value<std::string>("mainwindow.shortcuts.newGroup").value().c_str())); + }, + QKeySequence(m_config->value<std::string>("mainwindow.shortcuts.newGroup").value().c_str())); smolboteMenu->addAction(tr("New window"), this, []() { auto *browser = qobject_cast<Browser *>(qApp); if(browser) browser->createWindow(); - }, QKeySequence(m_config->value<std::string>("mainwindow.shortcuts.newWindow").value().c_str())); + }, + QKeySequence(m_config->value<std::string>("mainwindow.shortcuts.newWindow").value().c_str())); smolboteMenu->addSeparator(); - smolboteMenu->addAction(tr("About"), qobject_cast<Browser*>(qApp), &Browser::about, QKeySequence(m_config->value<std::string>("mainwindow.shortcuts.about").value().c_str())); + smolboteMenu->addAction(tr("About"), qobject_cast<Browser *>(qApp), &Browser::about, QKeySequence(m_config->value<std::string>("mainwindow.shortcuts.about").value().c_str())); smolboteMenu->addAction(tr("About Qt"), qApp, &QApplication::aboutQt); smolboteMenu->addSeparator(); diff --git a/src/mainwindow/mainwindow.h b/src/mainwindow/mainwindow.h index 30d2178..7974806 100644 --- a/src/mainwindow/mainwindow.h +++ b/src/mainwindow/mainwindow.h @@ -10,8 +10,8 @@ #define SMOLBOTE_MAINWINDOW_H #include <QMainWindow> -#include <memory> #include <QUrl> +#include <memory> class Browser; class QMdiArea; diff --git a/src/mainwindow/subwindow.cpp b/src/mainwindow/subwindow.cpp index c282dd9..2b9cd48 100644 --- a/src/mainwindow/subwindow.cpp +++ b/src/mainwindow/subwindow.cpp @@ -8,7 +8,6 @@ #include "subwindow.h" #include "browser.h" -#include <webprofile.h> #include "webengine/webview.h" #include "widgets/tabwidget.h" #include <QAction> @@ -19,6 +18,7 @@ #include <QShortcut> #include <QStyle> #include <QToolButton> +#include <webprofile.h> SubWindow::SubWindow(const QHash<QString, QString> &config, QWidget *parent, Qt::WindowFlags flags) : QMdiSubWindow(parent, flags) diff --git a/src/mainwindow/widgets/dockwidget.h b/src/mainwindow/widgets/dockwidget.h index 35a4cc7..c570ca0 100644 --- a/src/mainwindow/widgets/dockwidget.h +++ b/src/mainwindow/widgets/dockwidget.h @@ -11,13 +11,11 @@ #include <QDockWidget> - class DockWidget : public QDockWidget { public: DockWidget(const QString &title, QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags()); ~DockWidget(); - }; #endif // SMOLBOTE_DOCKWIDGET_H diff --git a/src/mainwindow/widgets/searchform.cpp b/src/mainwindow/widgets/searchform.cpp index c6038ff..efdb4ba 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 <QShowEvent> #include <QHideEvent> +#include <QShowEvent> #include <QWebEngineView> SearchForm::SearchForm(QWidget *parent) diff --git a/src/mainwindow/widgets/tabwidget.cpp b/src/mainwindow/widgets/tabwidget.cpp index 22e3f9a..1ddfc95 100644 --- a/src/mainwindow/widgets/tabwidget.cpp +++ b/src/mainwindow/widgets/tabwidget.cpp @@ -7,12 +7,12 @@ */ #include "tabwidget.h" +#include "browser.h" #include "webengine/webview.h" #include <QAction> #include <QContextMenuEvent> #include <QMenu> #include <QTabBar> -#include "browser.h" #include <webprofile.h> TabWidget::TabWidget(QWidget *parent) |