From 3323b83af3bc0cd4feff0e0463718e77d4eabef7 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Wed, 20 Dec 2017 12:53:40 +0100 Subject: Can now open links in new tab --- src/widgets/mainwindowtabbar.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/widgets/mainwindowtabbar.cpp') diff --git a/src/widgets/mainwindowtabbar.cpp b/src/widgets/mainwindowtabbar.cpp index e7209c4..9991043 100644 --- a/src/widgets/mainwindowtabbar.cpp +++ b/src/widgets/mainwindowtabbar.cpp @@ -112,7 +112,7 @@ QSize MainWindowTabBar::tabSizeHint(int index) const void MainWindowTabBar::handleCurrentChanged(int index) { if(index < 0) { - addTab(createWebView(m_parent->profile()->homepage(), m_parent->profile())); + addTab(createWebView(m_parent->profile()->homepage(), m_parent->profile(), m_parent)); return; } @@ -141,9 +141,9 @@ void MainWindowTabBar::updateVectorArrangement(int from, int to) m_views.move(from, to); } -WebView *createWebView(const QUrl &url, WebEngineProfile *profile) +WebView *createWebView(const QUrl &url, WebEngineProfile *profile, MainWindow *parent) { - WebView *view = new WebView(nullptr); + WebView *view = new WebView(parent); QWebEnginePage *page = new QWebEnginePage(profile); view->setPage(page); page->load(url); -- cgit v1.2.1