diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2012-12-02 11:13:16 +0100 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2012-12-10 02:48:06 +0100 |
commit | 523603931a20e48de15b66316019da3d699a2660 (patch) | |
tree | 6e3d89d139a218da99c16e8e91bdbb35620a1081 /src | |
parent | Shorter string. May fit better... (diff) | |
download | rekonq-523603931a20e48de15b66316019da3d699a2660.tar.xz |
Fix downloads notifications
Diffstat (limited to 'src')
-rw-r--r-- | src/download/downloadmanager.h | 8 | ||||
-rw-r--r-- | src/webtab/webpage.cpp | 29 |
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)); } |