summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlavio Castelli <fcastelli@novell.com>2010-04-06 12:43:34 +0200
committerFlavio Castelli <fcastelli@novell.com>2010-04-07 08:41:00 +0200
commitbc50e818065dff096a1c55a2b37e82a5ac205296 (patch)
tree8e4b0bf1f839f178d6eb18c804dc851189ead3b2 /src
parentMerge commit 'refs/merge-requests/116' of git://gitorious.org/rekonq/mainline... (diff)
downloadrekonq-bc50e818065dff096a1c55a2b37e82a5ac205296.tar.xz
Do not update downloads history when private browsing is enabled.
Diffstat (limited to 'src')
-rw-r--r--src/history/historymanager.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/history/historymanager.cpp b/src/history/historymanager.cpp
index 7aded714..097f9ee2 100644
--- a/src/history/historymanager.cpp
+++ b/src/history/historymanager.cpp
@@ -455,6 +455,9 @@ KCompletion * HistoryManager::completionObject() const
void HistoryManager::addDownload(const QString &srcUrl, const QString &destUrl)
{
+ QWebSettings *globalSettings = QWebSettings::globalSettings();
+ if (globalSettings->testAttribute(QWebSettings::PrivateBrowsingEnabled))
+ return;
QString downloadFilePath = KStandardDirs::locateLocal("appdata" , "downloads");
QFile downloadFile(downloadFilePath);
if ( !downloadFile.open(QFile::WriteOnly | QFile::Append) )