summaryrefslogtreecommitdiff
path: root/src/history/historymanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/history/historymanager.cpp')
-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;