summaryrefslogtreecommitdiffstats
path: root/src/core/download_manager_delegate_qt.cpp
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2020-08-10 09:31:27 +0200
committerMichal Klocek <michal.klocek@qt.io>2020-08-18 23:23:35 +0200
commit75393077108480e1762612331c399a012b5feba7 (patch)
tree38db972a8d47853de4640d15458bfab6e74ea6b0 /src/core/download_manager_delegate_qt.cpp
parent322742fbdc9a18497946fc736daba9f6bf73ac54 (diff)
Remove obsolete, deprecated api from qwebenginedownloaditem
This patch removes: * path() * type() * DownloadType enum Change-Id: I3e29f9e8ce9e39b015c57cb7005e0290d1496291 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'src/core/download_manager_delegate_qt.cpp')
-rw-r--r--src/core/download_manager_delegate_qt.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/core/download_manager_delegate_qt.cpp b/src/core/download_manager_delegate_qt.cpp
index ebf498fdf..9b87d489a 100644
--- a/src/core/download_manager_delegate_qt.cpp
+++ b/src/core/download_manager_delegate_qt.cpp
@@ -68,7 +68,6 @@ DownloadManagerDelegateQt::DownloadManagerDelegateQt(ProfileAdapter *profileAdap
: m_profileAdapter(profileAdapter)
, m_currentId(0)
, m_weakPtrFactory(this)
- , m_nextDownloadIsUserRequested(false)
{
Q_ASSERT(m_profileAdapter);
}
@@ -138,17 +137,6 @@ bool DownloadManagerDelegateQt::DetermineDownloadTarget(download::DownloadItem*
QString suggestedFilename = toQt(item->GetSuggestedFilename());
QString mimeTypeString = toQt(item->GetMimeType());
- int downloadType = 0;
- if (m_nextDownloadIsUserRequested) {
- downloadType = ProfileAdapterClient::UserRequested;
- m_nextDownloadIsUserRequested = false;
- } else {
- bool isAttachment = net::HttpContentDisposition(item->GetContentDisposition(), std::string()).is_attachment();
- if (isAttachment)
- downloadType = ProfileAdapterClient::Attachment;
- else
- downloadType = ProfileAdapterClient::DownloadAttribute;
- }
if (suggestedFilename.isEmpty())
suggestedFilename = toQt(net::HttpContentDisposition(item->GetContentDisposition(), net::kCharsetLatin1).filename());
@@ -191,7 +179,7 @@ bool DownloadManagerDelegateQt::DetermineDownloadTarget(download::DownloadItem*
false /* accepted */,
false /* paused */,
false /* done */,
- downloadType,
+ false /* isSavePageDownload */,
item->GetLastReason(),
adapterClient,
suggestedFilename,
@@ -292,7 +280,7 @@ void DownloadManagerDelegateQt::ChooseSavePath(content::WebContents *web_content
acceptedByDefault,
false, /* paused */
false, /* done */
- ProfileAdapterClient::SavePage,
+ true, /* isSavePageDownload */
ProfileAdapterClient::NoReason,
adapterClient,
QFileInfo(suggestedFilePath).fileName(),