diff options
| author | Anu Aliyas <anu.aliyas@qt.io> | 2023-04-17 13:34:23 +0200 |
|---|---|---|
| committer | Anu Aliyas <anu.aliyas@qt.io> | 2023-04-20 16:32:38 +0200 |
| commit | 97c3782e2f5ecd3115aab1d0216b989b55f54f21 (patch) | |
| tree | 0a8832e5d214707e224585165ae8dd5bc428d84c /src/webenginequick/api/qquickwebengineprofile.cpp | |
| parent | 421d3c4e0b57170343df57de0b222d0f57a7bcb7 (diff) | |
Add WebEngineView::save() convenience API
Add the convenience method QQuickWebEngineView::save for saving pages without
the need to explicitly handle download requests.
Task-number: QTBUG-56093
Change-Id: I67909fdca6472d1ea9b32e0f89c1ab90219bca3b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/webenginequick/api/qquickwebengineprofile.cpp')
| -rw-r--r-- | src/webenginequick/api/qquickwebengineprofile.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/webenginequick/api/qquickwebengineprofile.cpp b/src/webenginequick/api/qquickwebengineprofile.cpp index a830e969e..92ab9dc25 100644 --- a/src/webenginequick/api/qquickwebengineprofile.cpp +++ b/src/webenginequick/api/qquickwebengineprofile.cpp @@ -212,7 +212,8 @@ void QQuickWebEngineProfilePrivate::downloadRequested(DownloadItemInfo &info) QWebEngineDownloadRequestPrivate *itemPrivate = new QWebEngineDownloadRequestPrivate(m_profileAdapter); itemPrivate->downloadId = info.id; - itemPrivate->downloadState = QWebEngineDownloadRequest::DownloadRequested; + itemPrivate->downloadState = info.accepted ? QWebEngineDownloadRequest::DownloadInProgress + : QWebEngineDownloadRequest::DownloadRequested; itemPrivate->startTime = info.startTime; itemPrivate->downloadUrl = info.url; itemPrivate->totalBytes = info.totalBytes; |
