aboutsummaryrefslogtreecommitdiff
path: root/src/webengine
diff options
context:
space:
mode:
Diffstat (limited to 'src/webengine')
-rw-r--r--src/webengine/webview.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/webengine/webview.cpp b/src/webengine/webview.cpp
index 3861306..5e350eb 100644
--- a/src/webengine/webview.cpp
+++ b/src/webengine/webview.cpp
@@ -20,7 +20,7 @@
#include <QWebEngineContextMenuData>
#include <QWebEngineHistoryItem>
#include <QWidgetAction>
-#include "profilemanager.h"
+#include "webprofilemanager.h"
#include "webprofile.h"
#include "browser.h"
#include "wallet/wallet.h"
@@ -247,15 +247,12 @@ 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 *newTabMenu = menu->addMenu(tr("Open link in new tab with profile"));
+ dynamic_cast<Browser*>(qApp)->getProfileManager()->profileMenu(newTabMenu, [this, ctxdata](WebProfile *profile) {
auto *view = this->createWindow(QWebEnginePage::WebBrowserTab);
view->setProfile(profile);
view->load(ctxdata.linkUrl());
- },
- this);
- newTabMenu->setTitle(tr("Open link in new tab with profile"));
- menu->addMenu(newTabMenu);
+ });
connect(menu->addAction(tr("Open link in new window")), &QAction::triggered, this, [this, ctxdata]() {
createWindow(QWebEnginePage::WebBrowserWindow)->load(ctxdata.linkUrl());