From bc50e818065dff096a1c55a2b37e82a5ac205296 Mon Sep 17 00:00:00 2001 From: Flavio Castelli Date: Tue, 6 Apr 2010 12:43:34 +0200 Subject: Do not update downloads history when private browsing is enabled. --- src/history/historymanager.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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) ) -- cgit v1.2.1