diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-05-29 17:13:13 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-05-29 17:13:13 +0200 |
commit | c2557c6cd825dd881137c576db867f7f311ec791 (patch) | |
tree | 8eba50c91fde7645b0cdd56b95590f8233012979 /src/webengine | |
parent | Update quickstart (diff) | |
download | smolbote-c2557c6cd825dd881137c576db867f7f311ec791.tar.xz |
Refactor Subwindow
Diffstat (limited to 'src/webengine')
-rw-r--r-- | src/webengine/webview.cpp | 6 | ||||
-rw-r--r-- | src/webengine/webview.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/webengine/webview.cpp b/src/webengine/webview.cpp index d5f88d0..c6fd4a4 100644 --- a/src/webengine/webview.cpp +++ b/src/webengine/webview.cpp @@ -7,7 +7,7 @@ */ #include "webview.h" -#include "mainwindow/window.h" +#include "mainwindow/subwindow.h" #include "webpage.h" #include "webprofile.h" #include "widgets/pagemenu.h" @@ -23,7 +23,7 @@ WebView::WebView(WebProfile *profile, QWidget *parent) m_profile = profile; setPage(new WebPage(profile, this)); - m_parentWindow = qobject_cast<Window *>(parent); + m_parentWindow = qobject_cast<SubWindow *>(parent); // load status and progress connect(this, &QWebEngineView::loadStarted, this, [this]() { @@ -86,7 +86,7 @@ WebView *WebView::createWindow(QWebEnginePage::WebWindowType type) case QWebEnginePage::WebBrowserTab: // a web browser tab - m_parentWindow->swapToTab(index); + m_parentWindow->setCurrentTab(index); break; case QWebEnginePage::WebDialog: diff --git a/src/webengine/webview.h b/src/webengine/webview.h index 378296e..4d648d7 100644 --- a/src/webengine/webview.h +++ b/src/webengine/webview.h @@ -14,7 +14,7 @@ class QMenu; class WebProfile; -class Window; +class SubWindow; class WebView : public QWebEngineView { Q_OBJECT @@ -57,7 +57,7 @@ protected: WebView *createWindow(QWebEnginePage::WebWindowType type) override; private: - Window *m_parentWindow = nullptr; + SubWindow *m_parentWindow = nullptr; WebProfile *m_profile = nullptr; QMenu *m_pageMenu = nullptr; |