diff options
author | Tirtha Chatterjee <tirtha.p.chatterjee@gmail.com> | 2011-08-11 13:09:39 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2011-08-11 13:09:39 +0200 |
commit | de060583b0e0c2faa44b1abbf792109676d8fdee (patch) | |
tree | 726298df749e53277277eeb146121d34da696660 | |
parent | Tools Action Menu (diff) | |
download | rekonq-de060583b0e0c2faa44b1abbf792109676d8fdee.tar.xz |
Update session file before last window is closed
Having 2 (or more) windows open and closing one did NOT update the
session file. Now it is :)
REVIEW: 101346
REVIEWED-BY: adjam
-rw-r--r-- | src/mainwindow.cpp | 5 | ||||
-rw-r--r-- | src/mainwindow.h | 2 |
2 files changed, 7 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; } diff --git a/src/mainwindow.h b/src/mainwindow.h index d8b5538e..908ff776 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -125,6 +125,8 @@ Q_SIGNALS: void triggerPartPrint(); void triggerPartFind(); + void lastWindowClosed(); + protected Q_SLOTS: void saveNewToolbarConfig(); |