aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mainwindow/widgets/navigationbar.cpp3
-rw-r--r--src/webengine/webview.cpp12
-rw-r--r--src/webengine/webview.h7
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);