summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets
diff options
context:
space:
mode:
authorAndras Becsi <andras.becsi@digia.com>2015-02-06 11:59:01 +0100
committerAndras Becsi <andras.becsi@theqtcompany.com>2015-02-06 12:03:10 +0000
commiteda8fbdf0d6249f4f89e3456092cbe790b27b1fb (patch)
tree483c297a34ca40c4c5d87474c479d826e43a856c /src/webenginewidgets
parent22f4a67e434703b400ad9ee669f673144e5f33dc (diff)
Reverse the logic for download cancellation
Since we require downloads to be explicitly accepted we should have 'accepted' as a member in the download info instead of 'cancelled'. Change-Id: Ia8ff4a4b29f3c8631f4cb1c410ece5f11d9cdc93 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src/webenginewidgets')
-rw-r--r--src/webenginewidgets/api/qwebengineprofile.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/webenginewidgets/api/qwebengineprofile.cpp b/src/webenginewidgets/api/qwebengineprofile.cpp
index 64876bf1a..afe0774c0 100644
--- a/src/webenginewidgets/api/qwebengineprofile.cpp
+++ b/src/webenginewidgets/api/qwebengineprofile.cpp
@@ -152,11 +152,11 @@ void QWebEngineProfilePrivate::downloadRequested(DownloadItemInfo &info)
QWebEngineDownloadItem::DownloadState state = download->state();
info.path = download->path();
- info.cancelled = state == QWebEngineDownloadItem::DownloadCancelled;
+ info.accepted = state != QWebEngineDownloadItem::DownloadCancelled;
if (state == QWebEngineDownloadItem::DownloadRequested) {
// Delete unaccepted downloads.
- info.cancelled = true;
+ info.accepted = false;
m_ongoingDownloads.remove(info.id);
delete download;
}