summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index c0085d50..a09fb866 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -46,6 +46,7 @@
#include "historypanel.h"
#include "iconmanager.h"
#include "mainview.h"
+#include "sessionmanager.h"
#include "settingsdialog.h"
#include "stackedurlbar.h"
#include "tabbar.h"
@@ -322,6 +323,9 @@ void MainWindow::postLaunch()
// Ctrl + wheel handling
connect(this->currentTab()->view(), SIGNAL(zoomChanged(int)), m_zoomBar, SLOT(setValue(int)));
+ // Save session when last window is closed
+ connect(this, SIGNAL(lastWindowClosed()), rApp->sessionManager(), SLOT(saveSession()));
+
// setting up toolbars to NOT have context menu enabled
setContextMenuPolicy(Qt::DefaultContextMenu);
@@ -1563,6 +1567,7 @@ bool MainWindow::queryClose()
return false;
}
}
+ emit lastWindowClosed();
return true;
}