diff options
Diffstat (limited to 'src/webenginewidgets/api')
-rw-r--r-- | src/webenginewidgets/api/qwebenginedownloaditem.cpp | 6 |
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 |