aboutsummaryrefslogtreecommitdiff
path: root/src/widgets/BrowserWindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/BrowserWindow.cpp')
-rw-r--r--src/widgets/BrowserWindow.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/widgets/BrowserWindow.cpp b/src/widgets/BrowserWindow.cpp
index dbefdd6..5a8a062 100644
--- a/src/widgets/BrowserWindow.cpp
+++ b/src/widgets/BrowserWindow.cpp
@@ -21,8 +21,13 @@ BrowserWindow::BrowserWindow(const Configuration &configuration, const QStringLi
layout->setStackingMode(QStackedLayout::StackAll);
centralWidget()->setLayout(layout);
+ // Webengine profile
+ auto *profile = new QWebEngineProfile("null-browser");
+ profile->setDownloadPath(configuration.downloads_dir());
+ profile->setHttpUserAgent(configuration.user_agent());
+
// Web engine
- auto *webview_stack = new WebViewStack(&configuration, new QWebEngineProfile("null-browser"));
+ auto *webview_stack = new WebViewStack(&configuration, profile);
layout->addWidget(webview_stack);
// Open webviews for given urls