aboutsummaryrefslogtreecommitdiff
path: root/src/webengine
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-05-28 12:32:34 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-05-28 12:32:34 +0200
commit7665ed207b67eeebde62d243c96f12054e884a4d (patch)
tree4108cc6a5c9cd19aa723af129255095024753ba7 /src/webengine
parentShow profile name in window title (diff)
downloadsmolbote-7665ed207b67eeebde62d243c96f12054e884a4d.tar.xz
Show view profile instead of window profile in title
Diffstat (limited to 'src/webengine')
-rw-r--r--src/webengine/webview.cpp8
-rw-r--r--src/webengine/webview.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/webengine/webview.cpp b/src/webengine/webview.cpp
index 686a689..d5f88d0 100644
--- a/src/webengine/webview.cpp
+++ b/src/webengine/webview.cpp
@@ -50,6 +50,14 @@ WebView::~WebView()
delete m_pageMenu;
}
+void WebView::setProfile(WebProfile *profile)
+{
+ m_profile = profile;
+ const auto url = this->url();
+ setPage(new WebPage(profile, this));
+ this->load(url);
+}
+
bool WebView::isLoaded() const
{
return m_loaded;
diff --git a/src/webengine/webview.h b/src/webengine/webview.h
index 78ea80d..378296e 100644
--- a/src/webengine/webview.h
+++ b/src/webengine/webview.h
@@ -41,6 +41,7 @@ public:
WebProfile *profile() {
return m_profile;
}
+ void setProfile(WebProfile *profile);
bool isLoaded() const;