diff options
| author | Szabolcs David <davidsz@inf.u-szeged.hu> | 2025-02-07 14:34:36 +0100 |
|---|---|---|
| committer | Szabolcs David <davidsz@inf.u-szeged.hu> | 2025-02-24 15:48:47 +0100 |
| commit | 1ffe3392eae1e70f76d621c8a4ee1b20feb004f2 (patch) | |
| tree | c481c718fcb89b5be26b055f681cee481f0e3e15 /src/core/api/qwebengineprofile.cpp | |
| parent | 815ea62cc2f4a20b8c19e6d62146e07c0876ab19 (diff) | |
Fix QWebEngineDownloadRequest::pause()
Calling pause() (or any method which causes state update) in a directly
connected signal handler of a download request causes an assertion fail
in DownloadItemImpl::UpdateObservers() because it is protected from
nested updates. Use QTimer::singleShot() to detach download requests
and updates from the direct code path.
Add auto test to check if pausing and resuming a download work.
Pick-to: 6.8 6.9
Change-Id: Ia8c977a626fd0d39ca51df42984381a75cca2101
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/api/qwebengineprofile.cpp')
| -rw-r--r-- | src/core/api/qwebengineprofile.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/api/qwebengineprofile.cpp b/src/core/api/qwebengineprofile.cpp index 47c04605b..4a26703b6 100644 --- a/src/core/api/qwebengineprofile.cpp +++ b/src/core/api/qwebengineprofile.cpp @@ -216,7 +216,7 @@ void QWebEngineProfilePrivate::cleanDownloads() m_ongoingDownloads.clear(); } -void QWebEngineProfilePrivate::downloadRequested(DownloadItemInfo &info) +void QWebEngineProfilePrivate::downloadRequested(const DownloadItemInfo &info) { Q_Q(QWebEngineProfile); |
