Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/5.7' into 5.8
Browse files Browse the repository at this point in the history
cf53aa2 and 3aaa5d6
were reverted because of reconstruction in 5.7.

defineTest(qtConfTest_checkCompiler) in configure.pri is smart
enough to cover the case in a9474d1.

DirectWrite: Fix advances being scaled to 0

Since 131eee5, the stretch of a font can be 0, meaning
"whatever the font provides". In combination with ec7fee9,
this would cause advances in the DirectWrite engine to be scaled to
0, causing the QRawFont test to fail.

Conflicts:
	configure
	mkspecs/features/uikit/device_destinations.sh
	mkspecs/features/uikit/xcodebuild.mk
	src/corelib/global/qglobal.cpp
	src/corelib/global/qnamespace.qdoc
	src/plugins/platforms/cocoa/qcocoamenuitem.h
	src/plugins/platforms/windows/qwindowsservices.cpp
	src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
	src/plugins/platforms/windows/qwindowsfontenginedirectwrite.cpp
	src/widgets/kernel/qapplication.cpp
	tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
	tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp

Change-Id: I4656d8133da7ee9fcc84ad3f1c7950f924432d1e
  • Loading branch information
liangqi committed Aug 29, 2016
2 parents 829c59a + cc74452 commit 1cc5715
Show file tree
Hide file tree
Showing 163 changed files with 6,132 additions and 4,311 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ tests/auto/cmake/build
*.exe.embed.manifest
*.exe_manifest.rc
*.exe_manifest.res
*.appxmanifest
.qmake.winrt_uuid_*

# MinGW generated files
*.Debug
Expand Down
3 changes: 2 additions & 1 deletion mkspecs/android-clang/qmake.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ include(../common/android-base-head.conf)
NDK_LLVM_PATH = $$NDK_ROOT/toolchains/llvm/prebuilt/$$NDK_HOST
QMAKE_CC = $$NDK_LLVM_PATH/bin/clang
QMAKE_CXX = $$NDK_LLVM_PATH/bin/clang++
QMAKE_GCC = $$NDK_TOOLCHAIN_PATH/bin/$$NDK_TOOLS_PREFIX-g++

equals(ANDROID_TARGET_ARCH, armeabi-v7a): \
QMAKE_CFLAGS = -target armv7-none-linux-androideabi
Expand All @@ -29,4 +28,6 @@ else: equals(ANDROID_TARGET_ARCH, mips): \
else: equals(ANDROID_TARGET_ARCH, mips64): \
QMAKE_CFLAGS = -target mips64el-none-linux-android

QMAKE_LINK = $$QMAKE_CXX $$QMAKE_CFLAGS -gcc-toolchain $$NDK_TOOLCHAIN_PATH

include(../common/android-base-tail.conf)
4 changes: 2 additions & 2 deletions mkspecs/android-g++/qmake.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ include(../common/gcc-base-unix.conf)
include(../common/android-base-head.conf)

QMAKE_CC = $$NDK_TOOLCHAIN_PATH/bin/$$NDK_TOOLS_PREFIX-gcc
QMAKE_CXX = $$NDK_TOOLCHAIN_PATH/bin/$$NDK_TOOLS_PREFIX-g++
QMAKE_GCC = $$QMAKE_CXX
QMAKE_CXX = $$QMAKE_GCC

QMAKE_CFLAGS =
QMAKE_LINK = $$QMAKE_GCC

include(../common/android-base-tail.conf)
1 change: 1 addition & 0 deletions mkspecs/common/android-base-head.conf
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,4 @@ ANDROID_SOURCES_CXX_STL_INCDIR = $$NDK_ROOT/sources/cxx-stl/gnu-libstdc++/$$NDK_
equals(ANDROID_TARGET_ARCH, x86_64)|equals(ANDROID_TARGET_ARCH, mips64): \
QMAKE_ANDROID_PLATFORM_LIBDIR = $${QMAKE_ANDROID_PLATFORM_LIBDIR}64

QMAKE_GCC = $$NDK_TOOLCHAIN_PATH/bin/$$NDK_TOOLS_PREFIX-g++
3 changes: 1 addition & 2 deletions mkspecs/common/android-base-tail.conf
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ QMAKE_LIBDIR_X11 =
QMAKE_INCDIR_OPENGL = $$QMAKE_ANDROID_PLATFORM_INCDIR
QMAKE_LIBDIR_OPENGL = $$QMAKE_ANDROID_PLATFORM_LIBDIR

QMAKE_LINK = $$QMAKE_GCC
QMAKE_LINK_SHLIB = $$QMAKE_GCC
QMAKE_LINK_SHLIB = $$QMAKE_LINK
QMAKE_LFLAGS = --sysroot=$$ANDROID_PLATFORM_ROOT_PATH
QMAKE_RPATHLINK = $$QMAKE_ANDROID_PLATFORM_LIBDIR
QMAKE_LFLAGS_APP = -Wl,--no-undefined -Wl,-z,noexecstack -shared
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
</Properties>

<Dependencies>
<TargetDeviceFamily Name=\"Windows.Universal\" MinVersion=\"10.0.10586.0\" MaxVersionTested=\"10.0.10586.0\" />$${WINRT_MANIFEST.dependencies}
<TargetDeviceFamily Name=\"Windows.Universal\"
MinVersion=\"$${WINRT_MANIFEST.minVersion}\"
MaxVersionTested=\"$${WINRT_MANIFEST.maxVersionTested}\" />$${WINRT_MANIFEST.dependencies}
</Dependencies>

<Resources>
Expand Down
20 changes: 13 additions & 7 deletions mkspecs/features/qml_module.prf
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ equals(TEMPLATE, app): TEMPLATE = aux
isEmpty(TARGETPATH): error("Must set TARGETPATH (QML import name)")

qmldir_file = $$_PRO_FILE_PWD_/qmldir
fq_qml_files = $$qmldir_file

fq_qml_files =
for(qmlf, QML_FILES): fq_qml_files += $$absolute_path($$qmlf, $$_PRO_FILE_PWD_)

fq_aux_qml_files =
for(qmlf, AUX_QML_FILES): fq_aux_qml_files += $$absolute_path($$qmlf, $$_PRO_FILE_PWD_)

load(qt_build_paths)

qml1_target {
Expand All @@ -32,26 +35,29 @@ qml1_target {

builtin_resources {
URITARGET = $$replace(URI, "\\.", "_")
# Ensure the qml files are included in the resources
$${URITARGET}.files = $$fq_qml_files
# Ensure the QML files are included in the resources. In static builds,
# the QML engine reads also the qmldir file from the resources.
$${URITARGET}.files = $$qmldir_file $$fq_qml_files
# qt-project.org/imports is the path used for locating imports inside the resources
$${URITARGET}.prefix = /qt-project.org/imports/$$TARGETPATH
RESOURCES += $${URITARGET}
}

# Install rules
qmldir.base = $$_PRO_FILE_PWD_
!builtin_resources: qmldir.files = $$fq_qml_files
else: qmldir.files = $$qmldir_file
# Tools need qmldir and plugins.qmltypes always installed on the file system
qmldir.files = $$qmldir_file $$fq_aux_qml_files
!builtin_resources: qmldir.files += $$fq_qml_files
qmldir.path = $$instbase/$$TARGETPATH
INSTALLS += qmldir

!debug_and_release|!build_all|CONFIG(release, debug|release) {
!prefix_build {
COPIES += qmldir
} else {
# For non-installed static builds, qmlimportscanner needs qmldir file in build dir
qmldir2build.files = $$qmldir_file
# For non-installed static builds, tools need qmldir and plugins.qmltypes
# files in the build dir
qmldir2build.files = $$qmldir_file $$fq_aux_qml_files
qmldir2build.path = $$DESTDIR
COPIES += qmldir2build
}
Expand Down
44 changes: 24 additions & 20 deletions mkspecs/features/qml_plugin.prf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ URI = $$replace(TARGETPATH, "/", ".")
QMAKE_MOC_OPTIONS += -Muri=$$URI

QMLTYPEFILE = $$_PRO_FILE_PWD_/plugins.qmltypes
exists($$QMLTYPEFILE): QML_FILES += $$QMLTYPEFILE
exists($$QMLTYPEFILE): AUX_QML_FILES += $$QMLTYPEFILE

# Install rules

Expand Down Expand Up @@ -73,6 +73,29 @@ load(qt_common)
# directory. Then review and commit the changes made to plugins.qmltypes.
#
!cross_compile {
qml1_target {
qmlplugindump = qml1plugindump
importpath.name = QML_IMPORT_PATH
} else {
qmlplugindump = qmlplugindump
importpath.name = QML2_IMPORT_PATH
}
importpath.value =
for(qmod, QTREPOS) {
qml1_target: \
qmod = $$qmod/imports
else: \
qmod = $$qmod/qml
exists($$qmod): importpath.value += $$shell_path($$qmod)
}
importpath.value = $$unique(importpath.value)
QT_TOOL_ENV = importpath
qtPrepareTool(QMLPLUGINDUMP, $$qmlplugindump)
QT_TOOL_ENV =

# qtPrepareTool() must be called outside a build pass, as it protects
# against concurrent wrapper creation by omitting it during build passes.
# However, creating the actual targets is reserved to the build passes.
build_pass|!debug_and_release {
isEmpty(IMPORT_VERSION) {
no_cxx_module {
Expand All @@ -84,25 +107,6 @@ load(qt_common)
}

load(resolve_target)
qml1_target {
qmlplugindump = qml1plugindump
importpath.name = QML_IMPORT_PATH
} else {
qmlplugindump = qmlplugindump
importpath.name = QML2_IMPORT_PATH
}
importpath.value =
for(qmod, QTREPOS) {
qml1_target: \
qmod = $$qmod/imports
else: \
qmod = $$qmod/qml
exists($$qmod): importpath.value += $$shell_path($$qmod)
}
importpath.value = $$unique(importpath.value)
QT_TOOL_ENV = importpath
qtPrepareTool(QMLPLUGINDUMP, $$qmlplugindump)
QT_TOOL_ENV =
TARGETPATHBASE = $$replace(TARGETPATH, \\.\\d+\$, )
qmltypes.target = qmltypes
qmltypes.commands = $$QMLPLUGINDUMP -nonrelocatable $$replace(TARGETPATHBASE, /, .) $$IMPORT_VERSION > $$QMLTYPEFILE
Expand Down
2 changes: 1 addition & 1 deletion mkspecs/features/qt_build_extra.prf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ equals(TEMPLATE, subdirs): return()

# It's likely that these extra flags will be wrong for host builds,
# and the bootstrapped tools usually don't need them anyway.
host_build:force_bootstrap: return()
host_build:cross_compile: return()

# The headersclean check needs defines and includes even for
# header-only modules.
Expand Down
8 changes: 4 additions & 4 deletions mkspecs/features/qt_common.prf
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ contains(TEMPLATE, .*lib) {
QMAKE_PRL_INSTALL_REPLACE += lib_replace
}

# The remainder of this file must not apply to bootstrapped tools,
# The remainder of this file must not apply to host tools/libraries,
# as the host compiler's version and capabilities are not checked.
host_build:force_bootstrap: return()
host_build:cross_compile: return()

# Extra warnings for Qt non-example code, to ensure cleanliness of the sources.
# The block below may turn these warnings into errors for some Qt targets.
Expand All @@ -70,10 +70,10 @@ warnings_are_errors:warning_clean {
# compiler.
clang:!uikit {
# Apple clang 4.0-4.2,5.0-5.1,6.0-6.4
# Regular clang 3.3-3.8
# Regular clang 3.3-3.9
apple_ver = $${QT_APPLE_CLANG_MAJOR_VERSION}.$${QT_APPLE_CLANG_MINOR_VERSION}
reg_ver = $${QT_CLANG_MAJOR_VERSION}.$${QT_CLANG_MINOR_VERSION}
contains(apple_ver, "4\\.[012]|5\\.[01]|6\\.[01234]")|contains(reg_ver, "3\\.[3-8]") {
contains(apple_ver, "4\\.[012]|5\\.[01]|6\\.[01234]")|contains(reg_ver, "3\\.[3-9]") {
QMAKE_CXXFLAGS_WARN_ON += -Werror -Wno-error=\\$${LITERAL_HASH}warnings -Wno-error=deprecated-declarations $$WERROR
}
} else:intel_icc:linux {
Expand Down
3 changes: 2 additions & 1 deletion mkspecs/features/uikit/device_destinations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
##
#############################################################################

booted_simulator=$(xcrun simctl list devices | grep -E '$1' | grep -v unavailable | grep Booted | perl -lne 'print $2 if /\((.*?)\)/')
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
booted_simulator=$($DIR/ios_devices.pl '$1' "Booted" "NOT unavailable" | tail -n 1)
echo "SIMULATOR_DEVICES = $booted_simulator"

xcodebuild test -scheme $2 -destination 'id=0' -destination-timeout 1 2>&1| sed -n 's/{ \(platform:.*\) }/\1/p' | while read destination; do
Expand Down
5 changes: 3 additions & 2 deletions mkspecs/features/uikit/xcodebuild.mk
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,12 @@ simulator-install: ACTION = build
release-%: CONFIGURATION = Release
debug-%: CONFIGURATION = Debug

SPECDIR := $(dir $(lastword $(MAKEFILE_LIST)))

# Test and build (device) destinations
ifneq ($(filter check%,$(MAKECMDGOALS)),)
ifeq ($(DEVICES),)
$(info Enumerating test destinations (you may override this by setting DEVICES explicitly), please wait...)
SPECDIR := $(dir $(lastword $(MAKEFILE_LIST)))
DESTINATIONS_INCLUDE = /tmp/device_destinations.mk
$(shell $(SPECDIR)/../features/uikit/device_destinations.sh '$(EXPORT_DEVICE_FILTER)' $(TARGET) > $(DESTINATIONS_INCLUDE))
include $(DESTINATIONS_INCLUDE)
Expand All @@ -71,7 +72,7 @@ endif
%-device: DEVICES = $(HARDWARE_DEVICES)

GENERIC_DEVICE_DESTINATION := $(EXPORT_GENERIC_DEVICE_DESTINATION)
GENERIC_SIMULATOR_DESTINATION := "id=$(shell xcrun simctl list devices | grep -E '$(EXPORT_DEVICE_FILTER)' | grep -v unavailable | perl -lne 'print $$1 if /\((.*?)\)/' | tail -n 1)"
GENERIC_SIMULATOR_DESTINATION := "id=$(shell $(SPECDIR)/ios_devices.pl '$(EXPORT_DEVICE_FILTER)' "NOT unavailable" | tail -n 1)"

%-simulator: DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)",$(GENERIC_SIMULATOR_DESTINATION))
%-device: DESTINATION = $(if $(DESTINATION_ID),"id=$(DESTINATION_ID)",$(GENERIC_DEVICE_DESTINATION))
Expand Down
7 changes: 7 additions & 0 deletions mkspecs/features/winrt/package_manifest.prf
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
# WINRT_MANIFEST.capabilities: Specifies capabilities to add to the capability list.
# WINRT_MANIFEST.capabilities_device: Specifies device capabilities to add to the capability list. (location, webcam...)
# WINRT_MANIFEST.dependencies: Specifies dependencies required by the package.
# WINRT_MANIFEST.minVersion: Specifies the minimum required Windows version to run the package. Defaults to %UCRTVersion%
# WINRT_MANIFEST.maxVersionTested: Specifies the maximum Windows version the package has been tested against. Defaults to WINRT_MANIFEST.minVersion

# The manifest is generated for each build pass for normal apps, and only once for vcapps.
# - Normal apps have their package root directory in the same place as the target (one for each build pass).
Expand Down Expand Up @@ -91,6 +93,11 @@
isEmpty(WINRT_MANIFEST.background): WINRT_MANIFEST.background = green
isEmpty(WINRT_MANIFEST.foreground): WINRT_MANIFEST.foreground = light
isEmpty(WINRT_MANIFEST.default_language): WINRT_MANIFEST.default_language = en
*-msvc2015 {
isEmpty(WINRT_MANIFEST.minVersion): WINRT_MANIFEST.minVersion = $$(UCRTVersion)
isEmpty(WINRT_MANIFEST.minVersion): error("No UCRTVersion found in environment."))
isEmpty(WINRT_MANIFEST.maxVersionTested): WINRT_MANIFEST.maxVersionTested = $$WINRT_MANIFEST.minVersion
}

INDENT = "$$escape_expand(\\r\\n) "

Expand Down
50 changes: 50 additions & 0 deletions mkspecs/macx-ios-clang/ios_devices.pl
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/usr/bin/perl

#############################################################################
##
## Copyright (C) 2016 The Qt Company Ltd.
## Contact: http://www.qt.io/licensing/
##
## This file is the build configuration utility of the Qt Toolkit.
##
## $QT_BEGIN_LICENSE:LGPL21$
## Commercial License Usage
## Licensees holding valid commercial Qt licenses may use this file in
## accordance with the commercial license agreement provided with the
## Software or, alternatively, in accordance with the terms contained in
## a written agreement between you and The Qt Company. For licensing terms
## and conditions see http://www.qt.io/terms-conditions. For further
## information use the contact form at http://www.qt.io/contact-us.
##
## GNU Lesser General Public License Usage
## Alternatively, this file may be used under the terms of the GNU Lesser
## General Public License version 2.1 or version 3 as published by the Free
## Software Foundation and appearing in the file LICENSE.LGPLv21 and
## LICENSE.LGPLv3 included in the packaging of this file. Please review the
## following information to ensure the GNU Lesser General Public License
## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
##
## As a special exception, The Qt Company gives you certain additional
## rights. These rights are described in The Qt Company LGPL Exception
## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
##
## $QT_END_LICENSE$
##
#############################################################################

$output = `xcrun simctl list devices --json 2>&1`;
$output =~ s/\n//g;

BLOCK:
foreach $block ($output =~ /{.*?}/g) {
foreach $filter (@ARGV) {
if ($filter =~ /^NOT\s(.*)/) {
$block =~ /$1/ && next BLOCK;
} else {
$block =~ /$filter/ || next BLOCK;
}
}
$block =~ /udid[:|\s|\"]+(.*)\"/;
print "$1\n";
}
4 changes: 2 additions & 2 deletions mkspecs/macx-xcode/default.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugDocumentVersioning = "NO"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableReference
Expand All @@ -88,7 +88,7 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
debugDocumentVersioning = "NO">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
Expand Down
7 changes: 7 additions & 0 deletions qmake/doc/src/qmake-manual.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -2693,6 +2693,13 @@
\row
\li version
\li The version number of the package. Defaults to \c{1.0.0.0}.
\row
\li minVersion
\li The minimum required Windows version to run the package. Defaults to the environment variable \c UCRTVersion.
\row
\li maxVersionTested
\li The maximum Windows version the package has been tested against. Defaults to \c WINRT_MANIFEST.minVersion

\endtable

You can use any combination of those values.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,8 @@ HRESULT SwapChainPanelNativeWindow::createSwapChain(ID3D11Device *device,

HRESULT SwapChainPanelNativeWindow::scaleSwapChain(const Size &windowSize, const RECT &clientRect)
{
Size renderScale = {windowSize.Width / clientRect.right,
windowSize.Height / clientRect.bottom};
Size renderScale = {windowSize.Width / std::max(LONG(1), clientRect.right),
windowSize.Height / std::max(LONG(1), clientRect.bottom)};
// Setup a scale matrix for the swap chain
DXGI_MATRIX_3X2_F scaleMatrix = {};
scaleMatrix._11 = renderScale.Width;
Expand Down
6 changes: 3 additions & 3 deletions src/3rdparty/pcre/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Email domain: cam.ac.uk
University of Cambridge Computing Service,
Cambridge, England.

Copyright (c) 1997-2015 University of Cambridge
Copyright (c) 1997-2016 University of Cambridge
All rights reserved


Expand All @@ -19,7 +19,7 @@ Written by: Zoltan Herczeg
Email local part: hzmester
Emain domain: freemail.hu

Copyright(c) 2010-2015 Zoltan Herczeg
Copyright(c) 2010-2016 Zoltan Herczeg
All rights reserved.


Expand All @@ -30,7 +30,7 @@ Written by: Zoltan Herczeg
Email local part: hzmester
Emain domain: freemail.hu

Copyright(c) 2009-2015 Zoltan Herczeg
Copyright(c) 2009-2016 Zoltan Herczeg
All rights reserved.


Expand Down
Loading

0 comments on commit 1cc5715

Please sign in to comment.