From fba650c3d774c595b6726c7140ff12353f8c0a4c Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 18 Sep 2015 15:02:06 +0200 Subject: Make the MIME-type of downloads available An application currently have to rely on suggested filename only to guess the type of a download. This is often insufficient when the suffix is misleading or missing. This patch adds the mimetype to the reported metadata and also adds a mimetype appropriate suffix to suggested filenames. Task-number: QTBUG-48206 Change-Id: I4c70f076d6eb5ae820fd6b7f568515eeb7c18df5 Reviewed-by: Leena Miettinen Reviewed-by: Joerg Bornemann --- src/webenginewidgets/api/qwebengineprofile.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/webenginewidgets/api/qwebengineprofile.cpp') diff --git a/src/webenginewidgets/api/qwebengineprofile.cpp b/src/webenginewidgets/api/qwebengineprofile.cpp index e1cde4f08..7f63b312f 100644 --- a/src/webenginewidgets/api/qwebengineprofile.cpp +++ b/src/webenginewidgets/api/qwebengineprofile.cpp @@ -150,6 +150,7 @@ void QWebEngineProfilePrivate::downloadRequested(DownloadItemInfo &info) itemPrivate->downloadId = info.id; itemPrivate->downloadState = QWebEngineDownloadItem::DownloadRequested; itemPrivate->downloadPath = info.path; + itemPrivate->mimeType = info.mimeType; QWebEngineDownloadItem *download = new QWebEngineDownloadItem(itemPrivate, q); -- cgit v1.2.3