diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-06-26 19:51:52 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2018-06-26 19:51:52 +0200 |
commit | 5825451aef1a762bfaeff2d37c09b3790deee7b1 (patch) | |
tree | 75feca7f6483e25d9bd920645e6044d3bb22966b /src/mainwindow/mainwindow.cpp | |
parent | Update pkgbuild (diff) | |
download | smolbote-5825451aef1a762bfaeff2d37c09b3790deee7b1.tar.xz |
Socket messages are json formatted
Diffstat (limited to 'src/mainwindow/mainwindow.cpp')
-rw-r--r-- | src/mainwindow/mainwindow.cpp | 11 |
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); |