From bbe50215cbb9078ba457f93a5e90096e844c611a Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Sat, 12 Apr 2025 19:35:54 +0530 Subject: Add user agent configuration --- src/WindowMediator.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/WindowMediator.cpp') diff --git a/src/WindowMediator.cpp b/src/WindowMediator.cpp index 942207d..a2ff2a6 100644 --- a/src/WindowMediator.cpp +++ b/src/WindowMediator.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include "WindowMediator.hpp" #include "widgets/WebViewStack.hpp" @@ -15,6 +16,9 @@ WindowMediator::WindowMediator(WebViewStack *webview_stack) : webview_stack(webv connect(this, &WindowMediator::webview_closed, webview_stack, &WebViewStack::close); connect(this, &WindowMediator::webview_selected, webview_stack, &WebViewStack::focus_webview); + auto *profile = webview_stack->get_profile(); + connect(this, &WindowMediator::set_user_agent, profile, &QWebEngineProfile::setHttpUserAgent); + // Delegate signal connect(webview_stack, &WebViewStack::new_window_requested, this, &WindowMediator::new_window_requested); -- cgit v1.3.1