summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/api
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-01-22 09:30:49 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-01-22 09:30:49 +0100
commit8b2427f2c8de0a7c8f06318e8fe7849182621f68 (patch)
tree673a776c93a7e16d40d7bd572f4681d3b87718c5 /src/webenginewidgets/api
parentc5bcd124fecaad2b7f50c59bd3790fcc4af38a20 (diff)
parent0deb1ffda77f0410b3d13419856c757cdd422d2b (diff)
Merge remote-tracking branch 'origin/5.12' into dev
Diffstat (limited to 'src/webenginewidgets/api')
-rw-r--r--src/webenginewidgets/api/qwebenginedownloaditem.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/webenginewidgets/api/qwebenginedownloaditem.cpp b/src/webenginewidgets/api/qwebenginedownloaditem.cpp
index fc27e104d..55d4fcca8 100644
--- a/src/webenginewidgets/api/qwebenginedownloaditem.cpp
+++ b/src/webenginewidgets/api/qwebenginedownloaditem.cpp
@@ -141,8 +141,8 @@ static inline QWebEngineDownloadItem::DownloadInterruptReason toDownloadInterrup
QWebEngineProfile being a long-lived object, it is in fact recommended that
the application delete any items it is no longer interested in.
- \note Deleting an item will not cancel a possible ongoing download. If that
- is desirable, then cancel() must be called separately.
+ \note Deleting an item will also automatically cancel a download since 5.12.2,
+ but it is recommended to cancel manually before deleting for portability.
\section2 Web Page Downloads
@@ -653,6 +653,8 @@ QWebEngineDownloadItem::QWebEngineDownloadItem(QWebEngineDownloadItemPrivate *p,
*/
QWebEngineDownloadItem::~QWebEngineDownloadItem()
{
+ if (auto profileAdapter = d_ptr->profile->profileAdapter())
+ profileAdapter->removeDownload(d_ptr->downloadId);
}
QT_END_NAMESPACE