diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2019-01-02 21:44:25 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2019-01-02 21:44:25 +0100 |
commit | 9e75098d885aafe79ff3cec5ed114938d60ccb2e (patch) | |
tree | 3a5f7d3361a17c8449f2c607c672816939d81539 /src | |
parent | Connect Developer Tools and View Source actions (diff) | |
download | smolbote-9e75098d885aafe79ff3cec5ed114938d60ccb2e.tar.xz |
Update license year
Diffstat (limited to 'src')
-rw-r--r-- | src/mainwindow/widgets/navigationbar.cpp | 3 | ||||
-rw-r--r-- | src/webengine/webview.cpp | 12 | ||||
-rw-r--r-- | src/webengine/webview.h | 7 |
3 files changed, 2 insertions, 20 deletions
diff --git a/src/mainwindow/widgets/navigationbar.cpp b/src/mainwindow/widgets/navigationbar.cpp index c56d342..e77ce6d 100644 --- a/src/mainwindow/widgets/navigationbar.cpp +++ b/src/mainwindow/widgets/navigationbar.cpp @@ -18,6 +18,7 @@ #include <QToolBar> #include <QToolButton> #include <QWebEngineHistory> +#include "webprofile.h" NavigationBar::NavigationBar(const Configuration *config, QWidget *parent) : QToolBar(parent) @@ -97,7 +98,7 @@ NavigationBar::NavigationBar(const Configuration *config, QWidget *parent) homeAction = addAction(Util::icon(QStyle::SP_DirHomeIcon), tr("Home")); config->setShortcut(homeAction, "navigation.shortcuts.home"); connect(homeAction, &QAction::triggered, this, [this]() { - m_view->triggerViewAction(WebView::GoHome); + m_view->load(m_view->profile()->homepage()); }); } diff --git a/src/webengine/webview.cpp b/src/webengine/webview.cpp index 2e90b23..3861306 100644 --- a/src/webengine/webview.cpp +++ b/src/webengine/webview.cpp @@ -304,15 +304,3 @@ void WebView::contextMenuEvent(QContextMenuEvent *event) menu->setMinimumWidth(250); menu->exec(event->globalPos()); } - -void WebView::triggerViewAction(WebView::ViewAction action) -{ - switch(action) { - case GoHome: - load(m_profile->homepage()); - break; - case BookmarkPage: - emit newBookmark(this->title(), this->url()); - break; - } -} diff --git a/src/webengine/webview.h b/src/webengine/webview.h index 8d320b9..6fcbe3a 100644 --- a/src/webengine/webview.h +++ b/src/webengine/webview.h @@ -18,11 +18,6 @@ class WebView : public QWebEngineView { Q_OBJECT public: - enum ViewAction { - GoHome, - BookmarkPage - }; - explicit WebView(WebProfile *profile = nullptr, QWidget *parent = nullptr); ~WebView() = default; @@ -34,8 +29,6 @@ public: bool isLoaded() const; - void triggerViewAction(ViewAction action); - public slots: void search(const QString &term); |