summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2013-03-14 17:37:04 +0100
committerAndrea Diamantini <adjam7@gmail.com>2013-03-14 17:37:04 +0100
commit4c7fc6692b94c1239114801d07b59fd428a585f5 (patch)
treec4c9f3e91d47feed33b1e01ad7b692cdcf0d4601
parentReverting changes in sslinfodialog as discussed with kdepepo. (diff)
downloadrekonq-4c7fc6692b94c1239114801d07b59fd428a585f5.tar.xz
Restore Session Manager updates on current tab changed && on window
close. Lindsay, I probably "forgot" one your mail about Session Management NOT working properly (sorry). Hope this will fix it! Let me know :) CCMAIL: lindsay.mathieson@gmail.com
-rw-r--r--src/application.cpp3
-rw-r--r--src/autosaver.cpp4
-rw-r--r--src/tabwindow/tabwidget.cpp3
3 files changed, 5 insertions, 5 deletions
diff --git a/src/application.cpp b/src/application.cpp
index 002f19d1..a2d428d7 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -495,6 +495,7 @@ bool Application::eventFilter(QObject* watched, QEvent* event)
RekonqWindow *window = qobject_cast<RekonqWindow*>(watched);
if (window)
{
+ SessionManager::self()->saveSession();
m_rekonqWindows.removeOne(window);
#ifdef HAVE_KACTIVITIES
QString currentActivity = m_activityConsumer->currentActivity();
@@ -714,7 +715,7 @@ void Application::queryQuit()
}
}
- // in case of just one window...
+ SessionManager::self()->setSessionManagementEnabled(false);
quit();
}
diff --git a/src/autosaver.cpp b/src/autosaver.cpp
index ee84e299..8459884b 100644
--- a/src/autosaver.cpp
+++ b/src/autosaver.cpp
@@ -36,8 +36,8 @@
#include <QTime>
-const int AUTOSAVE_TIME = 1000 * 3; // seconds
-const int MAX_TIME_LIMIT = 1000 * 15; // seconds
+const int AUTOSAVE_TIME = 1000 * 2; // seconds
+const int MAX_TIME_LIMIT = 1000 * 5; // seconds
AutoSaver::AutoSaver(QObject *parent)
diff --git a/src/tabwindow/tabwidget.cpp b/src/tabwindow/tabwidget.cpp
index 9494fad4..d74f0778 100644
--- a/src/tabwindow/tabwidget.cpp
+++ b/src/tabwindow/tabwidget.cpp
@@ -188,6 +188,7 @@ void TabWidget::init()
_addTabButton->setToolButtonStyle(Qt::ToolButtonIconOnly);
connect(this, SIGNAL(currentChanged(int)), this, SLOT(currentChanged(int)));
+ connect(this, SIGNAL(currentChanged(int)), SessionManager::self(), SLOT(saveSession()));
// ----------------------------------------------------------------------------------------------
RekonqWindow *rw = qobject_cast<RekonqWindow *>(parent());
@@ -398,8 +399,6 @@ void TabWidget::pageCreated(WebPage *page)
void TabWidget::currentChanged(int newIndex)
{
- _lastCurrentTabIndex = newIndex;
-
_openedTabsCounter = 0;
tabBar()->setTabHighlighted(newIndex, false);