From 21144421de8f69190a250cf9fb88b26fb8e7d12c Mon Sep 17 00:00:00 2001 From: Martchus Date: Mon, 8 Apr 2024 18:07:27 +0200 Subject: [PATCH] Fix showing external links via built-in web view Pass profile to new web page (that is being created when a `target="blank"` link is clicked) to avoid running into `Can not adopt content from a different WebEngineProfile.`. --- syncthingwidgets/webview/webpage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncthingwidgets/webview/webpage.cpp b/syncthingwidgets/webview/webpage.cpp index c601544..711d6e9 100644 --- a/syncthingwidgets/webview/webpage.cpp +++ b/syncthingwidgets/webview/webpage.cpp @@ -107,7 +107,7 @@ bool WebPage::isSamePage(const QUrl &url1, const QUrl &url2) SYNCTHINGWIDGETS_WEB_PAGE *WebPage::createWindow(SYNCTHINGWIDGETS_WEB_PAGE::WebWindowType type) { Q_UNUSED(type) - return new WebPage; + return new WebPage(profile()); } #ifdef SYNCTHINGWIDGETS_USE_WEBENGINE