diff options
| author | Peter Varga <pvarga@inf.u-szeged.hu> | 2023-02-24 14:57:52 +0100 |
|---|---|---|
| committer | Peter Varga <pvarga@inf.u-szeged.hu> | 2023-03-01 14:03:30 +0000 |
| commit | 496647f7647571ca3cdf81b10ba418de0f06f34d (patch) | |
| tree | 2525b4834b84df77a3b8d5dcf9aa46983acfa645 /src/core/api/qwebengineprofile.cpp | |
| parent | 571d47367c69ae4844a2c1079fbca9108cf284db (diff) | |
Fix initialization of QWebEngineDownloadRequest::totalBytes for Widgets
QQuickWebEngineProfile already initializes totalBytes.
Also clean up QWebEngineDownloadRequestPrivate and fix typo in
documentation.
Pick-to: 5.15 6.4 6.5
Fixes: QTBUG-104869
Change-Id: I8c4b79c076ddc63180960e22a9488b45ff6c4402
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 | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/api/qwebengineprofile.cpp b/src/core/api/qwebengineprofile.cpp index fe783b75e..ab873e345 100644 --- a/src/core/api/qwebengineprofile.cpp +++ b/src/core/api/qwebengineprofile.cpp @@ -186,11 +186,14 @@ void QWebEngineProfilePrivate::downloadRequested(DownloadItemInfo &info) Q_Q(QWebEngineProfile); Q_ASSERT(!m_ongoingDownloads.contains(info.id)); - QWebEngineDownloadRequestPrivate *itemPrivate = new QWebEngineDownloadRequestPrivate(m_profileAdapter, info.url); + QWebEngineDownloadRequestPrivate *itemPrivate = + new QWebEngineDownloadRequestPrivate(m_profileAdapter); itemPrivate->downloadId = info.id; itemPrivate->downloadState = info.accepted ? QWebEngineDownloadRequest::DownloadInProgress : QWebEngineDownloadRequest::DownloadRequested; itemPrivate->startTime = info.startTime; + itemPrivate->downloadUrl = info.url; + itemPrivate->totalBytes = info.totalBytes; itemPrivate->downloadDirectory = QFileInfo(info.path).path(); itemPrivate->downloadFileName = QFileInfo(info.path).fileName(); itemPrivate->suggestedFileName = info.suggestedFileName; |
