aboutsummaryrefslogtreecommitdiff
path: root/src/mainwindow/subwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow/subwindow.cpp')
-rw-r--r--src/mainwindow/subwindow.cpp19
1 files changed, 4 insertions, 15 deletions
diff --git a/src/mainwindow/subwindow.cpp b/src/mainwindow/subwindow.cpp
index 2b9cd48..cbfe46a 100644
--- a/src/mainwindow/subwindow.cpp
+++ b/src/mainwindow/subwindow.cpp
@@ -52,19 +52,6 @@ SubWindow::SubWindow(const QHash<QString, QString> &config, QWidget *parent, Qt:
profileName_action->setText(tr("Profile: %1").arg(name));
});
}
-
-#ifdef QT_DEBUG
- menu->addSeparator();
- menu->addAction(tr("Debug menu"))->setEnabled(false);
- auto *saveSession_action = menu->addAction(tr("Save session"));
- menu->addAction(tr("Load session"))->setEnabled(false);
- setSystemMenu(menu);
-
- connect(saveSession_action, &QAction::triggered, [this]() {
- QJsonDocument doc(session());
- qDebug("%s", qUtf8Printable(doc.toJson()));
- });
-#endif
}
// new tab button
@@ -162,13 +149,15 @@ void SubWindow::setCurrentTab(int index)
QJsonObject SubWindow::session() const
{
QJsonObject obj;
- obj.insert("profile", QJsonValue(""));
+ obj.insert("profile", profile->id());
QJsonArray tabs;
for(int i = 0; i < tabWidget->count(); ++i) {
auto *view = qobject_cast<WebView *>(tabWidget->widget(i));
if(view) {
- tabs.append(view->url().toString());
+ QJsonObject tab;
+ tab.insert(view->url().toString(), view->profile()->id());
+ tabs.append(tab);
}
}
obj.insert("tabs", tabs);