diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-07-27 16:05:45 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-07-30 20:01:04 +0000 |
commit | 8b20745e8b7235e71b16dfeadc986346c8ff1e84 (patch) | |
tree | 4f57e2892384ee3a58ae9edc68ba459a09e0997f /tests/auto/widgets/qwebengineprofile | |
parent | 53d3d4b5968974160d30c333c9d4fe170e487866 (diff) |
Try to fix assert in tst_QWebEngineProfile::urlSchemeHandlerStreaming
The mutex could potentially be destroyed while still being locked in
closed(). Instead let the job delete the device.
Change-Id: I0aeb678b73a45e247ebb2690851f1c13f6d71307
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'tests/auto/widgets/qwebengineprofile')
-rw-r--r-- | tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp index 123cb7b32..a04a1ac6f 100644 --- a/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp +++ b/tests/auto/widgets/qwebengineprofile/tst_qwebengineprofile.cpp @@ -226,12 +226,6 @@ public: setOpenMode(QIODevice::ReadOnly); m_timer.start(100, this); } - void close() override - { - QMutexLocker lock(&m_mutex); - QIODevice::close(); - deleteLater(); - } bool isSequential() const override { return true; } qint64 bytesAvailable() const override { @@ -292,7 +286,7 @@ public: void requestStarted(QWebEngineUrlRequestJob *job) { - job->reply("text/plain;charset=utf-8", new StreamingIODevice(this)); + job->reply("text/plain;charset=utf-8", new StreamingIODevice(job)); } }; |