Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/5.6' into dev
Browse files Browse the repository at this point in the history
Based on merge done by Liang Qi

Change-Id: Id566e5b9f284d29bff2199f13f9417c660f5b26f
  • Loading branch information
gladhorn committed Jan 8, 2016
2 parents 80a741f + 09c9286 commit ad16478
Show file tree
Hide file tree
Showing 150 changed files with 3,154 additions and 994 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ pcviewer.cfg
*_resource.rc
.#*
*.*#
*_wrapper.sh
*_wrapper.bat
wrapper.sh
wrapper.bat
core
.qmake.cache
.qmake.vars
Expand Down
2 changes: 1 addition & 1 deletion doc/global/externalsites/external-resources.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,6 @@
*/

/*!
\externalpage http://qt.digia.com/Try-Buy/Qt-Account-Sign-up/
\externalpage https://login.qt.io/
\title Qt Account Sign-up
*/
4 changes: 2 additions & 2 deletions mkspecs/common/winrt_winphone/qmake.conf
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ QMAKE_PREFIX_STATICLIB =
QMAKE_EXTENSION_STATICLIB = lib

QMAKE_LIBS += runtimeobject.lib
QMAKE_LIBS_CORE =
QMAKE_LIBS_CORE += ws2_32.lib
QMAKE_LIBS_GUI =
QMAKE_LIBS_NETWORK =
QMAKE_LIBS_NETWORK += ws2_32.lib
QMAKE_LIBS_OPENGL_ES2 = $${LIBEGL_NAME}.lib $${LIBGLESV2_NAME}.lib
QMAKE_LIBS_OPENGL_ES2_DEBUG = $${LIBEGL_NAME}d.lib $${LIBGLESV2_NAME}d.lib

Expand Down
10 changes: 0 additions & 10 deletions mkspecs/common/winrt_winphone/qplatformdefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,4 @@

typedef int mode_t;

#ifndef INADDR_ANY
# define INADDR_ANY (u_long)0x00000000
#endif
#ifndef INADDR_LOOPBACK
# define INADDR_LOOPBACK 0x7f000001
#endif
#ifndef INADDR_BROADCAST
# define INADDR_BROADCAST (u_long)0xffffffff
#endif

#endif // QPLATFORMDEFS_H
2 changes: 1 addition & 1 deletion mkspecs/features/android/android.prf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ contains(TEMPLATE, ".*app") {
!contains(TARGET, ".so"): TARGET = lib$${TARGET}.so
QMAKE_LFLAGS += -Wl,-soname,$$shell_quote($$TARGET)

android_install: {
android_install {
target.path=/libs/$$ANDROID_TARGET_ARCH/
INSTALLS *= target
}
Expand Down
4 changes: 2 additions & 2 deletions mkspecs/features/data/cmake/Qt5ConfigVersion.cmake.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

set(PACKAGE_VERSION $$CMAKE_PACKAGE_VERSION)

if(\"\${PACKAGE_VERSION}\" VERSION_LESS \"\${PACKAGE_FIND_VERSION}\")
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
set(PACKAGE_VERSION_COMPATIBLE TRUE)
if(\"\${PACKAGE_FIND_VERSION}\" STREQUAL \"\${PACKAGE_VERSION}\")
if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
set(PACKAGE_VERSION_EXACT TRUE)
endif()
endif()
17 changes: 15 additions & 2 deletions mkspecs/features/data/unix/findclasslist.pl
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,21 @@
#############################################################################

use strict;
my $syntax = "findclasslist.pl [private header list]\n" .
my $syntax = "findclasslist.pl <file (containing private header list)>\n" .
"Replaces \@CLASSLIST\@ with the classes found in the header files\n";

die("Expected exactly one argument") if (@ARGV != 1);

my @headers = ();

# Expand contents of the command-line arguments file
open ARGFILE, "<$ARGV[0]" or die("Could not open arguments file $ARGV[0]: $!");
while (my $line = <ARGFILE>) {
chomp($line);
push @headers, $line;
}
close ARGFILE;

$\ = $/;
while (<STDIN>) {
chomp;
Expand All @@ -44,7 +57,7 @@
}

# Replace @CLASSLIST@ with the class list
for my $header (@ARGV) {
for my $header (@headers) {
open HDR, "<$header" or die("Could not open header $header: $!");
my $comment = " /* $header */";
while (my $line = <HDR>) {
Expand Down
4 changes: 2 additions & 2 deletions mkspecs/features/qt.prf
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ contains(qt_module_deps, qml): \

!isEmpty(IMPORTS._KEYS_) {
# add import plugins to LIBS line
for (key, IMPORTS._KEYS_): {
for (key, IMPORTS._KEYS_) {
PATH = $$eval(IMPORTS.$${key}.path)
PLUGIN = $$eval(IMPORTS.$${key}.plugin)
!isEmpty(PATH):!isEmpty(PLUGIN): LIBS *= -L$$PATH -l$${PLUGIN}$$qtPlatformTargetSuffix()
Expand Down Expand Up @@ -347,7 +347,7 @@ for(QT_CURRENT_VERIFY, $$list($$QT_PLUGIN_VERIFY)) {
QT_LINKAGE = -l$${QTPLUG}$$qtPlatformTargetSuffix()

# Only link against plugin in static builds
isEqual(QT_CURRENT_VERIFY, QTPLUGIN): {
isEqual(QT_CURRENT_VERIFY, QTPLUGIN) {
!isEmpty(QT_PLUGINPATH) {
plugpath = $$eval(QT_PLUGIN.$${QTPLUG}.PATH)
isEmpty(plugpath): \
Expand Down
14 changes: 7 additions & 7 deletions mkspecs/features/qt_docs.prf
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ qtdocs.value = $$[QT_INSTALL_DOCS/src]
QT_TOOL_ENV = qtver qtmver qtvertag qtdocs
qtPrepareTool(QDOC, qdoc)
QT_TOOL_ENV =
QDOC += -outputdir $$QMAKE_DOCS_OUTPUTDIR
QDOC += -outputdir $$shell_quote($$QMAKE_DOCS_OUTPUTDIR)
!build_online_docs: \
QDOC += -installdir $$[QT_INSTALL_DOCS]
QDOC += -installdir $$shell_quote($$[QT_INSTALL_DOCS])
PREP_DOC_INDEXES =
DOC_INDEXES =
!isEmpty(QTREPOS) {
Expand All @@ -46,14 +46,14 @@ DOC_INDEXES =
mps += $$dirname(QT.$${d}.libs)
mps = $$unique(mps)
for (mp, mps): \
PREP_DOC_INDEXES += -indexdir $$mp/doc
PREP_DOC_INDEXES += -indexdir $$shell_quote($$mp/doc)
}
for(qrep, QTREPOS): \
DOC_INDEXES += -indexdir $$qrep/doc
DOC_INDEXES += -indexdir $$shell_quote($$qrep/doc)
} else {
prepare_docs: \
PREP_DOC_INDEXES += -indexdir $$[QT_INSTALL_DOCS/get]
DOC_INDEXES += -indexdir $$[QT_INSTALL_DOCS/get]
PREP_DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get])
DOC_INDEXES += -indexdir $$shell_quote($$[QT_INSTALL_DOCS/get])
}
doc_command = $$QDOC $$QMAKE_DOCS
prepare_docs {
Expand All @@ -65,7 +65,7 @@ prepare_docs {

!build_online_docs {
qtPrepareTool(QHELPGENERATOR, qhelpgenerator)
qch_docs.commands = $$QHELPGENERATOR $$QMAKE_DOCS_OUTPUTDIR/$${QMAKE_DOCS_TARGET}.qhp -o $$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch
qch_docs.commands = $$QHELPGENERATOR $$shell_quote($$QMAKE_DOCS_OUTPUTDIR/$${QMAKE_DOCS_TARGET}.qhp) -o $$shell_quote($$QMAKE_DOCS_BASE_OUTDIR/$${QMAKE_DOCS_TARGET}.qch)

inst_html_docs.files = $$QMAKE_DOCS_OUTPUTDIR
inst_html_docs.path = $$[QT_INSTALL_DOCS]
Expand Down
76 changes: 60 additions & 16 deletions mkspecs/features/qt_functions.prf
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ defineTest(qtPrepareTool) {
}
}
QT_TOOL_ENV += $$eval(QT_TOOL.$${2}.envvars)
QT_TOOL_NAME = $$2
!isEmpty(3)|!isEmpty(4) {
$$1$$3 =
for (arg, cmd): \
Expand All @@ -90,39 +91,83 @@ defineTest(qtAddToolEnv) {
ds = $$QMAKE_DIR_SEP
else: \
ds = $$DIR_SEPARATOR
batch_sets =
for(env, 2) {
value = $$eval($${env}.value)
!isEmpty(value) {
name = $$eval($${env}.name)
config = $$eval($${env}.CONFIG)
equals(ds, /) {
contains($${env}.CONFIG, prepend): infix = \${$$name:+:\$$$name}
contains(config, prepend): infix = \${$$name:+:\$$$name}
else: contains(config, always_prepend): infix = :\$$$name
else: infix =
val = "$$name=$$shell_quote($$join(value, :))$$infix"
# Under msys, this path is taken only in the non-system()
# case, so using shell_quote() always works.
batch_sets += \
"$$name=$$shell_quote($$join(value, :))$$infix" \
"export $$name"
} else {
# Escape closing parens when expanding the variable, otherwise cmd confuses itself.
contains($${env}.CONFIG, prepend): infix = ;%$$name:)=^)%
else: infix =
value ~= s,\\^,^^^^,g
value ~= s,!,^^!,g
value ~= s,\\),^),g
val = "(set $$name=$$join(value, ;)$$infix) &"
}
isEmpty(3): !contains(TEMPLATE, vc.*) {
contains(MAKEFILE_GENERATOR, MS.*): val ~= s,%,%%,g
val ~= s,\\\$,\$\$,g
contains(config, prepend) {
batch_sets += \
"if defined $$name (" \
" set $$name=$$join(value, ;);!$$name!" \
") else (" \
" set $$name=$$join(value, ;)" \
")"
} else: contains(config, always_prepend) {
batch_sets += "(set $$name=$$join(value, ;);!$$name!)"
} else {
batch_sets += "(set $$name=$$join(value, ;))"
}
}
$$1 = "$$val $$eval($$1)"
}
}
!isEmpty(batch_sets) {
batch_name = wrapper
!isEmpty(QT_TOOL_NAME): batch_name = $${QT_TOOL_NAME}_wrapper
cmd = $$eval($$1)
!isEmpty(cmd): cmd = "$$cmd "
equals(ds, /) {
batch_name = $${batch_name}.sh
batch_cont = \
"$$LITERAL_HASH!/bin/sh" \
$$batch_sets \
"exec $$cmd\"$@\""
# It would be nicer to use the '.' command (without 'exec' above),
# but that doesn't set the positional arguments under (d)ash.
$$1 =
} else {
batch_name = $${batch_name}.bat
batch_cont = \
"@echo off" \
"SetLocal EnableDelayedExpansion" \
$$batch_sets \
"$$cmd%*" \
"EndLocal"
$$1 = call
}
!build_pass:!write_file($$OUT_PWD/$$batch_name, batch_cont, exe): error("Aborting.")
isEmpty(3): \
$$1 += $$shell_quote($$shell_path($$OUT_PWD/$$batch_name))
else: \
$$1 += $$system_quote($$system_path($$OUT_PWD/$$batch_name))
QMAKE_DISTCLEAN += $$OUT_PWD/$$batch_name
}
export($$1)
export(QMAKE_DISTCLEAN)
}

# target variable, dependency var name, [non-empty: prepare for system(), not make]
defineTest(qtAddTargetEnv) {
deps = $$replace($$2, -private$, _private)
deps = $$resolve_depends(deps, "QT.", ".depends" ".run_depends")
!isEmpty(deps) {
libs = libs
deppath.CONFIG = prepend
equals(QMAKE_HOST.os, Windows) {
libs = bins
deppath.CONFIG = always_prepend
deppath.name = PATH
} else:contains(QMAKE_HOST.os, Linux|FreeBSD|OpenBSD|NetBSD|DragonFly|SunOS|HP-UX|QNX|GNU) {
deppath.name = LD_LIBRARY_PATH
Expand All @@ -141,13 +186,12 @@ defineTest(qtAddTargetEnv) {
ptypes =
for(dep, deps) {
isEmpty(3): \
deppath += $$shell_path($$eval(QT.$${dep}.$$libs))
deppath += $$shell_path($$eval(QT.$${dep}.libs))
else: \
deppath += $$system_path($$eval(QT.$${dep}.$$libs))
deppath += $$system_path($$eval(QT.$${dep}.libs))
ptypes += $$eval(QT.$${dep}.plugin_types)
}
deppath.value = $$unique(deppath)
deppath.CONFIG = prepend

pluginpath.value =
ppaths = $$[QT_INSTALL_PLUGINS/get]
Expand Down
5 changes: 3 additions & 2 deletions mkspecs/features/qt_module.prf
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,12 @@ android: CONFIG += qt_android_deps no_linker_version_script
}

# Add a post-processing step to replace the @CLASSLIST@
verscriptprocess.commands = perl $${PWD}/data/unix/findclasslist.pl < $^ > $@
verscriptprocess.commands = perl $${PWD}/data/unix/findclasslist.pl < $${verscript}.in $${verscript}.in.args > $@
verscriptprocess.target = $$verscript
verscriptprocess.depends = $${verscript}.in
for(header, SYNCQT.PRIVATE_HEADER_FILES): \
verscriptprocess.depends += $${_PRO_FILE_PWD_}/$$header
write_file($${verscript}.in.args, verscriptprocess.depends)|error("Aborting.")
verscriptprocess.depends += $${verscript}.in $${verscript}.in.args
QMAKE_EXTRA_TARGETS += verscriptprocess
PRE_TARGETDEPS += $$verscript
verscript = $${verscript}.in
Expand Down
9 changes: 5 additions & 4 deletions mkspecs/features/testcase.prf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ testcase_exceptions: CONFIG += exceptions
check.files =
check.path = .

# Add environment for non-installed builds. Do this first, so the
# 'make' variable expansions don't end up in a batch file/script.
QT_TOOL_NAME = target
qtAddTargetEnv(check.commands, QT)

# If the test ends up in a different directory, we should cd to that directory.
TESTRUN_CWD = $$DESTDIR

Expand Down Expand Up @@ -40,10 +45,6 @@ unix {
# Allow for custom arguments to tests
check.commands += $(TESTARGS)

# Add environment for non-installed builds
qtAddTargetEnv(check.commands, QT)

# This must happen after adding the environment.
!isEmpty(TESTRUN_CWD):!contains(TESTRUN_CWD, ^\\./?): \
check.commands = cd $$shell_path($$TESTRUN_CWD) && $$check.commands

Expand Down
2 changes: 1 addition & 1 deletion mkspecs/features/win32/idcidl.prf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build_pass:console: {
build_pass:console {
warning("QAxServer applications cannot be console applications.")
warning("Remove 'console' from your CONFIG.")
}
Expand Down
2 changes: 1 addition & 1 deletion mkspecs/features/win32/windows.prf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ contains(TEMPLATE, ".*app") {
mingw:DEFINES += QT_NEEDS_QMAIN

qt:for(entryLib, $$list($$unique(QMAKE_LIBS_QT_ENTRY))) {
isEqual(entryLib, -lqtmain): {
isEqual(entryLib, -lqtmain) {
!contains(QMAKE_DEFAULT_LIBDIRS, $$QT.core.libs): \
QMAKE_LIBS += -L$$QT.core.libs
CONFIG(debug, debug|release): QMAKE_LIBS += $${entryLib}$${QT_LIBINFIX}d
Expand Down
1 change: 0 additions & 1 deletion mkspecs/win32-g++/qmake.conf
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ QMAKE_LFLAGS_CXX11 =
QMAKE_LFLAGS_CXX14 =
QMAKE_LFLAGS_CXX1Z =
QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections
QMAKE_LFLAGS_USE_GOLD = -fuse-ld=gold
QMAKE_LINK_OBJECT_MAX = 10
QMAKE_LINK_OBJECT_SCRIPT = object_script
QMAKE_PREFIX_SHLIB =
Expand Down
2 changes: 1 addition & 1 deletion qmake/generators/win32/msbuild_objectmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool)
<< tagValue("Platform", tool.SingleProjects.at(i).PlatformName)
<< closetag();
isWinRT = isWinRT || tool.SingleProjects.at(i).Configuration.WinRT;
isWinPhone = isWinPhone = tool.SingleProjects.at(i).Configuration.WinPhone;
isWinPhone = isWinPhone || tool.SingleProjects.at(i).Configuration.WinPhone;
}

xml << closetag()
Expand Down
4 changes: 0 additions & 4 deletions qmake/generators/win32/msvc_objectmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2399,11 +2399,7 @@ bool VCFilter::addExtraCompiler(const VCFilterFile &info)
if (!CustomBuildTool.Description.isEmpty())
CustomBuildTool.Description += ", ";
CustomBuildTool.Description += cmd_name;
// Execute custom build steps in an environment variable scope to prevent unwanted
// side effects for downstream build steps
CustomBuildTool.CommandLine += QLatin1String("setlocal");
CustomBuildTool.CommandLine += VCToolBase::fixCommandLine(cmd.trimmed());
CustomBuildTool.CommandLine += QLatin1String("endlocal");
int space = cmd.indexOf(' ');
QFileInfo finf(cmd.left(space));
if (CustomBuildTool.ToolPath.isEmpty())
Expand Down
4 changes: 2 additions & 2 deletions qmake/generators/win32/msvc_vcproj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1428,11 +1428,11 @@ void VcprojGenerator::initWinDeployQtTool()
// itself contains the original subdirectories as parameters and hence the
// call fails.
// Neither there is a way to disable this behavior for Windows Phone, nor
// to influence the parameters. Hence the only way to get a release build
// to influence the parameters. Hence the only way to get a build
// done is to recreate the directory structure manually by invoking
// windeployqt a second time, so that the MDILXapCompile call succeeds and
// deployment continues.
if (conf.WinPhone && conf.Name == QStringLiteral("Release|ARM")) {
if (conf.WinPhone) {
conf.windeployqt.CommandLine = commandLine
+ QStringLiteral(" -list relative -dir \"$(MSBuildProjectDirectory)\\")
+ var("OBJECTS_DIR")
Expand Down
Loading

0 comments on commit ad16478

Please sign in to comment.