diff options
Diffstat (limited to 'src/session.cpp')
-rw-r--r-- | src/session.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/session.cpp b/src/session.cpp index e1f600a..9c69088 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -14,11 +14,25 @@ #include "webengine/webview.h" #include <web/profilemanager.h> + +QJsonObject JsonSession::session(QVector<MainWindow *> windows) +{ + QJsonObject obj; + + QJsonArray windowsArray; + for(const MainWindow *window : windows) { + windowsArray.append(Session::toJsonObject(window)); + } + obj.insert("windows", windowsArray); + + return obj; +} + Session::Session(QObject *parent) : QObject(parent) { } -QJsonObject Session::toJsonObject(MainWindow *window) +QJsonObject Session::toJsonObject(const MainWindow *window) { QJsonObject session; |