diff options
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/mainwindowtabbar.cpp | 6 | ||||
-rw-r--r-- | src/widgets/mainwindowtabbar.h | 2 |
2 files changed, 4 insertions, 4 deletions
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); diff --git a/src/widgets/mainwindowtabbar.h b/src/widgets/mainwindowtabbar.h index c8ccfb4..67f51e0 100644 --- a/src/widgets/mainwindowtabbar.h +++ b/src/widgets/mainwindowtabbar.h @@ -50,6 +50,6 @@ private: MainWindow *m_parent; }; -WebView *createWebView(const QUrl &url, WebEngineProfile *profile); +WebView *createWebView(const QUrl &url, WebEngineProfile *profile, MainWindow *parent); #endif // WEBVIEWTABBAR_H |