summaryrefslogtreecommitdiffstats
path: root/src/core/api/qwebengineurlrequestjob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/api/qwebengineurlrequestjob.cpp')
-rw-r--r--src/core/api/qwebengineurlrequestjob.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/api/qwebengineurlrequestjob.cpp b/src/core/api/qwebengineurlrequestjob.cpp
index f741b88e8..c3541598b 100644
--- a/src/core/api/qwebengineurlrequestjob.cpp
+++ b/src/core/api/qwebengineurlrequestjob.cpp
@@ -151,9 +151,10 @@ QUrl QWebEngineUrlRequestJob::initiator() const
The device should remain available at least as long as the job exists.
When calling this method with a newly constructed device, one solution is to
- make the device delete itself when closed, like this:
+ make the device as a child of the job or delete itself when job is deleted,
+ like this:
\code
- connect(device, &QIODevice::aboutToClose, device, &QObject::deleteLater);
+ connect(job, &QObject::destroyed, device, &QObject::deleteLater);
\endcode
*/
void QWebEngineUrlRequestJob::reply(const QByteArray &contentType, QIODevice *device)