From f47e32c5d0451308d5f0ff99e31397bd8ce53f73 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sun, 2 Jul 2017 14:36:54 +0200 Subject: Added homepage button --- src/widgets/webviewtabbar.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/widgets/webviewtabbar.cpp') diff --git a/src/widgets/webviewtabbar.cpp b/src/widgets/webviewtabbar.cpp index 4d3a859..bd24304 100644 --- a/src/widgets/webviewtabbar.cpp +++ b/src/widgets/webviewtabbar.cpp @@ -172,5 +172,18 @@ void WebViewTabBar::updateVectorArrangement(int from, int to) void WebViewTabBar::webAction(int action) { - currentView()->pageAction(static_cast(action))->trigger(); + switch (action) { + case WebActions::Back: + currentView()->pageAction(QWebEnginePage::Back)->trigger(); + break; + case WebActions::Forward: + currentView()->pageAction(QWebEnginePage::Forward)->trigger(); + break; + case WebActions::Reload: + currentView()->pageAction(QWebEnginePage::Reload)->trigger(); + break; + case WebActions::Homepage: + currentView()->load(m_profile->homepage()); + break; + } } -- cgit v1.2.1