Commit 71728d12 authored by Liang Qi's avatar Liang Qi
Browse files

Merge remote-tracking branch 'origin/5.5' into 5.6

Change-Id: I1ac58ada3f32821d62d49e5fcb12546aa9e75fb4
Showing with 16 additions and 5 deletions
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include "content/public/browser/download_item.h" #include "content/public/browser/download_item.h"
#include "content/public/browser/save_page_type.h" #include "content/public/browser/save_page_type.h"
#include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents.h"
#include "net/http/http_content_disposition.h"
#include <QDir> #include <QDir>
#include <QFile> #include <QFile>
...@@ -103,6 +104,9 @@ bool DownloadManagerDelegateQt::DetermineDownloadTarget(content::DownloadItem* i ...@@ -103,6 +104,9 @@ bool DownloadManagerDelegateQt::DetermineDownloadTarget(content::DownloadItem* i
std::string suggestedFilename = item->GetSuggestedFilename(); std::string suggestedFilename = item->GetSuggestedFilename();
if (suggestedFilename.empty())
suggestedFilename = net::HttpContentDisposition(item->GetContentDisposition(), std::string()).filename();
if (suggestedFilename.empty()) if (suggestedFilename.empty())
suggestedFilename = item->GetTargetFilePath().AsUTF8Unsafe(); suggestedFilename = item->GetTargetFilePath().AsUTF8Unsafe();
......
...@@ -22,11 +22,18 @@ defineTest(isPlatformSupported) { ...@@ -22,11 +22,18 @@ defineTest(isPlatformSupported) {
} }
defineTest(isPythonVersionSupported) { defineTest(isPythonVersionSupported) {
python_major_version = $$system('python -c "import sys; print sys.version_info.major"') python_error_msg = "Python version 2 (2.7 or later) is required to build Qt WebEngine."
python_minor_version = $$system('python -c "import sys; print sys.version_info.minor"') python_major_version = $$system('python -c "import sys; print(sys.version_info[0])"')
lessThan(python_major_version, 3): greaterThan(python_major_version, 1): greaterThan(python_minor_version, 6): return(true) greaterThan(python_major_version, 2) {
skipBuild("Using Python version "$$python_major_version"."$$python_minor_version", but Python version 2 (2.7 or later) is required to build Qt WebEngine.") skipBuild("Python version 3 is not supported by Chromium.")
return(false) skipBuild($$python_error_msg)
return(false)
}
python_minor_version = $$system('python -c "import sys; print(sys.version_info[1])"')
greaterThan(python_major_version, 1): greaterThan(python_minor_version, 6): return(true)
skipBuild("Using Python version "$$python_major_version"."$$python_minor_version".")
skipBuild($$python_error_msg)
return(false)
} }
defineTest(isGCCVersionSupported) { defineTest(isGCCVersionSupported) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment