aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow/mainwindow.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-06-26 19:51:52 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-06-26 19:51:52 +0200
commit5825451aef1a762bfaeff2d37c09b3790deee7b1 (patch)
tree75feca7f6483e25d9bd920645e6044d3bb22966b /src/mainwindow/mainwindow.cpp
parentUpdate pkgbuild (diff)
downloadsmolbote-5825451aef1a762bfaeff2d37c09b3790deee7b1.tar.xz
Socket messages are json formatted
Diffstat (limited to 'src/mainwindow/mainwindow.cpp')
-rw-r--r--src/mainwindow/mainwindow.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mainwindow/mainwindow.cpp b/src/mainwindow/mainwindow.cpp
index 07ac8f0..9a9b8e8 100644
--- a/src/mainwindow/mainwindow.cpp
+++ b/src/mainwindow/mainwindow.cpp
@@ -28,6 +28,7 @@
#include <QToolBar>
#include <QUrl>
#include <configuration/configuration.h>
+#include <webprofile.h>
#ifdef QT_DEBUG
#include "session.h"
@@ -267,6 +268,16 @@ SubWindow *MainWindow::currentSubWindow() const
return qobject_cast<SubWindow *>(mdiArea->currentSubWindow());
}
+SubWindow *MainWindow::createSubWindow(WebProfile *profile)
+{
+ auto *w = new SubWindow(m_config->section("window"), this);
+ w->setProfile(profile);
+ mdiArea->addSubWindow(w);
+ w->showMaximized();
+ w->setFocus();
+ return w;
+}
+
SubWindow *MainWindow::createSubWindow(const QString &url)
{
auto *w = new SubWindow(m_config->section("window"), this);