summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/download/downloadmanager.h8
-rw-r--r--src/webtab/webpage.cpp29
2 files changed, 24 insertions, 13 deletions
diff --git a/src/download/downloadmanager.h b/src/download/downloadmanager.h
index 22998567..224ef8bd 100644
--- a/src/download/downloadmanager.h
+++ b/src/download/downloadmanager.h
@@ -69,8 +69,12 @@ public:
bool clearDownloadsHistory();
- bool downloadResource(const KUrl &url, const KIO::MetaData &metaData = KIO::MetaData(),
- QWidget *parent = 0, bool forceDirRequest = false, const QString &suggestedName = QString(), bool registerDownload = true);
+ bool downloadResource(const KUrl &url,
+ const KIO::MetaData &metaData = KIO::MetaData(),
+ QWidget *parent = 0,
+ bool forceDirRequest = false,
+ const QString &suggestedName = QString(),
+ bool registerDownload = true);
void downloadLinksWithKGet(const QVariant &contentList);
diff --git a/src/webtab/webpage.cpp b/src/webtab/webpage.cpp
index 998c8339..de87ad42 100644
--- a/src/webtab/webpage.cpp
+++ b/src/webtab/webpage.cpp
@@ -415,12 +415,12 @@ void WebPage::handleUnsupportedContent(QNetworkReply *reply)
switch (dlg.askEmbedOrSave())
{
case KParts::BrowserOpenOrSaveQuestion::Save:
- DownloadManager::self()->downloadResource(reply->url(),
- KIO::MetaData(),
- view(),
- !hideDialog,
- _suggestedFileName,
- settings()->testAttribute(QWebSettings::PrivateBrowsingEnabled));
+ DownloadManager::self()->downloadResource( reply->url(),
+ KIO::MetaData(),
+ view(),
+ !hideDialog,
+ _suggestedFileName,
+ !settings()->testAttribute(QWebSettings::PrivateBrowsingEnabled));
return;
case KParts::BrowserOpenOrSaveQuestion::Cancel:
@@ -681,16 +681,23 @@ QString WebPage::errorPage(QNetworkReply *reply)
void WebPage::downloadRequest(const QNetworkRequest &request)
{
- DownloadManager::self()->downloadResource(request.url(),
- request.attribute(static_cast<QNetworkRequest::Attribute>(KIO::AccessManager::MetaData)).toMap(),
- view(), false, QString(), settings()->testAttribute(QWebSettings::PrivateBrowsingEnabled));
+ DownloadManager::self()->downloadResource( request.url(),
+ request.attribute(static_cast<QNetworkRequest::Attribute>(KIO::AccessManager::MetaData)).toMap(),
+ view(),
+ false,
+ QString(),
+ !settings()->testAttribute(QWebSettings::PrivateBrowsingEnabled));
}
void WebPage::downloadUrl(const KUrl &url)
{
- DownloadManager::self()->downloadResource(url, KIO::MetaData(), view(), false, QString(),
- settings()->testAttribute(QWebSettings::PrivateBrowsingEnabled));
+ DownloadManager::self()->downloadResource( url,
+ KIO::MetaData(),
+ view(),
+ false,
+ QString(),
+ !settings()->testAttribute(QWebSettings::PrivateBrowsingEnabled));
}