summaryrefslogtreecommitdiffstats
path: root/src/webenginewidgets/api/qwebengineprofile.cpp
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2017-11-14 16:23:18 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-01-02 20:45:07 +0000
commit7219986a18d45dd0e32a8004c748ce91d22a535b (patch)
tree1162c8e7050eba4afe833109b00f814ec76ec75c /src/webenginewidgets/api/qwebengineprofile.cpp
parent9214f8e6092b48e7b596f343b5e9bb7afd430078 (diff)
Deprecate download type
This patch removes the download type property from QtWebEngineCore and replaces it with a simple boolean 'isSavePageDownload'. On the public API boundary the type property is reimplemented via this boolean and documented as obsolete. Rationale being that 1. This feature seems to lack practical use cases, other than perhaps distinguishing save-page downloads from normal file downloads, which can be done in a much simpler way. 2. This feature does not work as documented and never has. So far nobody has complained, hinting again at a lack of practical use cases. 3. In order to fix it we would need to maintain patches on top of Chromium and Blink (we would, for example, need to propagate the DownloadAttribute type from Blink to Chromium to WebEngine). [ChangeLog][Deprecation Notice] (QWebEngine)DownloadItem::type() is deprecated and replaced with the newly introduced isSavePageDownload() property. Task-number: QTBUG-62640 Change-Id: Icf4e1e5a635028986df7eab979f4c0527902ff0c Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/webenginewidgets/api/qwebengineprofile.cpp')
-rw-r--r--src/webenginewidgets/api/qwebengineprofile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/webenginewidgets/api/qwebengineprofile.cpp b/src/webenginewidgets/api/qwebengineprofile.cpp
index c4de46b67..02fdfa113 100644
--- a/src/webenginewidgets/api/qwebengineprofile.cpp
+++ b/src/webenginewidgets/api/qwebengineprofile.cpp
@@ -205,7 +205,7 @@ void QWebEngineProfilePrivate::downloadRequested(DownloadItemInfo &info)
itemPrivate->downloadPath = info.path;
itemPrivate->mimeType = info.mimeType;
itemPrivate->savePageFormat = static_cast<QWebEngineDownloadItem::SavePageFormat>(info.savePageFormat);
- itemPrivate->type = static_cast<QWebEngineDownloadItem::DownloadType>(info.downloadType);
+ itemPrivate->isSavePageDownload = info.isSavePageDownload;
QWebEngineDownloadItem *download = new QWebEngineDownloadItem(itemPrivate, q);