Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/5.12' into dev
Browse files Browse the repository at this point in the history
Change-Id: I0fe623517af28e408b642c879efd59f633ab63ac
  • Loading branch information
Qt Forward Merge Bot committed Dec 13, 2018
2 parents d20c980 + 69f6d3b commit ad4f359
Show file tree
Hide file tree
Showing 30 changed files with 318 additions and 103 deletions.
1 change: 1 addition & 0 deletions dist/changes-5.12.0
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ information about a particular change.
- The minimal required version of libxcb is now 1.9. Bundled xcb sources
were updated to libxcb 1.9.1 built with xcb-proto 1.8.
- [QTBUG-67654] Updated CLDR to version 33.1
- [QTBUG-71144] Updated CLDR to version 34
- [QTBUG-66561][QTBUG-70008] double-conversion got updated to upstream
version 3.1.1.
- libjpeg-turbo was updated to version 2.0.0
Expand Down
2 changes: 1 addition & 1 deletion mkspecs/features/mac/asset_catalogs.prf
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
# Backwards compatibility
for (bundle_data, QMAKE_BUNDLE_DATA) {
for (bundle_file, $${bundle_data}.files) {
!contains(bundle_file, .*\.xcassets$): next()
!contains(bundle_file, .*\\.xcassets$): next()
warning("*.xcassets in QMAKE_BUNDLE_DATA is deprecated. Use QMAKE_ASSET_CATALOGS instead.")
!exists($$absolute_path($$bundle_file/AppIcon.appiconset, $$_PRO_FILE_PWD_)): next()

Expand Down
2 changes: 1 addition & 1 deletion mkspecs/features/mac/default_post.prf
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ contains(TEMPLATE, .*app) {
!isEmpty($$list($$(QT_MAC_SDK_NO_VERSION_CHECK))): \
CONFIG += sdk_no_version_check

QMAKE_MAC_SDK_MAJOR_MINOR_VERSION = $$replace(QMAKE_MAC_SDK_VERSION, "(\d+)(\.\d+)(\.\d+)?", \1\2)
QMAKE_MAC_SDK_MAJOR_MINOR_VERSION = $$replace(QMAKE_MAC_SDK_VERSION, "(\\d+)(\\.\\d+)(\\.\\d+)?", \\1\\2)

!sdk_no_version_check:!versionAtMost(QMAKE_MAC_SDK_MAJOR_MINOR_VERSION, $$QT_MAC_SDK_VERSION_MAX) {
warning("Qt has only been tested with version $$QT_MAC_SDK_VERSION_MAX"\
Expand Down
2 changes: 1 addition & 1 deletion mkspecs/features/moc.prf
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if(gcc|intel_icl|msvc):!rim_qcc:!uikit:!no_moc_predefs:if(!macos|count(QMAKE_APP
} else: error("Oops, I messed up")
moc_predefs.output = $$MOC_DIR/moc_predefs.h
moc_predefs.input = MOC_PREDEF_FILE
silent: moc_predefs.commands = @echo generating $$moc_predefs.output$$escape_expand(\n\t)@$$moc_predefs.commands
silent: moc_predefs.commands = @echo generating $$moc_predefs.output$$escape_expand(\\n\\t)@$$moc_predefs.commands
QMAKE_EXTRA_COMPILERS += moc_predefs
MOC_PREDEF_FILE = $$[QT_HOST_DATA/src]/mkspecs/features/data/dummy.cpp
}
Expand Down
17 changes: 16 additions & 1 deletion mkspecs/features/qt_common.prf
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,14 @@ clang {
greaterThan(QT_GCC_MAJOR_VERSION, 5): QMAKE_CXXFLAGS_WARN_ON += -Wshift-overflow=2 -Wduplicated-cond
# GCC 7 has a lot of false positives relating to this, so disable completely
greaterThan(QT_GCC_MAJOR_VERSION, 6): QMAKE_CXXFLAGS_WARN_ON += -Wno-stringop-overflow
# GCC 9 has a lot of false positives relating to this, so disable completely
greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-copy
# GCC 9 introduced this
greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-redundant-move
# GCC 9 introduced this
greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-format-overflow
# GCC 9 introduced this
greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-init-list-lifetime
}

warnings_are_errors:warning_clean {
Expand Down Expand Up @@ -127,7 +135,14 @@ warnings_are_errors:warning_clean {

# GCC 7 includes -Wimplicit-fallthrough in -Wextra, but Qt is not yet free of implicit fallthroughs.
greaterThan(QT_GCC_MAJOR_VERSION, 6): QMAKE_CXXFLAGS_WARN_ON += -Wno-error=implicit-fallthrough

# GCC 9 has a lot of false positives relating to this, so disable completely
greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-deprecated-copy
# GCC 9 introduced this
greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-redundant-move
# GCC 9 introduced this
greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-format-overflow
# GCC 9 introduced this
greaterThan(QT_GCC_MAJOR_VERSION, 8): QMAKE_CXXFLAGS_WARN_ON += -Wno-init-list-lifetime
# Work-around for bug https://code.google.com/p/android/issues/detail?id=58135
android: QMAKE_CXXFLAGS_WARN_ON += -Wno-error=literal-suffix
}
Expand Down
39 changes: 20 additions & 19 deletions mkspecs/features/qt_configure.prf
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ defineReplace(qtConfFindInPathList) {

defineReplace(qtConfFindInPath) {
ensurePathEnv()
equals(QMAKE_HOST.os, Windows):!contains(1, .*\\.exe): 1 = $${1}.exe
return($$qtConfFindInPathList($$1, $$2 $$QMAKE_PATH_ENV))
}

Expand Down Expand Up @@ -1196,9 +1197,9 @@ defineTest(qtConfTest_files) {
for(i, $${1}.files._KEYS_) {
f = $$eval($${1}.files.$${i})
qtLog("Searching for file $${f}.")
contains(f, ".*\.h") {
contains(f, ".*\\.h") {
file = $$qtConfFindInPathList($$f, $$EXTRA_INCLUDEPATH $$QMAKE_DEFAULT_INCDIRS)
} else: contains(f, ".*\.(lib|so|a)") {
} else: contains(f, ".*\\.(lib|so|a)") {
file = $$qtConfFindInPathList($$f, $$EXTRA_LIBDIR $$QMAKE_DEFAULT_LIBDIRS)
} else {
# assume we're looking for an executable
Expand Down Expand Up @@ -1399,7 +1400,7 @@ defineReplace(qtConfEvaluate) {
1 ~= s/$$escape_expand(\\n) */ /g
expr = $${1}
expr ~= s/&&/ && /g
expr ~= s/\|\|/ || /g
expr ~= s/\\|\\|/ || /g
expr ~= s/!/ ! /g
expr ~= s/\\(/ ( /g
expr ~= s/\\)/ ) /g
Expand All @@ -1422,7 +1423,7 @@ defineReplace(qtConfEvaluateSingleExpression) {
} else: contains(e, "^'.*'$") {
# quoted literals
result = $$replace(e, "^'(.*)'$", "\\1")
} else: contains(e, "^tests\..*") {
} else: contains(e, "^tests\\..*") {
!qt_conf_tests_allowed: \
error("Expression '$${1}' refers to a test, which is not allowed at this stage of configuring.")
test = $$section(e, ".", 1, 1)
Expand All @@ -1433,7 +1434,7 @@ defineReplace(qtConfEvaluateSingleExpression) {
error("Unknown test object $${test} in expression '$${1}'.")
qtRunSingleTest($$test)
result = $$eval($${currentConfig}.tests.$${test}.$${var})
} else: contains(e, "^libs\..*") {
} else: contains(e, "^libs\\..*") {
!qt_conf_tests_allowed: \
error("Expression '$${1}' refers to a library, which is not allowed at this stage of configuring.")
lib = $$section(e, ".", 1, 1)
Expand All @@ -1446,7 +1447,7 @@ defineReplace(qtConfEvaluateSingleExpression) {
!defined($${currentConfig}.libraries.$${lib}.$${var}, var): \
var = sources.$$eval($${currentConfig}.libraries.$${lib}.source).$$var
result = $$eval($${currentConfig}.libraries.$${lib}.$${var})
} else: contains(e, "^features\..*") {
} else: contains(e, "^features\\..*") {
feature = $$section(e, ".", 1, 1)
var = $$section(e, ".", 2, -1)
isEmpty(var): \
Expand All @@ -1470,33 +1471,33 @@ defineReplace(qtConfEvaluateSingleExpression) {
!qtConfCheckFeature($$feature): \
error("Expression '$$1' is accessing non-emitted feature $${feature}.")
result = $$eval($${currentConfig}.features.$${feature}.$${var})
} else: contains(e, "^config\..*") {
var = $$replace(e, "^config\.", "")
} else: contains(e, "^config\\..*") {
var = $$replace(e, "^config\\.", "")
result = false
contains(CONFIG, $$var): result = true
} else: contains(e, "^module\..*") {
var = $$replace(e, "^module\.", "")
} else: contains(e, "^module\\..*") {
var = $$replace(e, "^module\\.", "")
result = false
qtConfHaveModule($$var): result = true
} else: contains(e, "^arch\..*") {
var = $$replace(e, "^arch\.", "")
} else: contains(e, "^arch\\..*") {
var = $$replace(e, "^arch\\.", "")
result = false
isEmpty(QT_ARCH): \
qtConfCheckFeature(architecture)
contains(QT_ARCH, $$var): result = true
} else: contains(e, "^subarch\..*") {
var = $$replace(e, "^subarch\.", "")
} else: contains(e, "^subarch\\..*") {
var = $$replace(e, "^subarch\\.", "")
result = false
isEmpty(QT_ARCH): \
qtConfCheckFeature(architecture)
contains(QT_CPU_FEATURES.$$QT_ARCH, $$var): result = true
} else: contains(e, "^input\..*") {
} else: contains(e, "^input\\..*") {
result = $$eval(config.$$e)
} else: contains(e, "^var\..*") {
var = $$replace(e, "^var\.", "")
} else: contains(e, "^var\\..*") {
var = $$replace(e, "^var\\.", "")
result = $$eval($$var)
} else: contains(e, "^call\..*") {
call = $$replace(e, "^call\.", "qtConfFunc_")
} else: contains(e, "^call\\..*") {
call = $$replace(e, "^call\\.", "qtConfFunc_")
!defined($$call, replace): \
error("Call $$call referenced in expression '$${1}' does not exist")
eval(result = \$\$"$$call"())
Expand Down
2 changes: 1 addition & 1 deletion mkspecs/features/qt_docs.prf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ isEmpty(qtver.value): error("No version for documentation specified.")
qtmver.name = QT_VER
qtmver.value = $$replace(qtver.value, ^(\\d+\\.\\d+).*$, \\1)
qtvertag.name = QT_VERSION_TAG
qtvertag.value = $$replace(qtver.value, \.,)
qtvertag.value = $$replace(qtver.value, \\.,)
qtdocs.name = QT_INSTALL_DOCS
qtdocs.value = $$[QT_INSTALL_DOCS/src]
builddir.name = BUILDDIR
Expand Down
8 changes: 8 additions & 0 deletions mkspecs/features/qt_module_headers.prf
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,14 @@ headersclean:!internal_module {
gcc_ver = $${QT_GCC_MAJOR_VERSION}.$${QT_GCC_MINOR_VERSION}
versionAtLeast(gcc_ver, 4.5): hcleanFLAGS += -Wdouble-promotion
versionAtLeast(gcc_ver, 4.9): hcleanFLAGS += -Wfloat-conversion
# GCC 9 has a lot of false positives relating to this, so disable completely
greaterThan(QT_GCC_MAJOR_VERSION, 8): hcleanFLAGS += -Wno-deprecated-copy
# GCC 9 introduced this
greaterThan(QT_GCC_MAJOR_VERSION, 8): hcleanFLAGS += -Wno-redundant-move
# GCC 9 introduced this
greaterThan(QT_GCC_MAJOR_VERSION, 8): hcleanFLAGS += -Wno-format-overflow
# GCC 9 introduced this
greaterThan(QT_GCC_MAJOR_VERSION, 8): hcleanFLAGS += -Wno-init-list-lifetime

c++11 {
# only enabled for actual c++11 builds due to
Expand Down
4 changes: 2 additions & 2 deletions mkspecs/features/static_runtime.prf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
msvc {
# -MD becomes -MT, -MDd becomes -MTd
QMAKE_CFLAGS ~= s,^-MD(d?)$,-MT\1,g
QMAKE_CXXFLAGS ~= s,^-MD(d?)$,-MT\1,g
QMAKE_CFLAGS ~= s,^-MD(d?)$,-MT\\1,g
QMAKE_CXXFLAGS ~= s,^-MD(d?)$,-MT\\1,g
} else: mingw {
QMAKE_LFLAGS += -static
}
2 changes: 1 addition & 1 deletion qmake/doc/src/qmake-manual.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -3428,7 +3428,7 @@
\snippet code/doc_src_qmake-manual.pro 72

Like \l {qmake-cat}{$$cat()}, the \a mode argument takes \c blob, \c lines,
\c true, and \false as value. However, the legacy word splitting rules
\c true, and \c false as value. However, the legacy word splitting rules
(i.e. empty or \c true, and \c false) differ subtly.

If you pass \c stsvar, the command's exit status will be stored in that
Expand Down
25 changes: 25 additions & 0 deletions src/3rdparty/angle/src/libANGLE/renderer/d3d/HLSLCompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
#include "libANGLE/histogram_macros.h"
#include "third_party/trace_event/trace_event.h"

#ifndef QT_D3DCOMPILER_DLL
#define QT_D3DCOMPILER_DLL D3DCOMPILER_DLL
#endif

#if ANGLE_APPEND_ASSEMBLY_TO_SHADER_DEBUG_INFO == ANGLE_ENABLED
namespace
{
Expand Down Expand Up @@ -130,6 +134,27 @@ gl::Error HLSLCompiler::ensureInitialized()
}
#endif // ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES

// Load the compiler DLL specified by the environment, or default to QT_D3DCOMPILER_DLL
const wchar_t *defaultCompiler = _wgetenv(L"QT_D3DCOMPILER_DLL");
if (!defaultCompiler)
defaultCompiler = QT_D3DCOMPILER_DLL;

const wchar_t *compilerDlls[] = {
defaultCompiler,
L"d3dcompiler_47.dll",
L"d3dcompiler_46.dll",
L"d3dcompiler_43.dll",
0
};

// Load the first available known compiler DLL
for (int i = 0; compilerDlls[i]; ++i)
{
mD3DCompilerModule = LoadLibrary(compilerDlls[i]);
if (mD3DCompilerModule)
break;
}

if (!mD3DCompilerModule)
{
// Load the version of the D3DCompiler DLL associated with the Direct3D version ANGLE was built with.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
From dff9676c60c51fa7af0749e1cb54305f112183e3 Mon Sep 17 00:00:00 2001
From: Oliver Wolff <[email protected]>
Date: Mon, 10 Dec 2018 08:33:14 +0100
Subject: [PATCH] ANGLE: Dynamically load D3D compiler from a list

If the default compiler cannot be found, load it from a list of DLL names,
including a non-versioned proxy DLL provided by Qt. On Desktop Windows,
the default compiler can also be specified by an environment variable,
QT_D3DCOMPILER_DLL.
---
src/3rdparty/angle/src/libANGLE/renderer/d3d/HLSLCompiler.cpp | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/HLSLCompiler.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/HLSLCompiler.cpp
index b38765070..5d47308d6 100644
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/HLSLCompiler.cpp
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/HLSLCompiler.cpp
@@ -14,6 +14,10 @@
#include "libANGLE/histogram_macros.h"
#include "third_party/trace_event/trace_event.h"

+#ifndef QT_D3DCOMPILER_DLL
+#define QT_D3DCOMPILER_DLL D3DCOMPILER_DLL
+#endif
+
#if ANGLE_APPEND_ASSEMBLY_TO_SHADER_DEBUG_INFO == ANGLE_ENABLED
namespace
{
@@ -130,6 +134,27 @@ gl::Error HLSLCompiler::ensureInitialized()
}
#endif // ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES

+ // Load the compiler DLL specified by the environment, or default to QT_D3DCOMPILER_DLL
+ const wchar_t *defaultCompiler = _wgetenv(L"QT_D3DCOMPILER_DLL");
+ if (!defaultCompiler)
+ defaultCompiler = QT_D3DCOMPILER_DLL;
+
+ const wchar_t *compilerDlls[] = {
+ defaultCompiler,
+ L"d3dcompiler_47.dll",
+ L"d3dcompiler_46.dll",
+ L"d3dcompiler_43.dll",
+ 0
+ };
+
+ // Load the first available known compiler DLL
+ for (int i = 0; compilerDlls[i]; ++i)
+ {
+ mD3DCompilerModule = LoadLibrary(compilerDlls[i]);
+ if (mD3DCompilerModule)
+ break;
+ }
+
if (!mD3DCompilerModule)
{
// Load the version of the D3DCompiler DLL associated with the Direct3D version ANGLE was built with.
--
2.15.0.windows.1

2 changes: 1 addition & 1 deletion src/corelib/codecs/qwindowscodec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ QString QWindowsLocalCodec::convertToUnicodeCharByChar(const char *chars, int le
#else
QString s;
size_t size = mbstowcs(NULL, mb, length);
if (size < 0) {
if (size == size_t(-1)) {
Q_ASSERT("Error in CE TextCodec");
return QString();
}
Expand Down
3 changes: 2 additions & 1 deletion src/corelib/tools/qcollator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ QT_BEGIN_NAMESPACE
QCollator::QCollator(const QLocale &locale)
: d(new QCollatorPrivate(locale))
{
d->init();
}

/*!
Expand Down Expand Up @@ -323,6 +322,8 @@ bool QCollator::ignorePunctuation() const
methods directly. But if the string is compared repeatedly (e.g. when sorting
a whole list of strings), it's usually faster to create the sort keys for each
string and then sort using the keys.
\note Not supported with the C (a.k.a. POSIX) locale on Darwin.
*/

/*!
Expand Down
4 changes: 4 additions & 0 deletions src/corelib/tools/qcollator_icu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ QT_BEGIN_NAMESPACE
void QCollatorPrivate::init()
{
cleanup();
if (isC())
return;

UErrorCode status = U_ZERO_ERROR;
QByteArray name = QLocalePrivate::get(locale)->bcp47Name('_');
Expand Down Expand Up @@ -140,6 +142,8 @@ QCollatorSortKey QCollator::sortKey(const QString &string) const
{
if (d->dirty)
d->init();
if (d->isC())
return QCollatorSortKey(new QCollatorSortKeyPrivate(string.toUtf8()));

if (d->collator) {
QByteArray result(16 + string.size() + (string.size() >> 2), Qt::Uninitialized);
Expand Down
Loading

0 comments on commit ad4f359

Please sign in to comment.