summaryrefslogtreecommitdiff
path: root/src
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
parentConsider new PasswordSavingEnabled privacy check (diff)
downloadrekonq-3f9a13565557c57f74441442520ab02626c8c3da.tar.xz
clean up failed rebasing and implement history timed expire check
Diffstat (limited to 'src')
-rw-r--r--src/history/historymanager.cpp21
-rw-r--r--src/rekonq.kcfg71
-rw-r--r--src/settings/settings_privacy.ui14
-rw-r--r--src/settings/settingsdialog.cpp2
4 files changed, 41 insertions, 67 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;
diff --git a/src/rekonq.kcfg b/src/rekonq.kcfg
index 89d3b742..1fb3c1c4 100644
--- a/src/rekonq.kcfg
+++ b/src/rekonq.kcfg
@@ -39,6 +39,24 @@
<entry name="checkDefaultSearchEngine" type="Bool">
<default>true</default>
</entry>
+ <entry name="clearHistory" type="Bool">
+ <default>true</default>
+ </entry>
+ <entry name="clearDownloads" type="Bool">
+ <default>true</default>
+ </entry>
+ <entry name="clearCookies" type="Bool">
+ <default>true</default>
+ </entry>
+ <entry name="clearCachedPages" type="Bool">
+ <default>true</default>
+ </entry>
+ <entry name="clearWebIcons" type="Bool">
+ <default>true</default>
+ </entry>
+ <entry name="clearHomePageThumbs" type="Bool">
+ <default>true</default>
+ </entry>
</group>
@@ -164,24 +182,9 @@
<default>false</default>
</entry>
<entry name="expireHistory" type="Int">
- <default>1</default>
- </entry>
- <entry name="clearHistory" type="Bool">
- <default>true</default>
- </entry>
- <entry name="clearDownloads" type="Bool">
- <default>true</default>
- </entry>
- <entry name="clearCookies" type="Bool">
- <default>true</default>
- </entry>
- <entry name="clearCachedPages" type="Bool">
- <default>true</default>
- </entry>
- <entry name="clearWebIcons" type="Bool">
- <default>true</default>
+ <default>0</default>
</entry>
- <entry name="clearHomePageThumbs" type="Bool">
+ <entry name="passwordSavingEnabled" type="Bool">
<default>true</default>
</entry>
</group>
@@ -229,17 +232,6 @@
</group>
-<!-- Privacy Settings -->
-<group name="Privacy">
- <entry name="historyMaintainingPeriod" type="Int">
- <default>0</default>
- </entry>
- <entry name="passwordSavingEnabled" type="Bool">
- <default>true</default>
- </entry>
-</group>
-
-
<!-- Advanced Settings -->
<group name="Advanced">
<entry name="hScrollWheelHistory" type="Bool">
@@ -262,29 +254,6 @@
</entry>
</group>
-
-<!-- AdBlock Settings -->
-<group name="AdBlock">
- <entry name="adBlockEnabled" type="Bool">
- <default>false</default>
- </entry>
- <entry name="hideAdsEnabled" type="Bool">
- <default>false</default>
- </entry>
- <entry name="subscriptionTitles" type="StringList">
- <default>EasyList</default>
- </entry>
- <entry name="subscriptionLocations" type="StringList">
- <default>https://easylist-downloads.adblockplus.org/easylist.txt</default>
- </entry>
- <entry name="lastUpdate" type="DateTime">
- <default code="true">QDateTime(QDate(2009,03,13))</default>
- </entry>
- <entry name="updateInterval" type="Int">
- <default>7</default>
- </entry>
-</group>
-
<!-- Sync Settings -->
<group name="Sync">
diff --git a/src/settings/settings_privacy.ui b/src/settings/settings_privacy.ui
index 68245200..04f36bad 100644
--- a/src/settings/settings_privacy.ui
+++ b/src/settings/settings_privacy.ui
@@ -66,35 +66,35 @@
</widget>
</item>
<item>
- <widget class="QComboBox" name="kcfg_historyMaintainingPeriod">
+ <widget class="QComboBox" name="kcfg_expireHistory">
<item>
<property name="text">
- <string>don't even store them</string>
+ <string>never</string>
</property>
</item>
<item>
<property name="text">
- <string>at application exit</string>
+ <string>every 3 months</string>
</property>
</item>
<item>
<property name="text">
- <string>every day</string>
+ <string>every month</string>
</property>
</item>
<item>
<property name="text">
- <string>every month</string>
+ <string>every day</string>
</property>
</item>
<item>
<property name="text">
- <string>every 3 months</string>
+ <string>at application exit</string>
</property>
</item>
<item>
<property name="text">
- <string>never</string>
+ <string>don't even store them</string>
</property>
</item>
</widget>
diff --git a/src/settings/settingsdialog.cpp b/src/settings/settingsdialog.cpp
index 3d5260cf..3e25640d 100644
--- a/src/settings/settingsdialog.cpp
+++ b/src/settings/settingsdialog.cpp
@@ -141,7 +141,7 @@ Private::Private(SettingsDialog *parent)
// WARNING
// remember wheh changing here that the smallest netbooks
// have a 1024x576 resolution. So DON'T bother that limits!!
- parent->setMinimumSize(700, 576);
+ parent->setMinimumSize(700, 525);
}