From 8302ea16430afc414807c5251f04f129172e8995 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Thu, 13 Oct 2011 00:58:30 +0200 Subject: Fix crash on private mode store/restore This commit, while does not perfectly fix the issue, "workaround" it a lot to fix crashes on private mode enter/exit - improve session store/restore - improve session manager code - calm down kDebug messages - applies code style CCBUG: 268328 --- src/sessionmanager.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/sessionmanager.h') diff --git a/src/sessionmanager.h b/src/sessionmanager.h index ae6caaa2..d0d7efde 100644 --- a/src/sessionmanager.h +++ b/src/sessionmanager.h @@ -42,7 +42,7 @@ class TabHistory; /** - * Session Management + * Session Management: Needs clean up :) */ class REKONQ_TESTS_EXPORT SessionManager : public QObject { @@ -52,21 +52,32 @@ public: inline void setSessionManagementEnabled(bool on) { - m_safe = on; + m_isSessionEnabled = on; } QList closedSites(); + // This method restores session + // while turning back from Private mode + int restoreSavedSession(); + public Q_SLOTS: + // This method restores session + // on restart when restore at startup is chosen bool restoreSessionFromScratch(); private Q_SLOTS: void saveSession(); + + // This method restores session + // after a crash void restoreCrashedSession(); private: QString m_sessionFilePath; + bool m_safe; + bool m_isSessionEnabled; }; -- cgit v1.2.1