aboutsummaryrefslogtreecommitdiff
path: root/src/WindowMediator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/WindowMediator.cpp')
-rw-r--r--src/WindowMediator.cpp4
1 files changed, 4 insertions, 0 deletions
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 <QList>
#include <QWidget>
#include <QtCore>
+#include <qwebengineprofile.h>
#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);