diff options
| author | Akshay Nair <phenax5@gmail.com> | 2025-07-25 16:24:20 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2025-07-25 16:24:20 +0530 |
| commit | 7e3b6182c4581fcb39ab1d0ef2eb07fe9fa1d8b6 (patch) | |
| tree | 13808a26ad4e1f948d7fe0c042a2bdedb2658ee4 /src/WindowMediator.cpp | |
| parent | 43f3261635e1667367cfd31a2f746832e94c3957 (diff) | |
| download | null-browser-7e3b6182c4581fcb39ab1d0ef2eb07fe9fa1d8b6.tar.gz null-browser-7e3b6182c4581fcb39ab1d0ef2eb07fe9fa1d8b6.zip | |
Remove window mediator class
Diffstat (limited to 'src/WindowMediator.cpp')
| -rw-r--r-- | src/WindowMediator.cpp | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/WindowMediator.cpp b/src/WindowMediator.cpp deleted file mode 100644 index fa9a25e..0000000 --- a/src/WindowMediator.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include <QList> -#include <QWidget> -#include <QtCore> -#include <qwebengineprofile.h> - -#include "WindowMediator.hpp" -#include "widgets/WebViewStack.hpp" - -WindowMediator::WindowMediator(WebViewStack *webview_stack) : webview_stack(webview_stack) { - connect(webview_stack, &WebViewStack::new_window_requested, this, - &WindowMediator::new_window_requested); - connect(webview_stack, &WebViewStack::close_window_requested, this, - &WindowMediator::close_window_requested); -} - -void WindowMediator::update_user_agent(const QString &user_agent) { - auto *profile = webview_stack->get_profile(); - profile->setHttpUserAgent(user_agent); -} - -void WindowMediator::update_downloads_dir(const QString &downloads_dir) { - auto *profile = webview_stack->get_profile(); - profile->setDownloadPath(downloads_dir); -} - -void WindowMediator::update_permissions_persistance(const QString &persistance) { - auto *profile = webview_stack->get_profile(); - auto persistance_policy = Configuration::to_permission_persistance_policy(persistance); - profile->setPersistentPermissionsPolicy(persistance_policy); -} - -WindowMediator::~WindowMediator() { - disconnect(this); - delete webview_stack; -} |
