aboutsummaryrefslogtreecommitdiff
path: root/src/webengine
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-09-29 14:56:39 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-09-29 14:56:39 +0200
commit9abf7a9690163737d3e70b3b52d814135858d0d5 (patch)
tree037b1d3a12115221182cb283c14736229c52a8d8 /src/webengine
parentUpdate repository path in license headers (diff)
downloadsmolbote-9abf7a9690163737d3e70b3b52d814135858d0d5.tar.xz
ProfileManager: move initial profile loading to ProfileManager
Diffstat (limited to 'src/webengine')
-rw-r--r--src/webengine/webview.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/webengine/webview.cpp b/src/webengine/webview.cpp
index c2c0f75..f8be48e 100644
--- a/src/webengine/webview.cpp
+++ b/src/webengine/webview.cpp
@@ -22,6 +22,7 @@
#include <QWidgetAction>
#include <web/profilemanager.h>
#include <web/webprofile.h>
+#include "browser.h"
inline QAction *historyAction(QWebEngineView *view, const QWebEngineHistoryItem &item)
{
@@ -243,6 +244,7 @@ void WebView::contextMenuEvent(QContextMenuEvent *event)
createWindow(QWebEnginePage::WebBrowserTab)->load(ctxdata.linkUrl());
});
+ auto *profileManager = dynamic_cast<Browser *>(qApp)->getProfileManager();
QMenu *newTabMenu = profileManager->createProfileMenu([this, ctxdata](WebProfile *profile) {
auto *view = this->createWindow(QWebEnginePage::WebBrowserTab);
view->setProfile(profile);