summaryrefslogtreecommitdiff
path: root/src/webengine/api/qquickwebengineprofile.cpp
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2015-09-03 13:20:24 +0200
committerKai Koehne <kai.koehne@theqtcompany.com>2015-09-04 14:24:03 +0000
commit003924d46e5f886eca1fa3fd220e3d1b652322fb (patch)
tree19dac2aaaa3bbeac38deedaedc910a4a0ab58be8 /src/webengine/api/qquickwebengineprofile.cpp
parent3f9c6206450b0c67a5dadfe0da023ec6be7d1743 (diff)
downloadqtwebengine-003924d46e5f886eca1fa3fd220e3d1b652322fb.tar.gz
Break destruction cycle between DownloadItem and WebEngineProfile
All QQWebEngineDownloadItem objects are destructed as child objects of QQWebEngineProfile. However, they try to 'call back' to the already half-destructed QQWebEngineProfile object to unregister themselves. Avoid this by tracking the lifetime of the QWebEngineProfile with a QPointer. Task-number: QTBUG-48088 Change-Id: Ie6a76440ad9f37d7cbc38b4ce35bf5da785d0e2a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'src/webengine/api/qquickwebengineprofile.cpp')
-rw-r--r--src/webengine/api/qquickwebengineprofile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp
index bff640d32..68884f967 100644
--- a/src/webengine/api/qquickwebengineprofile.cpp
+++ b/src/webengine/api/qquickwebengineprofile.cpp
@@ -85,7 +85,7 @@ void QQuickWebEngineProfilePrivate::downloadRequested(DownloadItemInfo &info)
Q_Q(QQuickWebEngineProfile);
Q_ASSERT(!m_ongoingDownloads.contains(info.id));
- QQuickWebEngineDownloadItemPrivate *itemPrivate = new QQuickWebEngineDownloadItemPrivate(this);
+ QQuickWebEngineDownloadItemPrivate *itemPrivate = new QQuickWebEngineDownloadItemPrivate(q);
itemPrivate->downloadId = info.id;
itemPrivate->downloadState = QQuickWebEngineDownloadItem::DownloadRequested;
itemPrivate->totalBytes = info.totalBytes;