aboutsummaryrefslogtreecommitdiff
path: root/src/subwindow
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-11-28 16:31:48 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2018-11-28 16:31:48 +0100
commitf0a7c1760a0186ebfb7d80da34d6675b6d987303 (patch)
tree5a20e7618f093c13cbc7ba844d37fe4066a5ba48 /src/subwindow
parentRewrite Session saving and loading (diff)
downloadsmolbote-f0a7c1760a0186ebfb7d80da34d6675b6d987303.tar.xz
Remove old session code
Diffstat (limited to 'src/subwindow')
-rw-r--r--src/subwindow/subwindow.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/subwindow/subwindow.cpp b/src/subwindow/subwindow.cpp
index 1006200..0844f1f 100644
--- a/src/subwindow/subwindow.cpp
+++ b/src/subwindow/subwindow.cpp
@@ -159,7 +159,9 @@ int SubWindow::tabCount() const
void SubWindow::setProfile(WebProfile *profile)
{
- Q_CHECK_PTR(profile);
+ if(profile == nullptr)
+ return;
+
this->m_profile = profile;
for(int i = 0; i < tabWidget->count(); ++i) {
auto *view = qobject_cast<WebView *>(tabWidget->widget(i));
@@ -174,6 +176,8 @@ WebProfile *SubWindow::profile() const
int SubWindow::addTab(const QUrl &url, WebProfile *profile)
{
+ Q_CHECK_PTR(m_profile);
+
auto *view = new WebView((profile == nullptr) ? m_profile : profile, this);
if(!url.isEmpty())
view->load(url);