summaryrefslogtreecommitdiff
path: root/src/history
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-03-26 19:10:39 +0200
committerAndrea Diamantini <adjam7@gmail.com>2012-04-12 02:30:01 +0200
commit3f9a13565557c57f74441442520ab02626c8c3da (patch)
tree882aac9209f4393650bd055755bce6ce5f1d604e /src/history
parentConsider new PasswordSavingEnabled privacy check (diff)
downloadrekonq-3f9a13565557c57f74441442520ab02626c8c3da.tar.xz
clean up failed rebasing and implement history timed expire check
Diffstat (limited to 'src/history')
-rw-r--r--src/history/historymanager.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/history/historymanager.cpp b/src/history/historymanager.cpp
index c78bb009..11b55e84 100644
--- a/src/history/historymanager.cpp
+++ b/src/history/historymanager.cpp
@@ -82,6 +82,12 @@ HistoryManager::HistoryManager(QObject *parent)
HistoryManager::~HistoryManager()
{
+ if (ReKonfig::expireHistory() == 4)
+ {
+ m_history.clear();
+ save();
+ return;
+ }
m_saveTimer->saveIfNeccessary();
}
@@ -94,6 +100,9 @@ bool HistoryManager::historyContains(const QString &url) const
void HistoryManager::addHistoryEntry(const KUrl &url, const QString &title)
{
+ if (ReKonfig::expireHistory() == 5) // DON'T STORE HISTORY!
+ return;
+
QWebSettings *globalSettings = QWebSettings::globalSettings();
if (globalSettings->testAttribute(QWebSettings::PrivateBrowsingEnabled))
return;
@@ -259,21 +268,17 @@ void HistoryManager::loadSettings()
int days;
switch (historyExpire)
{
- case 0:
- days = 1;
- break;
case 1:
- days = 7;
+ days = 90;
break;
case 2:
- days = 14;
+ days = 30;
break;
case 3:
- days = 30;
+ days = 1;
break;
+ case 0:
case 4:
- days = 365;
- break;
case 5:
default:
days = -1;