Commit Graph

2016 Commits

Author SHA1 Message Date
Oswald Buddenhagen
1da25fe85a fix excessive execution of code meant for examples only
qt_example_installs.prf is loaded by every sub-project inside the qt
tree, as qt_build_config adds it.

Change-Id: Ice7e81b280b6964ed5cc1b9f1501bf74df737d7e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-15 10:55:44 +00:00
Oswald Buddenhagen
1480066592 employ return() inside qt_example_installs.prf gainfully
reduces the indentation level.

Change-Id: I7851ffc5e9ecaaa3ae375d14fd245ea3747f61b2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-15 10:55:40 +00:00
Oswald Buddenhagen
4e5af88a8c configure: fix detection of icu in static build
don't complain about library inline sources which have 'builds' but no
'libs'.

Task-number: QTBUG-62150
Change-Id: Ib215d438fc02ebdafde95f31cd48088b1bafc663
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-15 10:55:35 +00:00
Oswald Buddenhagen
ad70f2ed20 configure: simplify construction of QMAKE_CONFIG_CACHE
there doesn't appear to be a reason for the former complexity.
QMAKE_CONFIG_LOG was already assigned the simple way.

Change-Id: I6b7e3b5b97c7647237841fa5e16c4959079edc16
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-08-15 10:55:31 +00:00
Oswald Buddenhagen
49cb039a5c make compiler invocation error messages mention host/target
it's unclear where to look for the error when the message talks about
'g++' when '${CROSS_COMPILE}g++' would have been expected. help it by
saying whether it was supposed to be the host or target compiler.

this also centralizes the error emissions in a function.

Change-Id: I454c6ff7c0e7dd945dcee0de01e2818caeeb7409
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2017-08-11 06:38:56 +00:00
Alexander Volkov
d12d2949d1 uic: Add -no-stringliteral option
... and use it when building shared libraries and plugins.
It prevents application crashes in cases when libraries and
plugins are unloaded and their strings are still used by
the main application.

Task-number: QTBUG-51602
Change-Id: I4af79183f18c5ed6142d55af02a36fe4334f3fee
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-08-03 09:59:15 +00:00
Frederik Gladhorn
6c2bfbf88e Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/dev 2017-08-02 23:15:27 +00:00
Alexander Volkov
bf6ae8406b Compare versions in qmake files with versionAtLeast
Change-Id: Iba5686131d9f3e22e9a4d6da473a61a845b0418e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-02 21:08:07 +00:00
Oswald Buddenhagen
ee07b912a1 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/plugins/platforms/xcb/qxcbconnection.h
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
	src/plugins/styles/mac/qmacstyle_mac.mm
	src/widgets/widgets/qdockarealayout.cpp
	src/widgets/widgets/qmainwindow.cpp
	src/widgets/widgets/qmainwindowlayout.cpp
	src/widgets/widgets/qmainwindowlayout_p.h
	tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
	tests/auto/other/macnativeevents/BLACKLIST
	tests/auto/widgets/widgets/qmenu/BLACKLIST

Change-Id: Ic8e724b80a65e7b1af25511b0e674d209265e567
2017-08-02 22:52:32 +02:00
Thiago Macieira
f54f7d8470 configure: Add a feature to write tests in the .json file
We're adding a lot of unnecessary files that end up later as cargo-cult,
for at most a handful of lines. So instead move the testcases directly
into the .json file.

The following sources were not inlined, because multiple tests share
them, and the inlining infra does not support that (yet):
- avx512
- openssl
- gnu-libiconv/sun-libiconv (there is also a command line option to
  select the exact variant, which makes it hard/impossible to properly
  coalesce the library sources)

The following sources were not inlined because of "complications":
- verifyspec contains a lengthy function in the project file
- stl contains lots of code in the source file
- xlocalescanprint includes a private header from the source tree via a
  relative path, which we can't do, as the test's physical location is
  variable.
- corewlan uses objective c++, which the inline system doesn't support

reduce_relocs and reduce_exports now create libraries with main(), which
is weird enough, but doesn't hurt.

Done-with: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change-Id: Ic3a088f9f08a4fd7ae91fffd14ce8a262021cca0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-02 16:37:48 +00:00
Oswald Buddenhagen
6f735b6839 configure: factor out $$qtConfScalarOrList()
we'll need it in more places.

Change-Id: Ia7e3d9ea4a27cc01294bde4cafe6721eb9f59343
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-02 16:36:22 +00:00
Kai Koehne
6b7b37cf2e Windows: Automatically set metadata for all Qt apps
Move the logic to set default values for VERSION,
QMAKE_TARGET_DESCRIPTION to qt_app.prf. This way,
a lot more executables get sane defaults.

Change-Id: I8394418c118a8877cec792eddc8894397c0fbf2d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-31 06:19:06 +00:00
Kai Koehne
79737d03bc Windows: Simplify generic tool description
Make the tool description even simpler so that e.g. moc shows up as
"Qt Moc". The 'description' is shown in various places as the mere
title, so it shouldn't be too verbose.

This augments change ad68bf51e7.

Task-number: QTBUG-61970
Change-Id: I4b30b95a10d597a9a8a2c388c2381ea38a340be6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-31 06:19:02 +00:00
Kai Koehne
ad68bf51e7 Add executable name to description of Qt tools (Windows)
Change f046ed395a set the default values of VERSION and
QMAKE_TARGET_DESCRIPTION for Qt tools to generic ones. The version and
description is shown in the properties of the executable, but also
used for crash reports. For the latter it wasn't clear anymore which
tool actually crashed.

The patch therefore adds the executable name to the generic description.
Tools can still overwrite the description on their own.

Task-number: QTBUG-61970
Change-Id: I8366db22f88f0d6575e7f482f030b3c4f05af6c5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-19 13:38:01 +00:00
Simon Hausmann
407302fb1b Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/corelib/io/qwindowspipewriter.cpp
	src/widgets/styles/qcommonstyle.cpp

Change-Id: I0d33efdc4dc256e234abc490a18ccda72cd1d9e6
2017-07-19 09:47:29 +02:00
Joerg Bornemann
a23568be6c Fix CONFIG+=silent for MSVC non-inference rules
silent.prf modifies the compiler commands by prefixing them with a
silencing echo command. For MSVC, the used $< syntax is only valid in
inference rules. However, the PCH rule is not an inference
rule and breaks when silent.prf is used.

Remove the echo command for MSVC. The compiler already outputs the
currently compiled file. There's no need to do it twice.

Task-number: QTBUG-61688
Change-Id: I7e2c1211e471c9c149c16cac8e87406e88ee2d97
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-14 18:49:56 +00:00
Gabriel de Dietrich
d38fe875c7 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
    src/widgets/widgets/qmainwindowlayout.cpp

Change-Id: I306b4f5ad11bceb336c9091241b468d455fe6bb6
2017-07-13 16:36:10 -07:00
Tor Arne Vestbø
16799ba394 Only try to resolve library paths via linker for Drawin clang
Task-number: QTBUG-61735
Change-Id: Ia8e777928aa0cff44f092968eac14d32501a5d73
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-08 16:59:07 +00:00
Tor Arne Vestbø
1b73c202ce macOS: Add LLDB debug script when building with separate debug info (dSYM)
The script will look for the most recent Qt Creator version on the system,
and pick up the LLDB summary providers from there, allowing pretty-printing
of Qt types inside LLDB/Xcode.

LLDB will detect the file when loading the dSYM, and inform the user that
the file can be loaded to enable the formatters. The script can be loaded
automatically by adding the following setting in ~/.lldbinit:

    settings set target.load-script-from-symbol-file true

Which comes as a slight security risk, as other libraries might have
scripts of their own. The alternative is to load the script directly
from ~/.lldbinit:

    command script import "<path to debug script in dSYM>"

With an optional target.load-script-from-symbol-file set to false, to
silence the warning when loading the dSYM bundle.

Change-Id: I01ba51dab725a8d0a58f1ad1749742443b639cc5
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-07-07 18:09:45 +00:00
Giuseppe D'Angelo
353fb118c3 Fix detection of QMAKE_DEFAULT_LIBDIRS with Clang under Linux
With 4183475080, Qt fails to build if
qmake is unable to detect the compiler's default include and
library search paths. Clang on non-Darwin systems was missing working
code for the detection.

Unlike GCC, Clang on its own does not print the library search paths
when called with the -v option.

On Darwin, the -Wl,-v option will reach ld64, which will print those paths.
However, neither GNU ld nor gold will print anything useful with just
-v. GNU ld has a --verbose option that does print some search paths, but
those are not the ones used when ld is invoked (via collect2) by GCC or
Clang, so it can't be used.

To make Clang print its library search paths one can use
-print-search-dirs, which however doesn't print include search paths. So
amend the existing code in order to make a second call to clang on
non-Darwin systems. This second call is used for library path detection,
and fixes the build on non-Darwin (tested on Linux).

Change-Id: Ic858f908ee1a2e0eb307abb074daee0ded38abd5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-07 16:23:46 +00:00
Liang Qi
7f269a5db8 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	.qmake.conf

Change-Id: I43531e087bb810889d5c1fbfcdffb29b78804839
2017-07-06 13:54:25 +02:00
Liang Qi
c2b224a758 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/corelib/io/qprocess_unix.cpp
	src/plugins/platforms/xcb/qxcbconnection.cpp
	src/plugins/platforms/xcb/qxcbwindow.cpp
	src/widgets/util/util.pri
	tests/auto/corelib/thread/qthread/qthread.pro
	tests/auto/corelib/thread/qthread/tst_qthread.cpp

Change-Id: I5c45ab54d46d3c75a5c6c116777ebf5bc47a871b
2017-07-04 16:05:53 +02:00
Thiago Macieira
d3590d32a5 Disable the -Wstringop-overflow warning from GCC 7
It prints the warning even if we surround the affected code with
QT_WARNING_DISABLE_GCC("-Wstringop-overflow") (see e4eaa62943),
so we have no alternative other than to disable the warning completely.

Change-Id: Ia3e896da908f42939148fffd14c488c4006040e6
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-03 16:01:04 +00:00
Joerg Bornemann
b446275ac7 Make Qt's VersionInformation resource strings consistent
The strings in Windows VersionInformation resources should be
capitalized by convention, and the entries are usually not terminated
by a dot. However, "Ltd." is an abbreviation and should be
dot-terminated.

Change-Id: Ibea3443ac38846e29a3e77ab3e8d5d77b9370272
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-07-03 06:02:03 +00:00
Joerg Bornemann
f046ed395a Set VERSION for Qt tools
This creates a VersionInfo resource on Windows for Qt's tool
executables similar to what Qt's DLLs contain.

Task-number: QTBUG-55755
Change-Id: I9e5d7bedaec9d14f29a9eeeb6697b07241f860d8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-07-03 06:01:49 +00:00
Maurice Kalinowski
798c526919 winrt: remove legacy checks
Any version prior to 2015 is not supported anymore.

Change-Id: I9ccc87fc506521b560fda1b4c88f9c3aebd7a485
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-07-03 05:32:54 +00:00
Maurice Kalinowski
f74098d683 winrt: Update capability management
Introduce uap3 namespace which is used for newly introduced
capabilities. In addition, the autodetection of namespaces for
capabilities within the uap namespace is disabled in Visual Studio
lately. Hence, the output needs to be more verbose including the
namespace for a capability.

Task-number: QTBUG-60899
Change-Id: Ia1ccf825d4c257d2661e34c195c45fd37e0b6413
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-07-03 05:32:53 +00:00
Liang Qi
ab2c1f9509 Merge "Merge remote-tracking branch 'origin/5.9.1' into 5.9" into refs/staging/5.9 2017-07-02 16:24:12 +00:00
Liang Qi
339dd36b27 Merge remote-tracking branch 'origin/5.9.1' into 5.9
Change-Id: Ic02646cbab8fd627bc73dac0c52d515d4084bbb0
2017-07-02 18:23:00 +02:00
Oswald Buddenhagen
23e2cc38ff fix QMAKE_DEFAULT_INCDIRS detection with Xcode targeting uikit platforms
uikit/sdk.prf replaces QMAKE_MAC_SDK_PATH with a make expansion of that
variable, which of course does not work when we use the contents
directly.

amends 6d5489f5d.

Task-number: QTBUG-61690
Change-Id: Id77dff8ee7d737dd35f74cc7d39faaa50b4b1ab9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-07-02 15:38:32 +00:00
James McDonnell
b2ec7317c8 Add query of default include/library paths for QNX
Change-Id: Iafc5a573a2ddb277d2a786cb6b48521985defe44
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-06-29 14:13:04 +00:00
Jake Petroules
fa7626713b Allow using Xcode Command Line Tools to build Qt
Some users don't want to download the full Xcode installation which can
weigh upwards of 5 GB download and 20 GB installed.

[ChangeLog][macOS / iOS] Qt can now be built using just the Xcode
Command Line Tools, without needing to install the full Xcode IDE.

Task-number: QTBUG-35928
Task-number: QTBUG-41908
Change-Id: I6d13c9a03ab9087b3ab56e8547f53f0cc2806c7b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-06-29 02:00:12 +00:00
Jake Petroules
3c89c71da5 Fix handling of deprecated QMAKE_IOS_TARGETED_DEVICE_FAMILY
Since the mkspecs always set QMAKE_APPLE_TARGETED_DEVICE_FAMILY, it will
never be empty, and the warning message and automatic fallback to
QMAKE_IOS_TARGETED_DEVICE_FAMILY will never be used.

Task-number: QTBUG-60430
Change-Id: I79e36d355dae3f8a4429d73e753fed3c090a5d24
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-06-29 02:00:05 +00:00
Christian Strømme
11d36bd9eb Revert "don't overwrite pre-existing INSTALL for target"
This reverts commit c0e94dd093, as it
introduced a regression for applications that sets an installation
target (on Android), which a lot of our examples do. The installation
target for Android applications/libraries needs to be within in the
application bundle's directory tree, or it won't work.

Task-number: QTBUG-61635
Change-Id: I8c919ef3888d7679b0f9659796f5e590bc1faa57
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-06-27 10:38:40 +00:00
Tor Arne Vestbø
4183475080 Error out when compiler is unable to produce default include/library paths
Adds a bit of extra safeguard to ensure we don't accidentally fall into
the generic unix isEmpty(QMAKE_DEFAULT_{INC,LIB}DIRS) code-paths.

Change-Id: Id760b32cd29cb2b9db1390c174e1637e2dddaabc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-06-25 22:01:21 +00:00
Liang Qi
ce09ef4313 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/corelib/io/qprocess_unix.cpp
	src/corelib/io/qprocess_win.cpp
	src/plugins/platforms/android/qandroidplatformintegration.h
	src/plugins/platforms/windows/qwindowscontext.cpp
	src/plugins/platforms/windows/windows.pri
	src/tools/uic/cpp/cppwriteinitialization.cpp
	src/widgets/doc/src/widgets-and-layouts/gallery.qdoc

Change-Id: I8d0834c77f350ea7540140c2c7f372814afc2d0f
2017-06-19 16:12:34 +02:00
Oswald Buddenhagen
72d4f0750b don't auto-create install targets for static libs
these are not meant to be deployed, so the install hack should skip
them.

Task-number: QTBUG-42830
Change-Id: I870499dca2cfea87bf0048f019d651ce9cc5d788
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-06-17 06:47:59 +00:00
Oswald Buddenhagen
c0e94dd093 don't overwrite pre-existing INSTALL for target
while it's mildly insane that we auto-generate install targets to start
with, we can at least refrain from doing so if there is one already.

as it happens, this removes the need for excluding the qt build
explicitly.

Task-number: QTBUG-38452
Change-Id: I74d5df447fba525fa79896c9be2c71d82bc2c6ce
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-06-17 06:47:54 +00:00
James McDonnell
d0706ae3a3 Enable stack-protector-strong for QNX 7.0.0
This was originally enabled in the mkspecs for 64-bit QNX 7.0.0
but that broke when the qtConfig change was made.  It looks like
qtConfig shouldn't be used in the platform mkspecs.  I suspect
the stack-protector changes were left out of the 32-bit mkspecs
so that 6.6.0 builds wouldn't be affected.

Ignore the stack-protector/stack-protector-all possibility since
it isn't possible to access it without a command line option.
Specifying both options doesn't even make sense since
stack-protector-all encompasses stack-protector.

For now, leave out command line control of this feature.

Task-number: QTBUG-59644
Change-Id: I99323216be5b592dd2c3bef6d22da195764a6e65
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-06-13 14:01:24 +00:00
Tor Arne Vestbø
77c2dd4017 Only use -Xarch when specifying precompiled header if building multi arch
The -Xarch option is not supported by ccache, so unless we need to
distinguish precompiled headers for multiple architectures it's better
to not pass it.

Change-Id: Iae02d37f7a89aedebecedff7290f88d2de1ca362
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-06-12 16:05:33 +00:00
Joerg Bornemann
2e8aecc379 Do not disable MSVC extensions when generating moc_predefs.h
Do not pass /Za to MSVC to generate moc_predefs.h, because this option
is incompatible with compiler options like /fp:fast that may be
user-specified.

The /Za option added, because moc failed parsing header files that
contain MSVC extensions. Moc was fixed in 94a2aec0, and we can safely
remove the /Za option.

Task-number: QTBUG-58391
Change-Id: I9791224b1773d0f81d2bbb7915787a7c5e68430c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-06-12 10:27:17 +00:00
Oswald Buddenhagen
5dab77ba96 build the configure tests in the top-level build dir
there isn't really a point in doing strict shadow builds of them, and
it complicates stand-alone building of sub-projects (because it points
below the build root).

Task-number: QTBUG-58372
Change-Id: Ia3bde3826baac44749b27452fd4aeb9491ecb94e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-06-12 09:55:39 +00:00
Oswald Buddenhagen
76223ecbaa complain when toolchain.prf fails to run the compiler
Task-number: QTBUG-60059
Change-Id: I2babe8aaf7cdf5912686f679d14bebc82231a846
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-06-12 09:55:32 +00:00
Oswald Buddenhagen
1216f596bd make qconfig.pri export QT_<compiler>_VERSION variables again
... and rename those determined by toolchain.prf to QMAKE_* (this was
already the case for the newly introduced msvc and icc variables).

this restores the ability for user projects to query the toolchain qt
itself was built with, which is necessary for compatibility checks.
in fact, we may do such validation in toolchain.prf itself at a later
point.

Change-Id: I35f4c393c5e4e0fe987c0844714b7a8f8687c24e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-06-12 09:55:26 +00:00
Thiago Macieira
dfdc466dc1 Add proper detection of x86 RDRAND instruction
The instruction is "RDRAND", but the feature name, according to GCC, is
RDRND, so I had to change some macros in qsimd_p.h.

Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5166779137e63
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-06-12 06:14:48 +00:00
Tor Arne Vestbø
3702b3f68b Pick up default library paths for clang
We need to actually run the linker, otherwise clang will just
run the preprocessing step as we asked for. We build as a shared
library to not have to provide a main() function.

Change-Id: Ied34757bb5c43a862bf2d9778340c497b93d572f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-06-09 00:09:33 +00:00
Liang Qi
7cbee56296 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/widgets/widgets/qmenu.cpp

Change-Id: I6d3baf56eb24501cddb129a3cb6b958ccc25a308
2017-06-07 14:02:43 +02:00
Jani Heikkinen
934235e967 Revert "moc: remove _MSC_EXTENSIONS #define"
It seems this change is preventing us to integrate qt5.git in '5.9'

This reverts commit c3030d7163.

Task-number: QTBUG-61204
Change-Id: Id98afaa23be0a8dd6f2c54a899f46542c65436aa
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-06-05 09:00:54 +00:00
Thiago Macieira
b7d76e533c MSVC: Enable standard-conformance mode by default
That's not the same as -Za.

Change-Id: Ica9894dc9b5e48278fd4fffd14bb316b687abffe
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-06-03 03:35:57 +00:00
Oswald Buddenhagen
d56d2e0cb2 don't redirect licheck's stderr
it uses it for interaction.

Task-number: QTBUG-61017
Change-Id: I9edc0f9aa91793bc451fa78a8f6ad11d61e04b57
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-05-31 12:57:43 +00:00
Oswald Buddenhagen
cb4bc34cb1 fix module version number in qt modules' cmake config files
this actually just makes the code more straight-forward.

amends f8607045c.

Task-number: QTBUG-60936
Change-Id: Iaa05b474206cf29352f9bba516936ff30b90a778
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-05-31 12:57:28 +00:00
Oswald Buddenhagen
9e04102180 fix library retrieval in pkg-config source, take 2
the entry's libs field is supposed to be a single pre-quoted string.
that implies that the libs and libpaths need to be joined first.

amends 7e298e2f.

Task-number: QTBUG-60925
Change-Id: Id85b2784e3c081b3ff8eb9ee2216976691f8580d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-05-31 12:57:23 +00:00
Oswald Buddenhagen
6dcd944dee make mkspecs not mess up library and include search paths
adding shared install paths to QMAKE_{INCDIR,LIBDIR} in the spec has the
tiny side effect that they are searched _first_, which is generally a
really bad idea - they should be _last_.

for that purpose, make QMAKE_{INCDIR,LIBDIR}_POST live up to their names
(i.e., search them actually last) and migrate all affected specs to use
them.

Task-number: QTBUG-40825
Change-Id: Ie0de81c3cc49e193186d2fedd7d6c77590c8ef79
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-05-31 12:57:09 +00:00
Joerg Bornemann
c3030d7163 moc: remove _MSC_EXTENSIONS #define
Because we obviously don't support Microsoft's extensions in C++. This
is required because some MS headers have code that isn't proper C++,
like iso646.h:
 #if !defined(__cplusplus) || defined(_MSC_EXTENSIONS)
  #define and    &&

Do not pass /Za to MSVC to generate moc_predefs.h, because this option
is incompatible with compiler options like /fp:fast that may be
user-specified.

This reverts commit e1a70ce4 and re-fixes the issue similarly to commit
d72ac3f3.

Task-number: QTBUG-58391
Change-Id: I5c0143283afed09f98200806c87259c039c00ae1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-05-30 15:34:26 +00:00
Liang Qi
6a772fd201 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	.qmake.conf
	mkspecs/common/msvc-desktop.conf
	mkspecs/win32-g++/qmake.conf
	mkspecs/win32-icc/qmake.conf
	src/platformsupport/fontdatabases/mac/coretext.pri
	src/plugins/platforms/cocoa/qcocoawindow.h
	src/plugins/platforms/cocoa/qcocoawindow.mm

Change-Id: I74a6f7705c9547ed8bbac7260eb4645543e32655
2017-05-29 10:54:41 +02:00
Joerg Bornemann
7e0197e119 Fix VS project generation for ActiveQt server projects
Remove VS 6 support code that was erroneously triggered.

Task-number: QTBUG-60895
Change-Id: I12c0afe09e8fb200e5050c83ac5f34ad2376fd2e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-05-23 06:56:47 +00:00
Liang Qi
550e16b814 Merge remote-tracking branch 'origin/5.9.0' into 5.9
Change-Id: Ia8ac1960387c0f78c32f9d0385bb0aa9a8209af1
2017-05-19 08:57:59 +02:00
Oliver Wolff
3f1548ae82 Restore behavior of using libEGL and libGLESv2 as default for angle
As Qt applications using OpenGL are linked against these libs, merging
them into QtANGLE by default (780105f906)
was a binary incompatible change. This change restores the default
behavior to the one before given change.

If the user wants the libraries to be merged, he can pass
combined-angle-lib to configure.

Task-number: QTBUG-60373
Change-Id: Iedbd3f2ce9284fdde924cfae8d915d6d5fef00db
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-05-11 08:35:54 +00:00
Frederik Gladhorn
6881e1613a Merge remote-tracking branch 'origin/5.9' into dev
Change-Id: I172e3e19ddcc5b7665e6c8382d725e7cc4f9794f
2017-05-10 10:11:57 +02:00
Oswald Buddenhagen
961fe0df2e make configure -list-features print the section field
prefix it to the purpose field. this makes the presentation more
consistent with the graphical tool, and avoids the need to be redundant
in the description.

Change-Id: Iea58885637e0518aa1ec2f69ff05090b7e1e77a9
Reviewed-by: Stephan Binner <stephan.binner@basyskom.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-05-08 14:10:43 +00:00
Oliver Wolff
77d82107b7 winrt: Do not add windeployqt dependency for static builds in VS
Change-Id: Iec6ebbfd73741d511008633b5fe0d9975e975729
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-05-08 10:12:34 +00:00
Liang Qi
d1ea481345 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/network/access/qnetworkreply.cpp
	tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp

Change-Id: Iadf766269454087e69fb216fc3857d85b0ddfaad
2017-05-07 13:08:18 +02:00
Simon Hausmann
50acc86804 Simplify built-in qmake install command
As the directory installation command also works with files as a source
we can unify the external commands, resulting in simpler command lines.

Change-Id: I65013626eedbdb3ce1c77ed230d46edd1603b986
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-05-04 09:40:48 +00:00
Oliver Wolff
d56a6aa124 winrt: Fix manifest dependencies for VS 2017
VS 2017 still uses vclibs version 14/140 and it also strictly requires
the vclibs' publisher to be set in the manifest. As we only support VS
2015 and 2017 the condition for adding additional vclib dependency
information can be dropped.

Change-Id: I813a9ad976339e347fd8d9283d92282e86b2791b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-05-03 06:52:27 +00:00
Simon Hausmann
e4cb8c881f Fix installation of shader files in qtquickcontrols in non-prefix builds
Use the new qmake install command to copy files around, in order to
avoid the '+' trap of the Windows copy command.

Task-number: QTBUG-60214
Change-Id: I7f588dbbfcdd89b7e98dbef7757944ca856815aa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-05-02 15:43:14 +00:00
Allan Sandfeld Jensen
dd03817ab6 Add configure flag to optimize Qt for size
Adds default off configure flag to use compiler optimizations
for size instead of the default speed/size trade-off.

Change-Id: I36702064ef2cc743d2d03a386adf5cefd5371b6e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-29 08:02:19 +00:00
Oswald Buddenhagen
7e298e2f2c don't call pkg-config with --libs-only-L and --libs-only-l at once
the options are mutually exclusive, with the last one winning.

Task-number: QTBUG-60382
Change-Id: Ie6d888ac8be6b22b204fcad93c184477baa38965
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-04-28 16:08:20 +00:00
Oswald Buddenhagen
3250581aed always clear config.log after all
delaying the logging setup until the cache use is determined (which
depends on xspec determination) causes too much trouble.

as already explained in 7ac15ab0f, there is a bit of a gray area when
exactly the log should be cleared anyway.
a more complete solution would cache the tests' output along with the
results and re-log it (with an appropriate marker) upon re-use.

Task-number: QTBUG-59565
Change-Id: I17d457598d885bceafd6505cad5ff074c4ace502
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-04-28 16:08:07 +00:00
Tor Arne Vestbø
d61502a448 Undefine QT_RESTRICTED_CAST_FROM_ASCII for headersclean build step
The module might add QT_RESTRICTED_CAST_FROM_ASCII to DEFINES to
be able to use string literals under the assumption they are UTF8
without warnings from QT_ASCII_CAST_WARN, but this conflicts with
QT_NO_CAST_FROM_ASCII which is added for the headersclean build
step.

Change-Id: Ic1d7b5415350477d751a6c15219d4f8feb816a3c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-24 19:36:18 +00:00
Kai Pastor
03c1c750d6 Don't add Qt5::<ModuleName>Private in CMake < 3.0
This change restores usability of Qt with older versions of CMake which
do not provide a language feature used in the implementation of the new
Qt5::<ModuleName>Private targets.

Task-number: QTBUG-60229
Change-Id: I6a6a1b09be3edca200692250bb8f0d7f6a1b8f7a
Reviewed-by: Stephen Kelly <steveire@gmail.com>
2017-04-23 19:31:19 +00:00
Liang Qi
7950b6b283 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/corelib/tools/qbytearray.h
	src/corelib/tools/qdatetime.h
	src/corelib/tools/qstring.h
	src/corelib/tools/qversionnumber.h
	src/plugins/platforms/android/qandroidplatformintegration.cpp
	tests/auto/corelib/tools/qhashfunctions/tst_qhashfunctions.cpp

Change-Id: Iefd92a435e687a76cd593099e40d9a9620a1454d
2017-04-20 12:31:27 +02:00
Thiago Macieira
47c9b66a8b Disable precompiled headers for small modules
Creating a precompiled header exclusively for a one- or two-file module
is wasteful. The time that it takes to build the precompiled source is
on the same order as a regular compilation, so enabling precompiled
headers for those modules just makes the build slower.

Also make it possible to override the precompiled header by just setting
PRECOMPILED_HEADER to empty.

Change-Id: I0e1a09998253489388abfffd14b5f221288c4826
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-20 05:39:47 +00:00
Jake Petroules
097073fa67 Fix precompiled headers on Apple platforms, with multiple architectures
The original commit only added support for GCC and Clang, but not ICC.

Amends 73331eeb

Change-Id: Id7638cf1b538edb1008fb3aa10754c1f517a994f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-14 00:00:56 +00:00
Thiago Macieira
8ccd38d20d Move Apple-specific -fapplication-extensions option to the mkspec
The Intel compiler does not know about it.

Change-Id: I523b0abacd5148b2bf08fffd14b4748c3b33c8fb
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-04-12 03:37:01 +00:00
Ulf Hermann
49fea13e6d Load android-specific target override in resolve_target
Otherwise, in separate_debug_info.prf, we try to process the original
target, which is not what we actually build.

Task-number: QTBUG-59779
Change-Id: I2b2d2e7b5f87041cc51075da7c3a5b690f94f1f3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-10 10:41:44 +00:00
Thiago Macieira
3d7c4e064f Support different job counts also for ICC LTO
Change-Id: I27b55fdf514247549455fffd14b1cdbd2980d5d6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-07 17:45:04 +00:00
Liang Qi
5d6073be27 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	mkspecs/linux-icc/qmake.conf
	mkspecs/macx-icc/qmake.conf
	mkspecs/win32-icc/qmake.conf
	src/gui/painting/qgrayraster.c

Change-Id: Ib08c45ea3215be05f986ecb3e1f4b37d209aa775
2017-04-07 10:24:33 +02:00
Thiago Macieira
97d7d80e73 Disable MSVC warning 4577 in headersclean
This warning is added in MSVC 2015 and is printed when we use noexcept
in modules we turned exceptions off.

Task-number: QTBUG-59645
Change-Id: Id92f4a61915b49ddaee6fffd14ae3b943ccd2bce
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-07 01:51:44 +00:00
Liang Qi
0fc569184c Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp
	src/platformsupport/fontdatabases/freetype/qfreetypefontdatabase.cpp
	src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
	src/widgets/widgets/qtabbar.cpp

Change-Id: Iaa9daee5f7a6490d56257a3824730a35751ceb05
2017-04-06 14:16:31 +02:00
Robin Burchell
727da2965c qmltestcase: Allow a QML-only testcase to not require a C++ harness
[ChangeLog][qmake] If you use CONFIG+=qmltestcase with no SOURCES, 'make check'
will now run qmltestrunner for you.

Change-Id: Ie9dfaef75494c9b38f6c9a6239754858535d8657
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-06 08:40:17 +00:00
Thiago Macieira
a03390a8b0 Detect the (stated) C++ standard edition at build time
The configure-time detection (cxx11default) isn't enough if the compiler
can be changed. This is especially necessary if Qt is compiled with a
compiler that defaults to >= C++11 (e.g., GCC 6) and then the user
selects a compiler another compiler (e.g., Clang) via -spec option. In
that case, we'd miss adding the -std=c++11 or -std=gnu++11 option to the
command-line, causing the compilation to fail.

As a nice side-effect, even moc without moc_predefs.h will now get the
__cplusplus setting.

Task-number: QTBUG-58321
Change-Id: I74966ed02f674a7295f8fffd14a8be35da9640e1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-31 21:08:32 +00:00
Jake Petroules
0133b59246 Fix CoreText font database build on watchOS
The font database uses UIKit symbols on all UIKit platforms and thus it
must be linked to. Also, limit the missing CoreText.h workaround so
that it is not applied for versions of Xcode where the bug is fixed.

Change-Id: Ia2a94baba6b0df618604a0bc3092fbd2a48d5aea
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-03-30 22:54:31 +00:00
Liang Qi
b48a13fd68 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	examples/examples.pro
	tests/auto/corelib/tools/qchar/tst_qchar.cpp
	tests/auto/other/qaccessibility/accessiblewidgets.h

Change-Id: I426696c40ab57d14dc295b8103152cede79f244c
2017-03-28 09:28:31 +02:00
Liang Qi
7702fe8602 Merge remote-tracking branch 'origin/5.8' into 5.9
Change-Id: Icdd71e9713725bda9c305e338f5c8b41a92ed8e8
2017-03-27 10:42:08 +02:00
Thiago Macieira
e26bcc4d5d Disable -Werror for QNX's compiler
The compiler is mostly GCC in disguise, but the libraries are not. Since
the toolchain is not open, it's difficult to fix issues in it.

Task-number: QTBUG-59671
Task-number: QTBUG-59672
Change-Id: Id92f4a61915b49ddaee6fffd14aea2639153f073
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-03-25 04:50:44 +00:00
Oswald Buddenhagen
28e9867a3c don't try to timestamp injected qvulkanfunctions.h
the target of the injected forwarding header doesn't exist at qmake
time, as it is generated by an extra compiler, so the touch() calls in
qt_module_headers.prf would fail.

the error scenario described in ce942a226 is not applicable to
gui/vulkan, as no bootstrapped modules are involved. therefore, we can
just suppress the timestamping.

Change-Id: I1c9b6fcdf3717069fdbb654e3cb5d73b199192f4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-03-22 15:49:19 +00:00
Oswald Buddenhagen
97be8253fb fix bootstrapped modules in framework builds, take 2
the borrowing of headers always happens from "proper" modules which are
actually built as frameworks if so requested. that means that even
though the borrowing module itself never is a framework, it needs a
framework path and include paths that point into frameworks.

amends 20c7ab44.

Change-Id: Ic582060dd179cc592e9be7792ff02cebdfabd772
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-03-22 14:27:45 +00:00
Thiago Macieira
b71b8ff283 headersclean: Move it from MSVC 2013 to all MSVC versions
Our headers ought to be clean in all compiler versions.

Change-Id: I4a7dc1fe14154695b968fffd14aba9ff9995c618
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-20 21:54:14 +00:00
Paul Olav Tvete
da55b57c40 System library fix for wayland-scanner
Add the option to omit code generated by wayland-scanner, to
avoid the case where the Qt versions replace driver-specific
functionality.

Task-number: QTBUG-58299
Change-Id: I508b18b9392dbd9e2b8233399301c06410f9f5ba
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2017-03-20 14:19:59 +00:00
Liang Qi
ae2695535a Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/corelib/io/qfilesystemengine_win.cpp
	src/gui/text/qdistancefield.cpp
	src/plugins/platforms/xcb/qxcbconnection.h

Change-Id: I1be4a6f440ccb7599991159e3cb9de60990e4b1e
2017-03-20 09:00:44 +01:00
Liang Qi
0c034a649f Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/widgets/widgets/qpushbutton.cpp

Change-Id: I615de00e6e64540c50f658d4d8ab3e002d701a81
2017-03-14 10:52:24 +01:00
Liang Qi
d51c3ecf8e Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	examples/network/network.pro
	mkspecs/features/mac/default_post.prf
	src/corelib/io/qfilesystemengine_win.cpp
	src/corelib/io/qprocess.cpp
	src/corelib/io/qprocess.h
	src/corelib/io/qprocess_p.h
	src/corelib/io/qprocess_unix.cpp
	src/corelib/io/qprocess_win.cpp
	src/corelib/thread/qmutex.cpp
	src/platformsupport/fontdatabases/windows/windows.pri
	src/plugins/platforms/eglfs/eglfsdeviceintegration.pro
	tests/auto/corelib/io/io.pro

Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
2017-03-13 15:55:44 +01:00
Thiago Macieira
e7295c959b Add -Wfloat-equal to Qt's header clean check
Task-number: QTBUG-57649
Change-Id: I15b62e0f9cec482fbb40fffd1490d802c54bf0fe
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-07 10:51:54 +00:00
Jake Petroules
c0af8cef2f Don't pass -headerpad_max_install_names when using Bitcode
It is ignored (and is unnecessary to begin with) in that case,
and emits an annoying warning which this patch silences.

Change-Id: I6059969724b203d6e0e2eea81ad3e3e8f8d536d6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-07 01:05:16 +00:00
Jake Petroules
840aa67146 Fix Bitcode handling for both makefile and Xcode generators
This fixes an issue which caused certain iOS projects to fail to link
when building with Xcode, and also fixes an issue where projects were
only ever built with -fembed-bitcode instead of -fembed-bitcode-marker
for debug builds with the makefile generator.

Task-number: QTBUG-58754
Change-Id: Icf0c9f0d64dbc0b38d6c48bf635c5383a78bd6d5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-03-03 20:25:52 +00:00
Kai Koehne
032d402485 mkspecs: Replace LGPL21 with LGPL license header
Also use canonical contact url.

Change-Id: I04c403f81bb8a8d6d6222573030d1e6d09ec4c3d
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2017-03-03 07:26:43 +00:00
Liang Qi
71264bae08 Merge remote-tracking branch 'origin/5.9' into dev
Change-Id: I84097f8e7b3b2128028bd7693c913d6968b82bfe
2017-03-02 09:04:38 +01:00
Liang Qi
de49839df8 Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	mkspecs/features/moc.prf

Change-Id: Ia71c8e3b3185f7c999bf226d0675051b10b8740b
2017-02-24 20:01:42 +01:00
Oswald Buddenhagen
b9c5c7139e don't assume that configure --foo options' value is 'yes'
otherwise, the invalid "--qpa xcb" would complain about "xcb" being
unknown, rather than "--qpa" missing an argument.

actual booleans are handled by the type-specific callback, just like
-foo would be.

Task-number: QTBUG-59062
Change-Id: I96632dacfb721cfcbf223b76f6c5c38c810e8d0e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-02-24 16:39:58 +00:00
Oswald Buddenhagen
611b7c9ce7 de-duplicate and simplify condition checking in qtConfProcessOneOutput()
amends 90eee08b3.

Change-Id: If1fa2b14d758cc252d9a2ec3f9deedd1dd200c5e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-24 16:39:40 +00:00
Thiago Macieira
6282948e96 Add CONFIG += no_moc_predefs to allow one to escape problems
Sometimes, users need to add compiler flags to QMAKE_CXXFLAGS that
aren't supposed to be passed to the predefs dump. That's especially true
for -include options, as that would change completely what's
defined. Not to mention that -include is a preprocessor option and
shouldn't be in CXXFLAGS in the first place (Automake has CPPFLAGS, but
qmake only has INCLUDEPATH and DEFINES).

[ChangeLog][qmake] Added the ability to suppress the collection of the
compiler predefined macros for moc's use. To disable the collection, use
CONFIG += no_moc_predefs.

Task-number: QTBUG-58857
Change-Id: I4139d5f93dcb4b429ae9fffd14a34d49825d9b85
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-02-23 07:51:50 +00:00
Oswald Buddenhagen
421bbefb9d configure: fix 'use' for detecting static libraries
these statements are assumed to provide dependencies for the currently
detected library. this implies that their resolved content must be
passed to the linker after the to be detected static library.

Change-Id: Ifaaee2ac71bf176e8a0033765fb979fe119deaba
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:47:02 +00:00
Oswald Buddenhagen
fcf0aee044 configure: make it possible to make 'use' conditional
Change-Id: I8390634c5b23bf34692b4f532ab00a7aba690037
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:59 +00:00
Oswald Buddenhagen
52b260fb0f configure: support using libraries by their exported name
Change-Id: Ibe43c587e83e679baa5f0fc91f452ee06c1e293f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:55 +00:00
Oswald Buddenhagen
8ccb46d80e configure: fix cross-module library uses
this went unnoticed, because the only cross-module 'use' so far is that
of egl, for which the code path provided for modular builds happens to
(mostly) work due to the specs already providing the library definition.

amends cc842ca4.

Change-Id: I58c638d896eabd26f27d5cd90e3a7f8eeece9bc0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:50 +00:00
Oswald Buddenhagen
2408166f5a clash-check configure sub-config names
we derive the keys from the last fragment of the parent directory, which
is potentially not globally unique.

Change-Id: I57cf13394984e6e3d902c0f1bb495bd3920bfc75
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:45 +00:00
Oswald Buddenhagen
0f16ac3d64 configure: propagate errors from libraries' transitive dependencies
if a library uses another library which happens to be absent, then the
former must also fail.

amends cc842ca4.

Change-Id: I91f157a6d1ed40b66e196340a282ebe493fcf40e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:39 +00:00
Oswald Buddenhagen
632b1c1345 configure: error out on activating conflicting libraries
Change-Id: I5d7dbeb3b3a653f7151279c7eba9387c107f9c42
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:35 +00:00
Oswald Buddenhagen
59a3abd1f1 configure: generalize command line overrides of library parameters
the outdated ones remain for backwards compatibility; some remain
unchanged.

Task-number: QTBUG-30083
Change-Id: Ia596b854d26b00fcb4f48df0da7ad893650ac1c8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:25 +00:00
Oswald Buddenhagen
5f20954291 add configure -list-libraries
currently mostly for debugging purposes (especially with -verbose).

Change-Id: I8af32c61df0b19861aa79bc4bbdd3f6095dbe9b7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:11 +00:00
Oswald Buddenhagen
7509ccc0f7 add configure -list-features
also actually deletes qfeatures.txt, which was already claimed by
a668c6a6, but not actually done.

Task-number: QTBUG-58411
Change-Id: I686760632fee7c10b01bd2e83f2481b01bc2b774
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:46:05 +00:00
Oswald Buddenhagen
4f2a571f09 fix usage of "empty" libraries
a header-only library in a default location would produce no variables
at all, making it appear undefined. fix this by forcing the writeout of
the QMAKE_LIBS_* variable, and use its definedness (rather than
non-emptiness) as a signifier.

this works for both QMAKE_USE and configure tests'/libraries' 'use'
entries.

Change-Id: Id7a1e23725caba1a91ea4db448b4aeb7fe632393
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:45:52 +00:00
Oswald Buddenhagen
980daa49b2 prefer library's export name when looking up input variables
if multiple library entries provide the same export (as openssl is going
to), it makes sense to make them recognize the same input variables, as
it would be rather counterproductive to require different configure
arguments for each.

Change-Id: Ia32842e95294296d50220297f85689bc92de2d05
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:45:46 +00:00
Oswald Buddenhagen
4a93adba60 configure: refactor qtConfExportLibrary()'s interface
pass the library name instead of a library source object.
improves overall legibility at a marginal runtime cost.

Change-Id: I248ee9622af2b2c37daa2dbc0cc0bca5701d7925
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-02-22 07:45:42 +00:00
Thiago Macieira
0f1b6acab7 x86: Add detection of the AES and SHA New Instructions
The AES instructions were first introduced with the Westmere shrink
(22nm) of the Nehalem architecture. The SHA instructions are still
pending on Intel architecture, but is available on AMD family 17h (gcc
argument -march=znver1).

Both features operate on SSE registers, so that's why the MSVC command-
line argument is the SSE2 one and the configure-time tests depend on
features.sse2.

The qmake feature names end in "ni" because "aes" and "sha" are too
simple and could clash with other uses. The QT_COMPILER_SUPPORTS_ macro
doesn't have the "NI" suffix because it has to match the GCC/Clang
predefined macro.

Change-Id: I445bb15619f6401494e8fffd149dbd1f862ff51c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-02-21 23:48:30 +00:00
Allan Sandfeld Jensen
925a3c6529 Use native support for fp16 where available
Use F16C or ARM FP16 if available at compile time.

Configure check added because older clang compilers have F16C defines
and flags but not all the intrinsics.

Change-Id: I71f358b8fd003e70ab8fcf35097414591e485112
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-16 12:03:45 +00:00
Liang Qi
27432d40f2 Merge remote-tracking branch 'origin/5.8' into 5.9
Change-Id: I2bd2e61bae1eab4fc74fa6accd741ed9ae1f0669
2017-02-14 11:33:02 +01:00
Thiago Macieira
b2ffc4d0a0 moc: remember to quote the path to moc_predefs.h
Task-number: QTBUG-58764
Change-Id: I4baef2edf7624ad69d96fffd14a22209a2bb90be
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-02-12 18:10:36 +00:00
Oswald Buddenhagen
9e579f64d7 don't litter configure test build dirs with .qmake.cache files
there should be only one, at the level of the isolating .qmake.conf.

Change-Id: I25f05864d6f5c1bb5caf2fb4138adb4bb9cc2f22
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-02-08 23:39:36 +00:00
Liang Qi
dd756011da Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	configure.json
	mkspecs/win32-icc/qmake.conf

Change-Id: Ibf40546b024d644c7d9ed490bee15b82597f4d3f
2017-02-08 15:49:18 +01:00
Oswald Buddenhagen
2982d327f7 adjust configure to native build optimizations
don't fail to set up cross_compile early enough. otherwise, we'd
populate the cache for target builds with data for the host.

amends 6b8666c7 and 5060740f.

conversely, pass on extra flags to configure tests when not cross
building.

amends d8be8110 (and 2c5eb3e6).

Task-number: QTBUG-58556
Change-Id: I531d71e06204a0b17ae6dabf017a52e0f2efd9a7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-02-06 16:34:22 +00:00
Oswald Buddenhagen
4e5b013e32 stop exporting QT.*.{libexecs,plugins,imports,qml} in module pris
these are not referenced anywhere, and neither should they, as they are
not relevant to _using_ these modules in any way.

notably, QT.*.bins remains exported - this is because dlls reside there,
so it is necessary for setting up a launch environment.

Change-Id: I7a33c72be6e4789ea29a2fbbcac9588213900b6e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-02-06 16:33:25 +00:00
Oswald Buddenhagen
f8607045c4 stop exporting QT.*.{MAJOR,MINOR,PATCH}_VERSION in module pris
the only users of module versions in the first place are found within
qt's own prfs; even qbs' qt module importer ignores them. but arguably,
the information makes sense.

however, exporting the same barely useful information redundantly is
plain over the top, so remove the pre-split representation.

Change-Id: Iaee69c86d8b7c8b8ef4f3580b8da333aeb8ade2c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-02-06 16:33:18 +00:00
Oswald Buddenhagen
8286399b9e fix installation of header-only frameworks
in a framework build, the headers are inside the "library", so it's
obviously not very wise to suppress its installation on the basis of
it not being there.

Task-number: QTBUG-57656
Change-Id: I026a3e486a2aad6ee0b8e0d264af4385af945e42
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Harald Fernengel <harryf@gmx.com>
2017-02-02 16:09:35 +00:00
Oswald Buddenhagen
dcd5cb9736 Merge remote-tracking branch 'gerrit/dev' into HEAD 2017-02-01 21:00:55 +01:00
Jian Liang
015b53e9b4 Turn on -utf-8 compiler option for msvc2015 update 2 and up
Building qt with msvc would fail with the -developer-build configure
option turned on under simplified chinese locale.
This is because msvc will emit warnings for source files with utf-8
characters which are not representable in CP936, and -developer-build
implies treating warnings as errors.
This patch turn on -utf-8 compiler option for msvc2015 update 2
and up only for building qt.

Task-number: QTBUG-58161
Change-Id: If38ea11eb1f39f8e08efa1cccb92e0eea50daf92
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-02-01 15:04:02 +00:00
Laszlo Agocs
fa8edcba0d Fix Android deployment for 64-bit targets
Match the logic that is used for building.

Change-Id: I9ce6db2357b9b3e19a1e932fae57d376aae406f7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-02-01 09:06:42 +00:00
Thiago Macieira
796517b589 win32/default_pre.prf: remove unused incremental_off CONFIG
Nothing uses this and there's no incremental_off.prf since the MSVC6 purge
in 99f390f9 (dec 2009).

Change-Id: I2bc52f3c7a574209b213fffd149b4bf378805969
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-31 23:14:28 +00:00
Thiago Macieira
b9e82f206c Mark Clang 4.0 as warning-free
Change-Id: If337c17c98844a98b196fffd146e63c38ce1ee7b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-31 23:13:44 +00:00
Jake Petroules
ad4f7b59ea Fix iOS build
This fixes a regression introduced in the merge 318b5856.

Due to the removal of actual simulator_and_device in 5.8 (397f345a6),
conditions using it have become meaningless.

Task-number: QTBUG-58440
Change-Id: I9f874f9f85efa590c40602dbcd07793ff17d35f5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-01-30 17:31:28 +00:00
Liang Qi
246799d8a7 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	examples/network/network-chat/peermanager.cpp
	src/widgets/util/qsystemtrayicon.cpp
	src/widgets/util/qsystemtrayicon_qpa.cpp
	src/widgets/util/qsystemtrayicon_win.cpp
	src/widgets/util/qsystemtrayicon_x11.cpp

Change-Id: I1c026df83818c0ccaf956980370e7522960627db
2017-01-30 12:46:20 +01:00
Jake Petroules
944110089d Build Qt libraries with -fapplication-extension
This ensures at compile-time that Qt libraries do not use any APIs that
are not safe for use in application extensions, and fixes warning
messages that appear when linking to Qt libraries that are not built
with this flag, when used in an application extension.

This is especially important on watchOS where *all* "applications" are
actually application extensions, and on other Apple platforms if
application extensions are developed using Qt.

Task-number: QTBUG-40101
Change-Id: I022046f2584e0222253d33052b0abc221d7c93d6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-01-27 22:10:01 +00:00
Jake Petroules
6d5489f5df Apple: fix QMAKE_DEFAULT_INCDIRS so compiler invocations use the sysroot
The compiler command line used to populate QMAKE_DEFAULT_INCDIRS must
include the sysroot in order to generate the correct paths list.

This fixes a regression introduced in afd8263 which in turn attempted to
fix an earlier regression making it impossible to override the
deployment target in user project files.

Task-number: QTBUG-58325
Change-Id: I93e6b7ef90b2744dd2f03c77da31c692cb194976
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-26 20:10:27 +00:00
Allan Sandfeld Jensen
d03ba0e895 Optimize debug builds when -Og is available
Enables optimizing with -Og if GCC has the option available, this
should produce faster debug binaries without compromising debugability.

Is a privateConfig to limit it to the default Qt build.

Includes two fixes for false positives of maybe_uninitialized triggered
by -Og on gcc 4.9.

Change-Id: I466d7a4070295714189024369312e6cbd36cfacf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-26 17:47:25 +00:00
Thiago Macieira
dcfeeef91e Remove the -no-rtti option from configure
It only applied to Windows (not MSVC, like the help said) and the build
was broken with this option. So remove it, as we clearly never test
this.

[ChangeLog][Windows] The -no-rtti configure option was removed, as Qt
5.8 fails to build under that condition. To disable RTTI on user code,
add to your .pro file: CONFIG += rtti_off.

Change-Id: I2bc52f3c7a574209b213fffd149aae1b8d0cf9df
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-26 07:44:39 +00:00
Liang Qi
318b58562a Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	.qmake.conf
	mkspecs/common/msvc-desktop.conf
	mkspecs/common/msvc-version.conf
	mkspecs/common/winrt_winphone/qmake.conf
	mkspecs/features/mac/default_post.prf
	mkspecs/features/mac/sdk.prf
	mkspecs/features/qt.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/winrt/default_pre.prf
	mkspecs/winphone-arm-msvc2013/qmake.conf
	mkspecs/winphone-x86-msvc2013/qmake.conf
	mkspecs/winrt-arm-msvc2013/qmake.conf
	mkspecs/winrt-x64-msvc2013/qmake.conf
	mkspecs/winrt-x86-msvc2013/qmake.conf
	qmake/generators/win32/msvc_vcproj.cpp
	src/gui/kernel/qwindowsysteminterface.cpp
	src/network/kernel/qhostaddress.cpp
	src/plugins/platforms/mirclient/qmirclientplugin.cpp
	src/plugins/platforms/mirclient/qmirclientplugin.h
	src/widgets/util/qsystemtrayicon.cpp
	tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
	tools/configure/Makefile.mingw
	tools/configure/Makefile.win32

Done-with: Jake Petroules <jake.petroules@qt.io>
Done-with: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change-Id: I4be3262d3994e11929d3b1ded2c3379783797dbe
2017-01-25 20:06:06 +01:00
Alexandru Croitor
91e5c7e1da Inform user that a non-prefix build can't be used on other machines
This implies that using tools like windeployqt and macdeployqt will not
generate a working standalone application.

Change-Id: I002cf6e527e479ccbee2f18df8766648196d6232
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-24 13:11:05 +00:00
Mikkel Krautz
00593d8e37 features/resources.prf: fix use of unescaped backslash
Without this, building a project with qmake -Wall will
always produce the following warning:

    mkspecs/features/resources.prf:22: Unescaped backslashes are deprecated

Change-Id: I0aeedbf470958ab458651a263e3f804ea2d1a0f0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-23 10:27:07 +00:00
Oswald Buddenhagen
5060740fa9 utilize configure results better in native builds
don't ignore detected features for host tools when we're not actually
cross-building.

Change-Id: Id62a3c1c6b7ae422b14efb4fbea0892b05a047cc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: René J.V. Bertin <rjvbertin@gmail.com>
2017-01-20 17:06:50 +00:00
Ulf Hermann
8f960badfc Don't ignore major version "0" when resolving targets on windows
This was missed in dd9ec1564, leading to errors for example when building
with separate_debug_info.

Change-Id: Ibeb8020abe32690bcc691c1ca139508775c91db2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-20 17:05:56 +00:00
Oliver Wolff
d9203fa534 winrt: Add support for Visual Studio 2017
Tested with RC

Task-number: QTBUG-57086
Change-Id: I57ecfd0751538dcba41ebaf028de1bc5b4debbb7
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-01-20 13:09:16 +00:00
Oswald Buddenhagen
6b8666c7f2 don't separate host and target toolchain when not x-building
there isn't a point to determining the values separately if they are
actually the same things.

Change-Id: I74cd2bf39e96d559630709559602c234c38b0c47
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-20 09:29:59 +00:00
Oswald Buddenhagen
f67afee9e9 determine QMAKE_DEFAULT_{INC,LIB}DIRS separately for host and target
note that in principle this leaves room for a race condition, as the
first project to determine the host config is not going to be the
top-level one.
in qtbase and qtdeclarative, this is naturally serialized via the common
bootstrapped libraries (bootstrap resp. qmldevtools). activeqt, qt3d,
qtscxml, and qtwayland all build only one bootstrapped tool each.
qtwebengine makes a fake host build to create files for gyp/gn; the
convert_dict tool is declared a host tool, but isn't actually built when
x-building anyway, and even if, it's serialized on the former. qttools
needs explicit serialization, though. no other host builds exist within
qt as of now.

Task-number: QTBUG-58126
Change-Id: I81a02a2d98f2bfe5d6aaa51119d5e7919549f119
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-20 09:29:52 +00:00
Oswald Buddenhagen
6834d0eecc prevent configure from putting garbage into .qmake.stash
in cross-builds, toolchain.prf was loaded before CROSS_COMPILE was set
up, leading to caching of possibly nonsensical values.

this change also necessitated that msvc-version.conf is loaded only when
toolchain.prf is, which is best done by loading the former from within
the latter. that seems quite appropriate in the first place.

Change-Id: I62577e827a75e335e03df016bd1aa1932643fd6c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-20 09:29:37 +00:00
Oswald Buddenhagen
a4e4f89181 fix up static linking of plugins somewhat
move the code before the linking of qt modules - dependency resolution
would re-order them anyway (or static linking would fail).

on the way, fix up the coding style and rename some variables.

the code to de-duplicate/normalize QTPLUGIN is pulled ahead, which means
that the automatic plugin importing wouldn't make a mess of it any more.
but this is mostly legacy anyway.

Change-Id: Id135470d027f5d84b7f30531425a65efa230f278
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-19 21:48:10 +00:00
Oswald Buddenhagen
9c05ccb6bc put some empty lines between configure runs into config.log
Change-Id: I6c3e3b139752bb9d1b60c590bb1ea72ae2e4fbdf
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-19 21:47:49 +00:00
Oswald Buddenhagen
068fca3cec log configure command line to config.log
that makes the log file mostly self-contained.

for code re-use, the qtSystemQuote() function was factored out.

Change-Id: Ie3469518ba384131b69f5f15c577240e2674d507
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-19 21:47:44 +00:00
Oswald Buddenhagen
f2e39c4a15 inline "committing" of configure command line built-ins
the options may need to take effect before the regular test processing
commences (which is actually going to be the case in the next commit).
the indirection via the callback only obfuscated the code anyway.

Change-Id: I5307b0be15cf4cc2c2db391ce5b5a93f81076b5c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-19 21:47:38 +00:00
Kimmo Ollila
d2d9d26b1e Fix --exceptions flag usage on INTEGRITY
When an executable is being linked and uses a library that has been
built with exceptions enabled, the executable will need the exceptions
flag in order to link in the exceptions handling code.

Change-Id: I3acdb571afbbcaf860fb0ef0482f704f605a9bbe
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-18 13:07:57 +00:00
Maurice Kalinowski
d3eec16862 Remove support for WinRT 8.1 and Windows Phone 8.1
[ChangeLog][QtBase][General] Removed support for WinRT/Windows Phone 8.1.

Task-number: QTBUG-57288
Change-Id: Ifd6d6780cbbdb710d99556ba3d2fb2e514d4f789
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-01-18 12:38:56 +00:00
Friedemann Kleint
5a628fdb98 qt_targets.prf: Bump copyright year
Change-Id: I371fbc28abd6b0e3497e94b7d974fef5d20c7acc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-18 10:25:53 +00:00
Friedemann Kleint
117b3e1b8f qt_targets.prf: Don't unconditionally set product and description
Check on QMAKE_TARGET_PRODUCT/QMAKE_TARGET_DESCRIPTION before assigning
values. This enables providing other values by for example the
Qt tool applications.

Change-Id: I62270ca38b7a9110185f6163b280409dbaf395f6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-01-17 13:58:55 +00:00
Oswald Buddenhagen
342691b802 fix configure --opt=val syntax
the second dash would end up in the option name, which made it obviously
unrecognizable.
but the second dash isn't optional in the first place (as evidenced one
line up), so remove the question marks.

Task-number: QTBUG-57908
Change-Id: I6622fef7d11d7b3c485f16698349d1912037a41e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-06 20:10:56 +00:00
Oswald Buddenhagen
623b191c10 track plugins' qt dependencies
plugins may pull in additional qt modules which may require additional
plugins in turn.

Change-Id: I22264b39c1397666b2dc9079048ed1fc64aa84d9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-06 20:10:46 +00:00
Oswald Buddenhagen
ac740d9d28 statically link plugins for transitive deps' private deps as well
while we already linked the plugins for our own private deps, we failed
to do so for our transitive deps.

this also fixes linking qml plugins if qml is linked only indirectly and
privately.

the code for setting up rpath-link is slightly refactored as a side
effect, with no functional change.

the code for setting up rpath now also sees the longer list of
dependencies, but that's irrelevant, as qtcore always ends up among the
direct deps anyway iff any non-bootstrapped modules are used.

Change-Id: I90dca81a2836c6191ce5d092e16bf7660ee820bc
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-06 20:10:37 +00:00
Oswald Buddenhagen
9576b71fe8 import static plugins also into dlls
static plugins must be actually linked into the target whenever it is
not a static library itself.

apart from fixing qml plugin linkage, this also provides a more generic
fix for the already fixed linking of activeqt controls.

Task-number: QTBUG-28215
Task-number: QTBUG-55279
Change-Id: I9661369bf3dfc6bcf3a5ed563e6716eb3ef6e76e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-06 20:10:24 +00:00
Oswald Buddenhagen
696c3f9af8 complain about various invalid configuration attempts
Task-number: QTBUG-56049
Change-Id: Id5eeb014c2b88195d2d14566a62dcb9185206b37
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-06 20:10:10 +00:00
Oswald Buddenhagen
44a68aff66 name top-level configure scope after the project file
... instead of the directory it resides in, to make it independent of
the user's fs layout. this makes logs more comparable, and little else.

Change-Id: I0ab3e968dad74ef86577f388c8ca1557e3c17ce4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-06 20:10:01 +00:00
Oswald Buddenhagen
d6778c3597 make skipping of configure in sub-repos less arcane
this was introduced in 60e5a1c8 for no apparent reason.

Change-Id: Idcbc6df3df4e4846c76b3e4215d753a1c97e2eec
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-01-06 20:09:45 +00:00
Oswald Buddenhagen
cfba3fff05 move emission of final messages to qmake-based configure
now qmake is the last command called by the unix configure script.
as it happens, this was already the case in the windows script, but only
because it didn't print these messages at all, which it implicitly does
now.

another effect of this is that repositories outside qtbase will now also
get the installation note in modular builds, which makes sense.

Change-Id: I567146936b216185a8e0f61e445222215608bf13
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-06 20:08:56 +00:00
Oswald Buddenhagen
47784b4352 re-introduce config.summary
Task-number: QTBUG-56225
Change-Id: I954cc1055ab0168c06b6618d02b06f63b4122add
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-30 10:25:53 +00:00
Oswald Buddenhagen
7549bbbacb fail early after command line parsing error
we don't want to do the (possibly interactive) license check when the
command line is not valid.

Task-number: QTBUG-18459
Change-Id: I68c3b7ed4646e49865922ab5612f971930698356
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-30 10:25:42 +00:00
Oswald Buddenhagen
8292326f1b configure: make library sources fail more verbosely
log a message in all unsuccessful exit paths.

Task-number: QTBUG-57217
Change-Id: I8b0f2685d327da583c3e42c8149327e05b2a66cc
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-30 10:25:38 +00:00
Oswald Buddenhagen
70a7276840 de-duplicate {mac,uikit}/default_post.prf re valid architectures
Change-Id: Ie9d5a35a7f8578a2588ec004aab086d74986b0eb
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-12-30 10:25:32 +00:00
Oswald Buddenhagen
b5c809eb96 remove redundant arch list truncation in single_arch case
beyond this point, simulator_archs is only used to determine from which
one of the lists the remaining arch came from (and device_archs is
actually never used again). the lists are assumed to be mutually
exclusive, so truncating them won't affect in which of them the first
element of their concatenation is found.

Change-Id: I4736ed7e51f6623efa6bd37892ab1fcf8c83ae8b
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-12-30 10:25:28 +00:00
Oswald Buddenhagen
afd82630c2 delay resolution of darwin deployment target and architectures
there appears to be no particular reason why this ended up in sdk.prf,
and it has become an actual problem now that the sdk is resolved from
default_pre.prf already, making it impossible for projects to override
the deployment target.

Task-number: QTBUG-56965
Change-Id: I8e319d10cdfb95acc1da1f431c8b8d4f76d1168e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-12-30 10:25:22 +00:00
Oswald Buddenhagen
bbf7fa1368 remove pointless conditionals
uikit already implies !host_build, as host builds are executed with the
host spec. and the only darwin alternative to uikit is macos.

Change-Id: I6b47d68bad5d4427640901ff1e32dacf9a4e352b
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-12-30 10:25:17 +00:00
Allan Sandfeld Jensen
9efd29d1e2 Fix GCC 7 developer build
Disables escalating the implicit fallthough warning to an error, since
Qt is not yet free of unmarked implicit fallthroughs.

With this we can clean the code in the dev branch instead of in 5.6 and
5.8, and only backport bug fixes.

Change-Id: Id30ee21b77de6defcb7d5bb1e05e86c0db098481
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-26 12:05:00 +00:00
Stephen Kelly
8266de089c CMake: Create a Qt5::<ModuleName>Private target for each module
Make it depend on the corresponding Private target of each
dependency.  This way, user code can write

 find_package(Qt5Gui REQUIRED)

 add_executable(hello hello.cpp)

 target_link_libraries(hello Qt5::GuiPrivate)

and get the private include directories for both Qt5Core and Qt5Gui.

Don't create the Private target if any of the private include
directories do not exist.  This way, if user code uses one of the
targets, CMake will issue an error if the private include directories do
not exist.  Unfortunately the error is somewhat cryptic (eg, 'the
"Qt5::CorePrivate" was not found'), but this is still an improvement
over an error at compile time.

This is an improvement on the situation described in QTBUG-37417 using
Modern CMake features.

Change-Id: I034f8216c3ec64d1a3309682456a713cac9bf854
Reviewed-by: Kai Pastor <dg0yt@darc.de>
Reviewed-by: Stephen Kelly <steveire@gmail.com>
2016-12-23 19:24:35 +00:00
Jake Petroules
7957d0fbd7 Fix typo in -Xarch handling
Change-Id: I05e1491f3b1b5af28992ea53d513c709e1161a8e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-12-23 19:03:00 +00:00
Thiago Macieira
4d9fbb3345 Remove hard-coded MS compiler versions from the mkspecs
We're asking the compiler anyway, so we can fully use this information
just as well. Note that this actually happens after the spec itself has
been processed, so it was necessary to delay the version-specific flag
handling as well.

Change-Id: Ib57b52598e2f452985e9fffd14587b581d946022
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-23 13:45:26 +00:00
Oswald Buddenhagen
5196d5602c determine msvc compat version in clang spec dynamically
instead of hardcoding the compat version in the spec, run cl.exe (which
needs to be around anyway) to figure out what version to emulate.

Change-Id: I6eae97fe9a78f8e340ecdabcdc0d48738497c6d2
Started-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-23 13:44:57 +00:00
Oswald Buddenhagen
1b5271f27f determine compiler version at build time, not in configure
this makes it consistent with the determination of the default
include/library paths. this makes sense, as it's possible to switch the
sdk/toolchain after building qt (within reason).

a side effect of this change is that for compilers which emulate other
compilers, both the real and the emulated version are now made
available.

Change-Id: Icfcc672c0d2e3d1b5e622993c366063d70ad327c
Started-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-23 13:44:50 +00:00
Oswald Buddenhagen
d0db09681f prune obsolete qml file deployment
static builds of qt have been embedding their qml files via the qt
resource system since qt 5.7, so the code which attempted to deploy them
into mac bundles (introduced in qt 5.2) is useless nowadays.

Change-Id: I830cd2b660f7cab42a46ec8e002a42d9d299b528
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-12-23 13:25:47 +00:00
Oswald Buddenhagen
fe2f8146d4 prune vestiges of DEPLOYMENT_PLUGIN
the code was broken since 5.0, as it still hardcoded the version number
4 for the plugin basenames.
wince is not supported any more, so there is no point in trying to
restore the code to function.

at a later point, we'll make QTPLUGIN universal enough to cover both
static and dynamic deployment.

Change-Id: I0911ce4aff7a799dd471d6218e046f13dca6d49e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2016-12-23 13:25:41 +00:00
Jake Petroules
5574aa986b qmake: add support for launch images in asset catalogs
Task-number: QTBUG-57502
Change-Id: I566522052b7e668b46714138d2cd249505cb999d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-12-22 22:27:46 +00:00
Lisandro Damián Nicanor Pérez Meyer
31f0728ac9 Mark QPA symbols as private
QPA headers are shipped as private symbols, so they should be marked as such.
This helps distros to check which applications/libraries need recompiling
on each Qt patch update.

Task-number: QTBUG-57060
Change-Id: Ie09d4d10e1edb5127d45a05a3dfa3f4c9dd012f2
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-12-21 16:21:13 +00:00
Liang Qi
b131503361 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	configure
	configure.pri
	examples/widgets/painting/fontsampler/mainwindow.cpp
	examples/widgets/painting/fontsampler/mainwindow.h
	mkspecs/features/moc.prf
	src/corelib/global/qglobal.h
	src/gui/text/qtextdocument.cpp

Change-Id: Ica65512e00871695190a14ccea5c275b0165f787
2016-12-16 16:38:33 +01:00
Liang Qi
9bfe3ab71e Merge remote-tracking branch 'origin/5.8.0' into 5.8
Conflicts:
	doc/global/qt-cpp-defines.qdocconf
	src/plugins/platforms/android/qandroidplatformopenglcontext.h
	src/plugins/platforms/android/qandroidplatformtheme.h

Change-Id: I13d51cc66f708138ff4d667ceea7d515992e58a4
2016-12-16 09:45:16 +01:00
Oswald Buddenhagen
ab0cc3055d move all target spec handling to qmake-based configure system
we pull this feat off by booting configure with a dummy spec. the proper
spec gets loaded subsequently.

note that it was necessary to move the cache loading after processing
the early checks (from which the spec handling is triggered). this is
just fine, as the cache is needed only by tests, which are forbidden at
this stage by definition.

Change-Id: I5120e25a8bf05fb8cc5485fd93cf6387301089aa
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-12-13 18:56:34 +00:00
Oswald Buddenhagen
8861b82f9e move qdevice.pri creation to qmake-based configure system
Change-Id: I06540c3b6d98303bd9a218feedfb529993477ed6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-12-13 18:56:28 +00:00
Oswald Buddenhagen
169a40d511 move generation of qconfig.cpp (and qt.conf) to qmake-based configure
this moves us another step towards the "outer" configure doing just
minimal bootstrapping of qmake.

a challenge here was that so far, qmake itself needed qconfig.cpp. this
was replaced by usage of a qt.conf file instead of compiled-in values.
however, to make the executable still self-contained, that qt.conf is
embedded into it (by simple appending of a fixed signature and the text
file).

the qmake with the embedded qt.conf is not used for the qt build itself,
which instead relies on the qt.conf in bin/ as before. however, due to
the missing built-in values, this file now needs to contain more
information than before. but except for a minimal version that is needed
to start up qmake/configure at all, that file is now also generated with
qmake. as some of the newly set up properties are subsequently used by
configure itself, qmake gains a (deliberately undocumented) function to
reload the qt.conf after it's fully populated.

unlike the old implementations, this one doesn't emit redundant qt.conf
entries which match the hard-coded fallbacks. omitting them leads to
leaner files which are more comprehensible.

Started-by: Paolo Angelelli <paolo.angelelli@qt.io>
Change-Id: I4526ef64b3c89d9851e10f83965fe479ed7f39f6
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-12-13 18:56:12 +00:00
Oswald Buddenhagen
42196f4061 nuke configure -host-option
in its current form, it was introduced only in 5.7, mostly as a side
effect of -external-hostbindir (which is now handled differently).
it only ever worked for the macOS and MinGW specs, as a side effect of
them supporting -sdk and -device-option (for good reasons), and was
supported only by the unix configure. it's not believed to be really
useful and complicates matters somewhat, so get rid of it again.

should it ever become actually relevant, it can be re-introduced
properly, probably along with a -host-sdk option for macOS.

Change-Id: Ib078469ea39deb821c7b6a8c67fda9e1a95fedf5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-13 18:55:59 +00:00
Oswald Buddenhagen
e58eb3d6f9 move device spec validation to configure
instead of letting the specs validate themselves on each call, let them
only define a callback for use by the verifyspec configure test. this
is somewhat faster, and allows them to be loaded before qdevice.pri is
populated.

Change-Id: I2b60d006b33bbf42c28949f10ad429520ed32f46
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-13 18:55:52 +00:00
Oswald Buddenhagen
e2eab15e34 write HOST_QT_TOOLS to qmodule.pri instead of qhost.pri
its only consumer is qt_tool.prf, which is an internal api.

Change-Id: Iae90b079c5af60efad2ded70d6ea481212e5353a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-13 18:55:48 +00:00
Oswald Buddenhagen
d004e086a2 move definition of configure -continue switch to builtins
... where it actually belongs, as it should work in each repo in a
modular build.

Change-Id: I5463f0bcacb239900bed0b0f7be9cf32a3eab04e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-13 18:55:37 +00:00
Oswald Buddenhagen
8ebc7e967c move configure -redo handling (mostly) to qmake-based system
the qmake bootstrap uses some of the options, so the configures still
read config.opt for their own purposes, but the general handling is
entirely in the new system now.

Change-Id: I2c6c657d4da01c8d520ac74795454747bb224bdd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-13 18:55:32 +00:00
Oswald Buddenhagen
24cb1580e2 make handling of built-in configure options data-driven
Change-Id: I08b226b6c9255b60393734e8ffcb745ccb63c597
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-13 18:55:28 +00:00
Oswald Buddenhagen
2dcc1a8e46 move preparation of configure test build dir to qmake-based system
Change-Id: I650fb92cfa858bf6d7ff5756aa0efe182f036a55
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-13 18:55:25 +00:00
Liang Qi
6755ec891a Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	configure
	qmake/Makefile.unix.macos
	qmake/Makefile.unix.win32
	qmake/generators/win32/msvc_vcproj.cpp
	src/3rdparty/pcre/qt_attribution.json
	src/corelib/io/qsettings.cpp
	src/corelib/kernel/qdeadlinetimer.cpp
	src/platformsupport/kmsconvenience/qkmsdevice.cpp
	src/platformsupport/kmsconvenience/qkmsdevice_p.h
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h
	tests/manual/qstorageinfo/printvolumes.cpp
	tools/configure/configureapp.cpp

Change-Id: Ibaabcc8e965c44926f9fb018466e8b132b8df49e
2016-12-13 09:39:20 +01:00
Oswald Buddenhagen
e2978d6097 move license check to qmake-based configure system
this also removes the need for passing pre-processed options via
configure.cfg, so get rid of that.

a somewhat unfortunate side effect is that the android-style-assets
feature had to move back to the top level, as the licensing options
depend on it.

Started-by: Lars Knoll <lars.knoll@qt.io>
Change-Id: Id4d1e0ba18b3e3104400293b8f0c7f2f65e68dea
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-12-08 12:40:53 +00:00
Liang Qi
cae32bd04d Merge remote-tracking branch 'origin/5.7' into 5.8.0
Change-Id: I576187a9905802c177ae483e6c29d0f55cf7034d
2016-12-08 08:20:36 +01:00
Thiago Macieira
e1a70ce495 moc: force the Microsoft compiler not to define _MSC_EXTENSIONS
This re-fixes commit d72ac3f35f, which
simply removed the #define but did so at the wrong place. Instead of
forcing the macro to be removed, let's simply not have it defined in the
first place.

Change-Id: Ie6dbad9bbbd9488887e8fffd148dd67d9a31b32e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-12-08 05:09:31 +00:00
Oswald Buddenhagen
b9e800cd99 fix qlalr invocation in silent builds
Change-Id: I8cd5da01dcbcdebe29815a80cc0f65365727465d
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-12-07 06:54:33 +00:00
Jesus Fernandez
1e4054ce2f Add -Wdouble-promotion to headersclean
Fixes: warning: implicit conversion from 'float' to 'double' to match
other operand of binary expression [-Wdouble-promotion]

Task-number: QTBUG-57068
Change-Id: I897a341aca83873bc6abd256a82a3b9f09409833
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-11-30 17:04:17 +00:00
Joerg Bornemann
6515d942ae Set a proper name for the moc_predefs extra compiler
In VS builds the default name is the first word of the command, in this
case "cl". Use the generated file name instead.

Change-Id: I8f0039eeae045f8b9a13caea8bd3e338bbe2ed17
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-30 08:29:18 +00:00
Eric Lemanissier
39fc377bf1 MinGW: reuse gcc-base.conf and g++-base.conf
it allows using optimize_full, ltcg and sanitizers

Change-Id: I3ccf8257145c7d8800c2ebe98c5ac5adcec0dc9d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-11-29 16:23:58 +00:00
Oswald Buddenhagen
f91bbd2438 make handling of qml module search path saner
excise knowledge of QTREPOS from qt.prf - this is a private variable of
the qt build system which the public functions should not know anything
about.

instead, move this handling to a function in qt_build_config.prf (where
QTREPOS comes from in the first place), and call it from qt_app.prf and
qt_example_installs.prf (which should be the only consumers within qt).

qt.prf now also checks that the qml install dir actually exists, which
is not the case during a modular prefix build of qtdeclarative.

not really incidentally, this fixes modular static builds of
qtdeclarative.

Task-number: QTBUG-57308
Change-Id: I31465b9cd400483264fc236934c6f9f26a5fdd73
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-11-25 17:31:02 +00:00
Oswald Buddenhagen
38259594e2 fix use of $$QMAKE_QMAKE, take 2
we can't use $(QMAKE) after all, as this breaks with the visual studio
generator. so massage $$QMAKE_QMAKE into the final form manually
instead.

supersedes 591d9588f in amending 2b6bcd5ff.

Change-Id: I8c7a6c43f9668d88c1cc968dbf5614240f16239a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-11-25 17:30:54 +00:00
Oswald Buddenhagen
591d9588f7 fix use of $$QMAKE_QMAKE
the variable is converted to a format suitable for makefiles only after
the project was read. to access it, one needs to use the exported
makefile variable $(QMAKE).

amends 2b6bcd5ff.

Change-Id: I5eddff4bebbbcf461b565d5033d17a8daff1e6f4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-11-23 09:37:56 +00:00
Oswald Buddenhagen
fedc09daa4 don't mention config.log in error messages before it even exists
Change-Id: I0d56aff4988e92f2e4ce63a6a7939fbb4ceab590
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-11-23 09:37:51 +00:00
Liang Qi
3a0764d625 Merge "Merge remote-tracking branch 'origin/5.8' into dev" into refs/staging/dev 2016-11-18 08:01:52 +00:00
Andy Nichols
dafd0955c6 Enable support for OpenVG
This commit re-enables support for OpenVG in Qt, but not in the
same way as in Qt 4.8.  The first part is about adding a test
and using the new configure system to enable OpenVG.

There is still support code in Qt for setting up EGL to provide a
surface and context for rendering with the OpenVG API, this commit
enables a path to do so.

Normally to get access to an EGLContext from a QWindow you do so via
QOpenGLContext, but in setups without OpenGL but with EGL and OpenVG
this doesn't make sense (there would be no QOpenGLContext). So the
intended way is to use a QWindow to get an EGLSurface, then create
an EGLContext directly (without going through QPA).

Change-Id: I0f75aadbaa3cd006deb7e6fd12cfbb574870fba4
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-11-17 15:00:00 +00:00
Liang Qi
e5ac4afbf9 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	mkspecs/features/mac/default_post.prf
	mkspecs/features/uikit/default_post.prf

Change-Id: I2a6f783451f2ac9eb4c1a050f605435d2dacf218
2016-11-17 14:43:26 +01:00
Liang Qi
b39adf8945 Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8 2016-11-16 13:54:01 +00:00
Oswald Buddenhagen
38e935701c make QMAKE_USE obey QMAKE_LIBDIR_*
this is complementary to configure's makeSpec library source type.

this should be sufficient to make QMAKE_USE += {egl,opengl,opengl_es2}
actually work, obsoleting the need for opengl.prf and egl.prf (and the
currently dysfunct openvg.prf).

Change-Id: I2f7595ac89afa087ea7f0f25060e8e47e6148be9
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-16 12:05:26 +00:00
Liang Qi
90c425642d Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	mkspecs/common/linux-android.conf
	src/gui/opengl/qopengl.h
	src/network/socket/qnativesocketengine_winrt.cpp
	src/network/socket/qnativesocketengine_winrt_p.h
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/eglfs/api/qeglfsintegration.cpp
	src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp
	sync.profile

Change-Id: If70aaf2c49df91157b864cf0d7d9513546c9bec4
2016-11-16 12:35:36 +01:00
Oswald Buddenhagen
1a43199fce configure: turn qtConfOutputPostProcess_*() callbacks into replace functions
now the callbacks don't need to re-export the designated file contents,
which improves the abstraction and removes some boilerplate.

Change-Id: Ifa50313155fc96762025e2610b810ebb71daa373
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:41 +00:00
Oswald Buddenhagen
2b6bcd5ff3 make use of $$QMAKE_QMAKE
there is no need to reconstruct it from scratch.

Change-Id: Ied6f88634f1875b4aa47a39af0d0d89a7ad4a654
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:44:00 +00:00
Oswald Buddenhagen
6cd358db7e mark up output of called commands in configure log
otherwise it's sometimes quite hard to tell it apart from configure's
own messages.

Change-Id: I2f4908344367a9a3ce38e032bf76486fc4552ffd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:43:46 +00:00
Oswald Buddenhagen
d01c774f45 configure: fix caching of includedir results
amends ce7df6ac7.

Change-Id: Id56ee59b5955addb58cc4d0879dc097bdd7841d8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:43:37 +00:00
Oswald Buddenhagen
fa8e467804 fix configure logging when no cache is present yet
this got broken in 2ad4d75754.

however, the new configure system operates from the top-level build dir
anyway, so there is no point in messing with the cache as a reference
point to start with - just use OUT_PWD.

Task-number: QTBUG-57120
Change-Id: I69629bf497931574bff8452939170abb1776ab60
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-15 22:43:28 +00:00
Liang Qi
9808b53fde Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	configure
	src/plugins/platforms/eglfs/qeglfsintegration.cpp
	src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp

Change-Id: Id2da7c775439adb62646d5b741ee7c638042b34b
2016-11-15 09:58:16 +01:00
Lars Knoll
c64e4bf6b4 Make 'use' entries work across module boundaries
'use' entries in the tests and libraries sections of configure.json
files should work acrosss library boundaries, so a test in
qtwayland can refer to a library from qtbase.

Change-Id: Ide02b9985be427a27982a422ca84a29b23145bcf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-14 19:22:26 +00:00
Lars Knoll
6de11782d0 Allow checking for the existence of modules in configure.json
You can now use 'module.gui' to check whether the Qt Gui module
exists in the current build of Qt.

Task-number: QTBUG-56656
Change-Id: Ic73f162ed0578e07c70e3ec3706f285b6d09a41d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-14 19:22:03 +00:00
Hannah von Reth
aeb2768a7c Introduce QMAKE_CD to enable us to cd from one Windows drive to another
On Windows cd does not change the drive. So when you are on drive C:
and type "cd D:\data" it will change the directory on drive D: but not
affect your current working directory.

To also change your drive you have to provide the parameter /d on
Windows, so "cd /d D:\data" will also change the drive.

Task-number: QTBUG-57080
Change-Id: Ib629879534523982eec693cef725f20a535a1a74
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-14 16:03:39 +00:00
Jake Petroules
addf1f45f3 qmake: fix installation of asset catalog files
This strips leading whitespace from asset catalog filenames, which was
causing installation to fail due to incorrectly calculated paths.

Task-number: QTBUG-57090
Change-Id: I80db627262f9d58f4403e2d8ab205bef2113992b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-14 15:48:41 +00:00
Liang Qi
9d50df5511 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	src/corelib/tools/qalgorithms.h

Change-Id: Ib8ce4d5d9ecd5b9c166d5b8b44e58f3e4e7283ff
2016-11-08 10:01:50 +01:00
Oswald Buddenhagen
25a2717f66 fix debug-only builds on debug-and-release platforms
this actually affects only non-framework Darwin builds - debug-only
framework builds are impossible, and Windows is always debug-and-release.

Change-Id: Ia79dbbefc5750168ebd8967fe4afbe173f55a0d6
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-11-07 13:02:44 +00:00
Oswald Buddenhagen
b4979082b8 don't log silent tests to config.log
they were already omitted from the console output; there is no need to
spam the log with them (their completion was not logged, either).

Change-Id: I32c97413d2e6ceb18ee61356855cc6a7fa2222bf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-07 13:02:37 +00:00
Oswald Buddenhagen
6c7f81cac9 don't write "Checking for ..." to config.log
the more precise test/library name is already logged.

Change-Id: I73d3229a9e20a0024582b18bfe9f2848cab5f4ff
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-07 13:02:27 +00:00
Oswald Buddenhagen
c804033f36 don't attempt to install the target of header-only modules
they have none.

Change-Id: I1e5ffa9960c4fac3c708be4820fb40e7909569c8
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-07 13:02:17 +00:00
Oswald Buddenhagen
7ac15ab0ff don't clear config.log unless re-checking
it is counterproductive to clear the log when cached test results are
used, as that makes it hard to determine how they came to be.

-recheck isn't as clear-cut as -recheck-all, as only part of the results
is discarded, and we can't reasonably discard only part of the log. i
opted for clearing the log entirely, as having both the old and new
results in the log would be probably quite confusing.

Change-Id: Ibb391f2ba2ea86d73c23365d46cc66ed8a2158d6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-07 13:02:14 +00:00
Oswald Buddenhagen
2ad4d75754 move empty cache() call back to configure.prf
the new configure system doesn't use this type of caching. also, it's
invoked via qt_parts.prf, which actually has the same call.

Change-Id: Ifa1e810e24330b59a1eb9f883eb0500642a212f3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-07 13:02:10 +00:00
Oswald Buddenhagen
66ad9668f3 fix iteration over a feature's outputs
use precalculated path instead of incorrectly assembling it from
scratch. it accidentally worked when the features happened to be in the
right order, as the iteration variable 'feature' from the calling
function was inherited. however, if the feature was accessed via
dependency resolution, things blew up.

amends 90eee08b3e, which presumably came to be this way due to a missing
adjustment to a refactoring.

Change-Id: I78b0acc0682cfc27a458df014ce14262a65c6241
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-07 13:02:02 +00:00
Oswald Buddenhagen
890a4d40ec nuke obsolete comment
amends 56ee007b3.

Change-Id: Ida4f79ae72f185ce1f4cca9add30e3084da9c5bf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-07 13:01:58 +00:00
Richard Moe Gustavsen
68a0bd8592 iOS, mkspec: only link in qiosnsphotolibrarysupport for iOS
The plugin depends on AssetLibrary.framework, which is only
available for iOS.

Change-Id: I798c87b57881210ced8e4a7399c1e45d130ee357
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-11-07 08:50:16 +00:00
Tor Arne Vestbø
e79ceb9734 Merge remote-tracking branch 'gerrit/5.8' into dev
Change-Id: Ib31cae9b57f6fb078739c409162bf2987eb430ad
2016-11-05 01:53:17 +01:00
Liang Qi
e918605f42 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/corelib/json/qjsonparser.cpp
	src/gui/opengl/qopengl.cpp

Change-Id: Ib4d3208398399691839e6c6eaeb9006f99e3a62b
2016-11-04 11:39:15 +01:00
Liang Qi
1dcd61d553 Merge "Merge remote-tracking branch 'origin/5.8' into dev" into refs/staging/dev 2016-11-02 09:50:40 +00:00
Liang Qi
d7e4980132 Merge remote-tracking branch 'origin/5.8' into dev
Blacklist tst_QMenuBar::taskQTBUG46812_doNotLeaveMenubarHighlighted() on macOS.

Conflicts:
	mkspecs/features/mac/default_post.prf
	mkspecs/features/mac/sdk.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/uikit/sdk.prf
	src/angle/src/libEGL/libEGL.pro
	src/platformsupport/fontdatabases/fontdatabases.pro
	src/platformsupport/platformsupport.pro
	src/plugins/platforms/cocoa/qnswindowdelegate.mm
	src/plugins/platforms/direct2d/qwindowsdirect2dintegration.cpp
	src/plugins/platforms/ios/ios.pro
	src/plugins/platforms/ios/kernel.pro
	tests/auto/widgets/widgets/qmenubar/BLACKLIST
	tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp

Task-number: QTBUG-56853
Change-Id: If58785210feee3550892fc7768cce90e75a2416c
2016-11-02 09:24:11 +01:00
Jake Petroules
f2e98192d9 Remove unnecessary CONFIG-=simulator from qtConfTest_compile
This was added in 28f5d79316 in
conjunction with CONFIG+=single_arch, but CONFIG+=single_arch on its
own is enough to properly disable unwanted architectures for configure
tests in simulator+device builds now that exclusive simulator and device
builds have been removed for all relevant configurations. This change
therefore fixes the -sdk iphonesimulator build for the upcoming merge
from 5.8.

Change-Id: I57fa2c4f0782a84755a39c6edfce2dcfec554c40
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-01 22:33:48 +00:00
Oswald Buddenhagen
0239b4f217 decouple packageExists() and PKGCONFIG from qt configuration
users may want to use pkg-config regardless of whether qt itself was
built with it. that's particularly relevant when using binary packages
on macos while trying to use 3rd party dependencies from homebrew.

Task-number: QTBUG-36256
Change-Id: I15e6d0bf5cdaff4274e2d7c07917e97f29157a5c
Reviewed-by: Massimo Callegari <massimocallegari@yahoo.it>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-01 07:56:43 +00:00
Liang Qi
a732576a66 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	config.tests/win/msvc_version.cpp
	configure.pri
	mkspecs/macx-ios-clang/features/default_post.prf
	mkspecs/macx-ios-clang/features/resolve_config.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/uikit/resolve_config.prf
	src/corelib/io/qsettings_mac.cpp
	src/corelib/json/qjsondocument.cpp
	src/plugins/platforms/cocoa/qcocoawindow.h
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/cocoa/qnswindowdelegate.h
	src/plugins/platforms/cocoa/qnswindowdelegate.mm
	src/plugins/platforms/ios/ios.pro
	src/plugins/platforms/ios/kernel.pro
	src/plugins/platforms/ios/qiosintegration.h
	src/plugins/platforms/minimalegl/qminimaleglintegration.cpp
	tests/auto/gui/painting/qpainter/tst_qpainter.cpp
	tools/configure/environment.cpp

Change-Id: I654845e54e40f5951fb78aab349ca667e9f27843
2016-11-01 06:02:55 +01:00
Joni Poikelin
c34d289c44 Fix building when lex source refers to a file generated by yacc
Scan lex and yacc sources for dependencies as if they were C source code,
which is close enough to reality.

This will unfortunately result in the generated source files depending on
the generated headers, while it should have been the object files created
from these sources which have that dependency. But qmake cannot do better,
and this is good enough.

Task-number: QTBUG-56507
Change-Id: Ic3e1941bf2e2820bfddf99deba854e1e82f83669
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-01 04:41:21 +00:00
Lars Knoll
cc842ca4aa Enable the "use" option for library checks that come with a test
The "use" option was so far only available for tests, to define that
the test requires usage of a certain library. Extend this to libraries,
so they can also define that running the test for the library requires
usage of another lib.

Change-Id: I2749c21e27c08ad6e12040590317c06c97f493db
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-28 12:38:12 +00:00
Jake Petroules
d10c4f08d4 Be more robust about ensuring that device and simulator are set
These CONFIG entries are also needed during configure, and preemptively
fixes build errors uncovered by an upcoming forward merge, due to code
restructuring.

Change-Id: I39ae5e0f24bbd43dd3c04225d42cce4edd199094
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-28 12:38:02 +00:00
Liang Qi
af0d0b9c06 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/plugins/platforms/ios/ios.pro
	src/plugins/platforms/ios/kernel.pro
	src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.h
	src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileengineassetslibrary.mm
	src/plugins/platforms/ios/optional/nsphotolibrarysupport/qiosfileenginefactory.h
	src/plugins/platforms/ios/qiosintegration.h
	src/widgets/widgets/qcombobox.cpp
	tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp
	tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp

Change-Id: Ibaee7cbbba99e7c4b1d8926e55932ffa6030ce45
2016-10-27 10:23:39 +02:00
Lars Knoll
ed99ffdc32 Write PKG_CONFIG_EXECUTABLE to qmodule.pri
... and use that variable in qt_configure.prf to find the pkg-config we
detected during qtbase configuration.
This is required for modules outside of qtbase being able to use
pkg-config to configure external libraries.

We do not use the PKG_CONFIG variable any more, as that interferes with
the $$pkgConfigExecutable() function, which some Qt modules still use.

Change-Id: I8886a266207e04301009fe8207c16b02c5455b2f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-26 13:29:35 +00:00
Oswald Buddenhagen
c70d77dc76 add launch targets to qt apps
this enables running non-installed prefix builds.

Change-Id: I4169f276ff28506d0532cfe01a03e0fa102a25f8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-26 08:50:47 +00:00
Oswald Buddenhagen
4184e15654 make use of top-level return() to beautify code
Change-Id: Ia192aab9981a790f1a74a83d4894395b454ab0c1
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-26 08:50:43 +00:00
Oswald Buddenhagen
c00af2a383 fix over-exposure of private dependencies
QT_FOR_PRIVATE should end up in QT_PRIVATE instead of QT after being
recorded in the private module pri. otherwise it's added to LIBS and
becomes part of the library's (and thus also the public module's) link
interface. after the fix, only the (semantically redundant) resolution
of qt module dependencies will add the private deps, and only when the
private module is explicitly requested.

Change-Id: I3378457013cad5fa611a22ccbe184e6aa675a2ef
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-26 08:50:40 +00:00
Oswald Buddenhagen
d507cd40b6 unset OBJECTIVE_SOURCES and QMAKE_OBJECTIVE_CFLAGS after absorbing them
this is a bit easier on the backwards compat code in qt creator, which
needs to merge and then de-duplicate the lists itself.

Change-Id: I79f9319c26af541f5efa85700878e7ddbd00e2b7
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-25 17:49:49 +00:00
Oswald Buddenhagen
fe8f387794 don't moc OBJECTIVE_SOURCES twice
since 9ff1310af, the variable's contents are simply added to SOURCES,
and the variable is not cleared. and qmake does not de-duplicate ...

Task-number: QTBUG-53905
Change-Id: I3e551d21cbbd2d0cbfbf7aa7efaa5babac112f9d
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-25 17:49:37 +00:00
Tor Arne Vestbø
7437ede145 macOS: Don't build auto-tests as application bundles unless explicitly requested
Consistent with other Unix platforms, and internally consistent between tests,
as a lot of tests were already applying CONFIG -= app_bundle manually.

Change-Id: Icd2b7e1c08015b26137af60ff82fddbc753f0ff4
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-23 10:39:56 +00:00
Liang Qi
28628a5d5e Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/plugins/platforms/eglfs/qeglfshooks.cpp

Change-Id: I483f0dbd876943b184803f0fe65a0c686ad75db2
2016-10-22 21:19:57 +02:00
Giuseppe D'Angelo
20aea39298 Enable QT_NO_NARROWING_CONVERSIONS_IN_CONNECT in Qt's own build
Change-Id: I3a8c1cfa20fd4f946ee2e16a027a8c6439102020
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-10-21 21:52:31 +00:00
Oswald Buddenhagen
1e701cf062 quote regexps
the parens aren't matched, so the syntax was bogus.

amends 32a3413b13.

Task-number: QTBUG-56580
Change-Id: Ic00ba50844b822c7e4524ae81fbb1bc112a158a9
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2016-10-20 19:23:48 +00:00
Oswald Buddenhagen
32a3413b13 make-expand cflags before passing them to $$system()
mac/sdk.prf puts some indirections into them.

Task-number: QTBUG-56580
Change-Id: I8ffd2438309702466edd3ad5c51284c7cab4fda9
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-19 11:42:26 +00:00
Oswald Buddenhagen
3a1245fdac slightly improve logging of library probing
Change-Id: Idd137251c6db5effd3571591d837d49e8fb9525d
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-18 05:59:19 +00:00
Oswald Buddenhagen
7c1d640c0c stop exporting the library versions
all users of this functionality have been removed, and not emitting the
version info saves quite some noise from the generated files.

the reason why the users have been removed is that it was unreliable in
the first place: if a dependency is found without pkg-config, no version
information would be available.

the extraction of the version via pkg-config itself is kept in place, as
configure tests could be potentially optimized by utilizing it.

this reverts much of commit 48b4e0bf6f.

Change-Id: I01917f3b2a56b747d7cc54955141d20d23d0990a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-18 05:59:14 +00:00
Oswald Buddenhagen
14fed674ae propagate the correct library variable to the private module pri
amends 310bf3f57.

Change-Id: I6706e9435b7af558a3639d5824330d57430bb057
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-18 05:59:08 +00:00
Oswald Buddenhagen
d715667b20 normalize name of plugin default linkage overrides
QTPLUGIN.<foo> is better used with valid variable names, which is not
the case when the plugin type contains slashes (plugin subtypes) or
dashes (just so). normalize these chars to underscores.

Change-Id: Icc93d952b93fef342e2fc93f20e9c5dd010dd734
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-17 13:44:39 +00:00
Oswald Buddenhagen
9a3073a98d don't strip off plugin subtypes
this code is meant to strip off the file name if provided (as the
accessibility plugin in qtdeclarative does), but clearly overshot the
mark by stripping the subtypes (as needed by qtmultimedia, and soon
qtbase as well). use a stricter regexp which matches only names with an
extension, which is a Good Enough (TM) approximation.

Change-Id: I63afe9c7b1b0ebf4da530dcf558e9c84ae3c85ec
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-17 13:44:36 +00:00
Liang Qi
d90b155c60 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	mkspecs/macx-ios-clang/features/resolve_config.prf
	src/testlib/qtestcase.qdoc

Change-Id: Icefa63056ffb37106f35299a8f19165535571799
2016-10-17 11:02:54 +02:00
Oswald Buddenhagen
418494ecb6 fix QMAKE_DEFAULT_*DIRS resolution with apple SDK, take 2
the code got factored out to an own toolchain.prf file, which is
load()ed from default_pre.prf, so no change at first.
however, on mac, we shadow toolchain.prf, and make it load() sdk.prf
first.

a side effect, it has become harder to disable the use of an sdk
altogether: putting CONFIG-=sdk into a project file or the qmake
command line has no effect now. instead, it's possible to put it into
.qmake.{conf,cache}.
to make it simpler again, it's conceivable to finally add qmake -pre,
which would allow setting variables before default_pre.prf is executed.

take 2: there was nothing wrong with the original patch, but in 5.8,
CONFIG+=simulator_and_device moved from qconfig.pri to various prf files
that would do it according to the simulator_and_device configure
feature, which would be way too late for the "pulled ahead" sdk.prf
loading. as simulator_and_device is now gone entirely, it is safe to
re-apply this patch (mostly) as-is.

Task-number: QTBUG-56144
Change-Id: I6cf484982eaed8af39f7a539c60f5a087a299914
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-16 00:12:11 +00:00
Oswald Buddenhagen
4e945ea2f8 Get rid of simulator_and_device CONFIG option (mostly)
A separate flag is no longer needed now that simulator and device builds
are not exclusive any more (*) - both 'simulator' and 'device' being set
at the same time is a sufficient indication (uikit/default_pre.prf sets
this up according to the simulator_and_device feature and the
QMAKE_MAC_SDK variable).

(*) xcodebuild mode actually still uses exclusive builds, but this is
activated locally in uikit/default_post.prf, and uikit/xcodebuild.prf
implements the actual build passes manually anyway, so this change does
not affect it.

Change-Id: Idf173a7bfeb984498d3a49ed6b8d1a16da6c2089
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-16 00:11:59 +00:00
Oswald Buddenhagen
56395c5cc1 limit ability to override QMAKE_MAC_SDK
project files may not override QMAKE_MAC_SDK any more, which seems to be
no big loss. it is still possible to override the sdk on the configure
command line (but note that this only ever worked for the target sdk).

this simplification is preparation for subsequent changes.

Change-Id: I3201629af132fa3938b13577854f3b19857a1b5a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-16 00:11:48 +00:00
Oswald Buddenhagen
f25afef61d rely on transitive library dependencies for freetype/fontconfig
so far, we have been delaying the linking, because we didn't want to
make the monolithic platformsupport module pull in spurious
dependencies. however, now that the module was split, there is no need
to play such games any more.

a nice effect of this is that the hideous qpa/*unixfontdatabase.prf
files disappear, and finally freetype_dependency.pri also becomes
trivial and is thus inlined.

Change-Id: I255376d592625542310a31222eb6ac965943df99
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-15 18:45:48 +00:00
Oswald Buddenhagen
ec774500fb cleanup related to transitive dependencies
public uses of external libraries are automatically transitive now, so
we can remove some parts which were only meant to pull in transitive
dependencies manually.

this is particularly good for includes() of parts of QtPlatformSupport,
which actually redundantly pulled in the library's sources.

this required making the freetype and fontconfig dependencies public,
which is ok, as in the end, they are used only by platform plugins, so
there is no point in making them private, as plugins are not linked
against anyway (except statically, but there public vs. private doesn't
apply anyway).

Change-Id: Ia2a32f50dc0f8472285675a0903e6ecd142a03b2
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-15 18:45:26 +00:00
Oswald Buddenhagen
cd62d2810b make users of qt modules inherit the modules' public QMAKE_USE
when a module makes an external dependency part of its api, the users of
that module need to know the include paths (and possibly defines) of
that dependency, and also need to link to it explicitly if they want to
access symbols from it directly.
this patch implements this via the usual qt module pri mechanism.

limitation: the external library definitions are in the private pris,
so technically a public module is not allowed to make its external
dependencies public. we don't have (and don't anticipate) such a case.

Change-Id: I2dbbdcfcfc1b200acae151a969976cd668e24f89
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-15 18:45:19 +00:00
Oswald Buddenhagen
9a088e7869 use helper libs via QMAKE_USE
for that, qt_help_lib.prf gains the ability to write "external module
pri" files that contain suitable information for QMAKE_USE.

these files have a bunch of limitations:
- they are not installed, because a) they are not relocatable and b) the
  helper libs' headers are not installed, either
- it won't work with qmake -r, which is ok, as qt5 does not build with
  qmake -r anyway
- deps are not transitive, neither at build nor at use time

the freetype, harfbuzz-ng, pcre, and png helper libs have been adjusted
accordingly, and their uses replaced with QMAKE_USE instances. this also
allowed inlining the now trivial {harfbuzz,pcrc,png}_dependency.pri
files. freetype_dependency.pri remains due to its funkiness.

Change-Id: I16890eecb122e34ec49f3d3e68380d1ea71a198a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-15 18:45:10 +00:00
Oswald Buddenhagen
81755e9623 get rid of Q_FONTCONFIGDATABASE define
use fontconfig feature directly instead.
easier to understand data flow, and less noisy compiler command lines.

Change-Id: If80af4b08933049d553df685b41422d15e1e4f5c
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-15 18:45:04 +00:00
Oswald Buddenhagen
59985b3c29 fix xcodebuilds without -sdk iphonesimulator
the order of the arguments passed to addExclusiveBuilds() determines the
name of the CONFIG flag which actually enables the mode. that is
historically fixed to iphonesimulator_and_iphoneos and we cannot just
change the order.

to get around this, add a new "overload" of the function which allows
specifying the flag independently from the order of the builds, and make
use of it in ios' resolve_config.prf.

amends d2b4a789c.

Change-Id: Ia3fabea0c0c30beae680b57e75bdcdf35ef6503d
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-14 14:54:46 +00:00
Oswald Buddenhagen
a897343601 fix shadow builds with pre-synced headers, part 3
with the new configure system, all modules which have a configure.json
also produce a private config header. the forwarding module pri needs to
reflect that.

Change-Id: If79e10a2643d55ad9aa9815f20297d36d9b9feec
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-14 09:00:36 +00:00
Oswald Buddenhagen
5c57105565 don't include injected headers into linker version script
it makes no sense to version them, as they contain only #defines anyway.

it also removes the need to special-case their location in shadow builds
with pre-synced headers, which we actually failed to do anyway.

Task-number: QTBUG-56286
Change-Id: I4ea717f7be56494cfea0572389bea173d7470b6e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-14 09:00:29 +00:00
Thiago Macieira
b9a32351c8 findclasslist.pl: namespaces can be exported too
You can place the export macros in the namespace declarations on ELF
systems and that will apply to all declarations inside that scope. If a
namespace is exported like that, then we should mark it for versioning
too.

Note that the exporting doesn't happen for declarations in other scopes
of the same namespace, even though the findclasslist.pl script will mark
everything in that namespace. This should not be a problem.

Task-number: QTBUG-55897
Change-Id: I371f5b01e24a4d56b304fffd147274778b980ad2
Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2016-10-13 08:29:02 +00:00
Liang Qi
dfc177e3a9 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	qmake/library/qmakeevaluator.cpp
	(cherry picked from commit 1af6dc2c8fb4d91400fddc5050166f972ae57c9a in qttools)
	src/corelib/kernel/qcore_mac_objc.mm
	src/gui/painting/qcolor.h
	src/plugins/platforms/cocoa/qcocoawindow.mm

Change-Id: I5b3ec468a5a9a73911b528d3d24ff8e19f339f31
2016-10-13 09:49:38 +02:00
Oswald Buddenhagen
65d5bfc63d fix referencing libs fields dispatched to the selected source
the field was "over-expanded", which led to always querying the
non-existing source with an empty name. this broke the handcrafted
openssl library export which uses the feature.

amends c0cc50520.

Task-number: QTBUG-55530
Change-Id: Id019fcb3e7adcecaf47d7a65820179da1617c0f7
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2016-10-12 09:28:47 +00:00
Liang Qi
e166d7d135 Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8 2016-10-11 14:14:31 +00:00
Maurice Kalinowski
c01d989a0c winrt: Enable usage of static manifest files
Previously, manifest files always got processed to perform, e.g., variable
expansion.
This change introduces the 'verbatim' flag for WINRT_MANIFEST.CONFIG to
disable those steps and perform a simple copy of the source manifest.

Task-number: QTBUG-43468
Change-Id: Ie7d4d27376efb3bcf5bc38163496f0a1f1319742
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-10-11 11:14:57 +00:00
Liang Qi
905329200f Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	src/gui/image/qpixmap.cpp
	src/widgets/kernel/qformlayout.cpp

Change-Id: I8a8391a202adf7f18464a22ddf0a6c4974eab692
2016-10-11 07:40:32 +02:00
Thiago Macieira
310bf3f57c Make sure flags from library detections go to the right places
Split them and add -I flags to INCLUDEPATH and -D flags to
DEFINES. Anything else gets reported as a problem and dropped.

This has the benefit that qmake will automatically use -isystem for
those paths if they lie in a system directory. As a consequence of that,
we won't get any warnings in headers located there. There are multiple
cases of glib, gtk, etc. headers producing warnings (such as enums
ending in comma). This does not fix warnings produced by use of macros
declared in system headers, though...

Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: I4b844cb518dbae5ea499811221f9015af985110a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-10-10 16:59:10 +00:00
Liang Qi
3e71810cf3 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/network/access/qhttpnetworkconnection.cpp
	src/network/access/qhttpnetworkconnection_p.h

Change-Id: I11f8641ef482efa8cee1b79977d19cc3182814b4
2016-10-08 17:15:55 +02:00
Jake Petroules
4c26b48633 Allow Qt for UIKit to be built as shared libraries and default to it
Instead of forcing a static build, configure now respects the
-shared flag and defaults to that.

[ChangeLog][Important Behavior Changes] Qt for iOS now respects the
-shared configure flag, and now defaults to this configuration as with
all other platforms.

Task-number: QTBUG-42937
Change-Id: I9e7b2de8f7f8ba031c2610ff5ac0858e357424bd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-10-07 08:34:31 +00:00
Samuli Piippo
62d13e2e9b Skip chmod for separate_debug_info when cross compiling on Windows
Task-number: QTBUG-56289
Change-Id: If6dd07182ed77e87865004c14240bf7f0c764772
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-10-07 05:25:42 +00:00
Liang Qi
ef25620ac1 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	mkspecs/features/mac/default_pre.prf
	mkspecs/features/qpa/genericunixfontdatabase.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/uikit/resolve_config.prf
	mkspecs/macx-ios-clang/features/default_post.prf
	mkspecs/macx-ios-clang/features/resolve_config.prf
	src/corelib/io/qiodevice.cpp

Change-Id: I6f210f71f177a3c3278a4f380542195e14e4b491
2016-10-06 20:12:27 +02:00
Oswald Buddenhagen
57987ad571 fix freetype/fontconfig configure system
convert the ugly config.tests/[...]/freetype.pri file into a custom
callback in configure.pri, and reinstate pkg-config use for freetype.
subsequently, use QMAKE_USE for the actual library references.

this fixes in particular cross-builds, as the new configure was not
passing the necessary information to the test any more, so the old .pri
file misbehaved.

Task-number: QTBUG-54911
Change-Id: I5fc9c254334a2675f7db4d54df4c77637e8e2487
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-10-04 20:20:39 +00:00
Oswald Buddenhagen
cd8b7fb865 make QMAKE_USE parameterizable
it's now possible to declare references which don't cause linking (or
cause only linking).

make use of this in the xcb-static library.

Change-Id: Ic429e0a1200b3a333738ea8d8e576ff64b6cac21
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-10-04 20:20:18 +00:00
Oswald Buddenhagen
1e97037ed9 factor out QMAKE_USE* processing to a separate prf file
this makes it possible for features added via CONFIG to use QMAKE_USE*,
as default_post.prf is processed before all features in CONFIG.

Change-Id: Id0812a0fb1aa5e658548bd2bc6003234085545e7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-04 20:20:06 +00:00
Jake Petroules
0059bf944d Don't add -spec XXX more than once to system command in xcodebuild.prf
The "args" variable would contain the original -spec XXX flags in
addition to the -spec macx-xcode passed in the system command invocation
below. The last use of -spec takes effect, so this code was entirely
ineffective. Consequently, uikit/default_post.prf in the nested qmake
call thought it's still the top-level call and thus added xcodebuild
again, which caused an infinite recursion.

Change-Id: Ie98d8a7f3c1cd875f4a4146af9a66a66b48cc6cb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-10-04 18:33:34 +00:00
Oswald Buddenhagen
546191b03f fix parsing of -system-proxies
this is, in fact, not the same as --proxies=system, and the old
configure handles this by putting special cases before the catch-all
patterns. we achieve this by trying the verbatim names (of all options,
which is admittedly a tad inefficient) before applying the -qt/-system
transformation.

Change-Id: Ic85a9d76d6e8ca95b2e1b5566f047f4b7ac38b98
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-04 08:26:49 +00:00
Oswald Buddenhagen
0872b62b2e make command line parsing more compliant with configure script
- generic --* options are defined to be booleans, without the
  possibility of having an additional parameter
- -qt and -system options don't exist in the --* form
- --foo=bar options exist only in the --* form

Task-number: QTBUG-55610
Change-Id: Ib0480ac6f479df48045c9de8e854a525862ee363
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-04 08:26:39 +00:00
Oswald Buddenhagen
d01133a7fc remove redundant load(qt_build_config)
every repo's .qmake.conf is expected to do it already.

Change-Id: I87ed75d80493d8f1c4548c5b9dadfdaf07b86d7e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-04 08:25:40 +00:00
Oswald Buddenhagen
05786de946 remove obsolete module warning
this is a relic from the early times of the modularization.

Change-Id: I9ca46fa6457bf9ca207b6be1f0637f0349569ddf
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-04 08:25:34 +00:00
Oswald Buddenhagen
9e048799b8 fix msvc build in dirs with spaces
Change-Id: I2df71cce68e59b8d7565fb43953947a9a84970b3
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-04 08:24:58 +00:00
Liang Qi
3e949b75fd Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	mkspecs/features/mac/default_pre.prf
	mkspecs/macx-ios-clang/features/resolve_config.prf
	qtbase.pro

Change-Id: I65b5ebca4942a4f295bdd4ac1568e5c347333aea
2016-10-01 22:15:55 +02:00
Jake Petroules
156e3981db Reorder arguments to qmake self-invocation in xcodebuild.prf
26d44fce3d added support for passing the
configure options to qmake following a "--" argument. This interacted
badly with xcodebuild.prf as the "args" variable would contain the
standard qmake arguments AND the extra arguments following "--"... which
were placed prior to -spec macx-xcode and the path of the .pro file,
causing them to be ignored and thus qmake to print its usage when
attempting to generate Xcode projects for Qt apps on UIKit platforms.

Amends 6a9f38a11d, which fixed the same
issue inside qmake itself.

Change-Id: I3056bd811c2ce958952fec8e05ddef7a063c0646
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-09-30 18:26:49 +00:00
Jake Petroules
28f5d79316 Share the multi-arch infrastructure between UIKit and macOS
There's no reason for this to be separated, regardless of the
support status of i386 macOS builds. Additional architectures may
appear in the future (and currently there's actually 3 - i386,
x86_64, and x86_64h for Haswell CPUs). So this feature could be
used to get combined generic x86_64 and Haswell builds. Some
system libraries appear to have an x86_64h slice in Sierra.

[ChangeLog][Build System] Support for universal binaries on macOS
has been re-introduced.

Change-Id: I1c89904addf024431fdb3ad03ea8ab85da7240ad
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-09-29 21:51:18 +00:00
Oswald Buddenhagen
9f3deee912 purge attempt to install fonts
the fonts have been deleted.

amends c5ceabb9a1.

Change-Id: I8f707ea9da3bf2334d944f047d0ff7c14b3ff4bf
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-09-29 13:45:01 +00:00
Liang Qi
e66d181e65 Merge remote-tracking branch 'origin/5.8' into dev
Change-Id: I3b51bb706e401edfda09a433c67aa58e44f33e83
2016-09-29 12:58:41 +02:00
Liang Qi
cdb56c42fc Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	mkspecs/features/uikit/xcodebuild.mk
	tests/auto/other/lancelot/tst_lancelot.cpp
	tests/auto/widgets/widgets/qmdisubwindow/tst_qmdisubwindow.cpp
	tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp

Change-Id: Ia0ae2de86094120281abd445138877c2cc3e882c
2016-09-29 00:38:01 +02:00
Jake Petroules
6c2d786e19 Add the ability for qmake to build Xcode asset catalogs
This essentially emulates Xcode behavior for QMAKE_BUNDLE_DATA.

This is mostly for our own internal use. No documentation is provided.

Variables introduced:
- QMAKE_ASSET_CATALOGS
- QMAKE_ASSET_CATALOGS_APP_ICON
- QMAKE_ASSET_CATALOGS_BUILD_PATH
- QMAKE_ASSET_CATALOGS_INSTALL_PATH

Change-Id: I9577415d637f022d05f301c5a0d799483cd2a963
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-09-28 17:58:54 +00:00
Oswald Buddenhagen
5dbcced3bf use bindir instead of libdir when launching tools on windows, take 2
this makes build dirs consistent with install dirs, which fixes
launching tests, examples, and build tools in some configs.

unfortunately, this makes prefix builds slower and their build dirs
bigger due to the DLLDESTDIR implementation being stupid (QTBUG-11435),
but i'm not inclined to fix that now. it isn't actually worse than for
non-prefix builds, so whatever.

Task-number: QTBUG-54438
Change-Id: Idbd034620e95cb23f7699d243678c4e9fa6353ac
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-09-28 16:27:59 +00:00
Liang Qi
06bd93c4ac Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	src/plugins/platforms/ios/qiosmessagedialog.mm

Change-Id: Icfbf55c3215ec088e552d0b42a5c94d04b17c65f
2016-09-26 21:43:25 +02:00
Liang Qi
7555a92581 Merge remote-tracking branch 'origin/5.7' into 5.8
5971b88e is not needed in new configure.

This merge also reverts "fix QMAKE_DEFAULT_*DIRS resolution with
apple SDK", 2c9d15d7, because it breaks iOS build with new
configure system.

Conflicts:
	mkspecs/features/default_pre.prf
	mkspecs/features/mac/toolchain.prf
	mkspecs/features/toolchain.prf
	src/dbus/qdbusconnection.cpp
	src/plugins/sqldrivers/mysql/qsql_mysql.cpp
	src/sql/drivers/mysql/qsql_mysql.cpp
	src/widgets/widgets/qmenubar.cpp
	src/widgets/widgets/qmenubar_p.h
	tools/configure/configureapp.cpp
	tools/configure/environment.cpp
	tools/configure/environment.h

Change-Id: I995533dd334211ebd25912db05b639d6f908aaec
2016-09-21 11:57:52 +02:00
Liang Qi
eaec2b664a Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	src/gui/painting/qcoregraphics.mm
	src/network/access/qnetworkrequest.h
	src/plugins/platforms/cocoa/qcocoahelpers.mm

Change-Id: I81266414c06ea2edf63cbc7e93a86bd5d66a31a5
2016-09-21 09:11:02 +02:00
Liang Qi
d148019f16 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp

Change-Id: I0af32ee55936d523cbd259b6fe82eb9c409f9074
2016-09-16 23:16:25 +02:00
Lars Knoll
8d6f2e7e15 Add a QT_REQUIRE_CONFIG(feature) macro
This macro expands into a static_assert and can be used to
trigger a compile error if a certain feature is not available
when trying to compile some code.

This is especially useful to protect against accidental inclusion
of headers that implement functionality related to a feature.

Change-Id: I456c55b989ce5f35f3af0e13c1886a85c23dfe29
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-09-16 12:27:59 +00:00
Oswald Buddenhagen
2c9d15d73c fix QMAKE_DEFAULT_*DIRS resolution with apple SDK
the code got factored out to an own toolchain.prf file, which is
load()ed from default_pre.prf, so no change at first.
however, on mac, we shadow toolchain.prf, and make it load() sdk.prf
first.

a side effect of this is that project files may not override
QMAKE_MAC_SDK any more, which seems to be no big loss. it is still
possible to override the sdk on the configure command line (but note
that this only ever worked for the target sdk).

it has also become harder to disable the use of an sdk altogether:
putting CONFIG-=sdk into a project file or the qmake command line has no
effect now. instead, it's possible to put it into .qmake.{conf,cache}.
to make it simpler again, it's conceivable to finally add qmake -pre,
which would allow setting variables before default_pre.prf is executed.

Change-Id: I149e0540c00745fe8119fffd146283bb214f22ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-09-15 20:01:33 +00:00
Liang Qi
40a1f69e86 Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	configure.json
	mkspecs/macx-tvos-clang/qmake.conf
	mkspecs/macx-watchos-clang/qmake.conf

Change-Id: Iaf32339ace59dff9ed344972472744c55d75025c
2016-09-15 19:47:57 +02:00
Vikas Pachdha
46913db2ea Fixes issue with iOS when project path has a whitespace
Task-number: QTBUG-55505
Change-Id: Ic853ecd46a3cb098fff2904119e9002f3add3b8e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-09-15 10:17:54 +00:00
Lars Knoll
a668c6a6b6 Convert the old feature system
... to the new qmake based configuration system.

This removes the old qfeatures.txt (distributed over configure.json
files) and qfeatures.h (distributed over qconfig-<module>.h files).

qfeatures.prf is gone without replacement, as attempts to use it would
lead to followup errors anyway.

Change-Id: I1598de19db937082283a905b9592d3849d2199d0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-09-15 08:24:10 +00:00
Oswald Buddenhagen
b754b2815d rename description => label in configure.json
"description" suggests something slightly longer.

this may seem like a gratuitous change, but the upcoming replacement of
the old feature system clarifies makes it seem much less so.

Change-Id: Ibe702e01cb146b59127bf1f990b4acaef1c61d55
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-09-15 08:24:00 +00:00
Lars Knoll
2d3c73fcfe Modularize configure.json/.pri
Move the different parts of configure.json/.pri into the libraries where
they belong.

Gui is not yet fully modularized, and contains many things related to
the different QPA plugins.

Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: I6659bb29354ed1f36b95b8c69e7fce58f642053f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-09-15 08:23:53 +00:00
Lars Knoll
60e5a1c8ef Modularize the new configure system (infrastructure part)
This change implements the required infrastructure to modularize the new
configuration system.

This requires a hierarchy of configuration files, both for handling
multiple repositories and for individual modules inside the same
repository.

When configuring, they all need to get loaded first, as command line
processing needs to know about all possible command line options.

When the command line has been processed, the individual configuration
files need to get processed one after the other and independently from
each other.

Configure is now automatically invoked when building the a project
tree's "root" project; this works with both modular and top-level builds
of Qt (the latter with an according change in the super repo). As an
immediate consequence, the -skip option moves to the super repo with a
different implementation, as configuration is now done after the repo
list is determined. The option belongs there anyway.

This commit also adds an optional testDir entry to the json file. Like
this, we can still have all configure tests in qtbase/config.tests and
the configuration file in, e.g., corelib can reference those.

The files section can now be left out as long as a 'module' entry is
present, specifying the module name. The names of the files to generate
can then be deduced from that name. We still need to be able to specify
names directly for the global configuration files.

qtConfig() now also queries features which are module-specific. As it is
sometimes necessary to query the configuration of modules which should
not be actually linked (and cannot in the case of subdirs projects), the
new variable QT_FOR_CONFIG which allows specifying configuration-only
dependencies is introduced.

Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: Id1b518a3aa34044748b87fb8fac14d79653f6b18
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-09-10 14:04:01 +00:00
Lars Knoll
b95b00c61a Be more robust when reading the library version number from pkg-config
Ignore everything that after the initial period separated numbers.

Change-Id: I376b154ff0ab6e3877223ec1383ed4708ecd2164
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-09-10 14:03:43 +00:00
Maurice Kalinowski
5d771eb0c8 Add BLACKLIST to builtin_testdata
For platforms which require packaging the testdata into the application
resources, the BLACKLIST file needs to be added. Otherwise it will not
be found during runtime.

Change-Id: I2d5c3b3040b3b268bc73254459b8b902b7fae4e2
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-09-07 04:54:16 +00:00
Liang Qi
23ef3b04eb Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8 2016-09-06 06:56:27 +00:00
Liang Qi
d892e6f721 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	mkspecs/features/qt_common.prf
	src/plugins/platforms/windows/qwindowsdialoghelpers.cpp

Change-Id: I03b92b6b89ecc5a8db7c95f04ebb92ed198098a8
2016-09-05 18:47:27 +02:00
Jake Petroules
beaa792e20 Make TARGETED_DEVICE_FAMILY variable platform independent
This reduces unnecessary OS conditions in qmake since these platforms
are mutually exclusive, and also opens up their potential for use on
future devices (like carOS(?), which is device idiom '5').

This is also more similar to what Xcode does, as the
TARGETED_DEVICE_FAMILY variable is not platform specific.

Change-Id: I29d209cd8e0779f492bda829008264773e13c75c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-09-05 15:24:54 +00:00
Jake Petroules
603628b1ea Make DEVICE_ARCHS and SIMULATOR_ARCHS variables platform independent
This reduces unnecessary OS conditions in qmake since these platforms
are mutually exclusive, and also opens up their potential for use on
macOS to transparently support multi-arch builds like UIKit platforms.

This is also more similar to what Xcode does, as the DEPLOYMENT_TARGET
variables are platform specific, while the ARCHS variable is not.

DEPLOYMENT_TARGET has a use case for being OS specific in qmake (host
tools vs targets), while ARCHS does not.

Change-Id: Icee838a39e84259c2089faff08cc11d5f849758d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-09-05 15:24:50 +00:00
Liang Qi
657c2bfbec Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	tests/auto/testlib/selftests/generate_expected_output.py

Change-Id: If856162abf9a24ae2c9946d336a7d1da03520fa7
2016-09-05 13:57:12 +02:00
Jake Petroules
397f345a6a Remove simulator_and_device handling for the Makefile generator
This patch moves towards a more sensible layout for UIKit platforms,
where both the device and simulator architectures for binaries are
combined into a single Mach-O file instead of separating out the
simulator architecutures into separate _simulator.a files.

This approach is both more common in the iOS ecosystem at large and
significantly simplifies the implementation details for Qt, especially
with the upcoming support for shared libraries on UIKit platforms.

This patch takes advantage of the -Xarch compiler option to pass the
appropriate -isysroot, -syslibroot, and -m*-version-min compiler and
linker flags to the clang frontend, operating in exactly the same way
as a normal multi-arch build for device or simulator did previously.
Exclusive builds are still enabled for the xcodebuild wrapper Makefile,
which builds all four configurations of a UIKit Xcode project as before,
as expected.

A particularly advantageous benefit of this change is that it flows very
well with existing Xcode workflows, namely that:
- Slicing out unused architectures is handled completely automatically
  for static builds, as an executable linking to a library with more
  architectures than it itself is linked as, the unused architectures
  will be ignored silently, resulting in the same behavior for users
  (and the App Store won't let you submit Intel architectures either).
- Removing architectures from a fat binary using lipo does NOT
  invalidate the code signature of that file or its container if it is a
  bundle. This allows shared library and framework builds of Qt to work
  mostly automatically as well, since an Xcode shell script build phase
  can remove unused architectures from the embedded frameworks when that
  is implemented, and if Qt ever starts signing its SDK releases, it
  won't interfere with that either (though binaries are just resigned).

Change-Id: I6c3578c78f75845a2fcc85f3a5b728ec997dbe90
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-09-03 09:47:56 +00:00
Jake Petroules
4eb2feb29c Remove the ability to build simulator/device targets from SUBDIRS projects
This is done because a followup patch will cause simulator_and_device builds
to no longer use exclusive builds and so this feature could not work,
but it is not strictly necessary anyways because users do not need to be
able to do this.

Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: If869fbfea776751553c352c2d652edf745a3638d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-09-03 09:47:49 +00:00
Jake Petroules
73331eebf8 Enable precompiled headers on iOS, tvOS, watchOS
The actual blocker for precompiled headers is not the iOS/tvOS/watchOS
platforms, but the way qmake handled multiple-architecture builds on
Apple platforms.

This patch allows multi-arch builds to be performed while using
precompiled headers.

Since df91ef3d6c55692a0236f67b6c6b134a3bf84098 (April 2009), Clang has
had support for PCH files in the driver, which allows to use the
-include flag to automatically translate to -include-pch. We can then
take advantage of the fact that the -include option is allowed to not
be separate from its argument, which lets us take advantage of -Xarch to
specify a per-architecture precompiled header file.

This is done through some magic in the qmake Makefile generator which
"multiplexes" the PCH creation rule across multiple architectures and
replaces a series of tokens with the proper precompiled header paths
and architecture flags at usage point.

Change-Id: I76c8dc9cda7e218869c2919f023d9b04f311c6fd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-09-02 08:25:31 +00:00
Jake Petroules
261f6ad074 Fix warning about headerpad_max_install_names ignored when using bitcode
Actually enables headerpad_max_install_names in the darwin-g++ mkspec
as previously it was (presumably accidentally) cleared.

Change-Id: I4b2e5a0dcf38658cfe35bc0e5f24769c80f4d877
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-31 22:42:04 +00:00
Jake Petroules
f777b1ae48 Provide better QMAKE_RPATHDIR defaults on Apple platforms
Now QMAKE_RPATHDIR also includes @executable_path and @loader_path
on Apple platforms, and omits any others on iOS, tvOS, and watchOS
since they can't use paths outside the application bundle.

Change-Id: Ia8f76ebcddd51f44eca482a51ce1710369c8df10
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-31 22:41:58 +00:00
Jake Petroules
4e53159d43 Mark Apple Clang 7.x as warning-free on macOS and (also Clang 3.9) iOS
iOS was excluded in 09aeda21b9, probably
unnecessarily. The build has been found to be warning-free.

Change-Id: I81de2fff40938b6ab9f7a6a5b9f08f8a8baadb16
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-31 22:16:02 +00:00
Thiago Macieira
8cfac7fba6 configure: ask pkg-config only for the info we're interested
No need to get libs flags other than -L and -l, since we're adding
everything to the LIBS variable in qmake anyway. We wouldn't want rpath
or other linker flags to leak through.

Change-Id: I7d42fe4b581e49df891cfffd146fab61fecbc5c9
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-31 19:22:34 +00:00
Liang Qi
f510a51dac Merge remote-tracking branch 'origin/5.8' into dev
Change-Id: I843994939f126ced22f7fe978ec4403f599fc7c9
2016-08-31 08:24:21 +02:00
Mike Krus
c3f59f22ee Move ios_devices.pl into uikit folder
Was left behind in previous merges

Change-Id: Ic30cc2b234b904ad819c4e3e57804ac6e58ec1e9
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-30 18:14:32 +00:00
Oswald Buddenhagen
57d4b8f328 de-duplicate code relating to evaluation of 'negative' flags
Change-Id: I3fe4816719d9b2885319a1bb516cfb137f13e3f8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-30 13:24:20 +00:00
Oswald Buddenhagen
793f4ae5c9 remove pointless export from qtConfHandleLibrary()
that variable is not modified in this scope, so there is no point in
exporting it here. it was probably a leftover from an earlier version.

amends c0cc50520.

Change-Id: Ic6f93d8c38d547308aa88ef337fe49bda004b337
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-30 13:24:17 +00:00
Oswald Buddenhagen
03247666ee make qtConfOutputVar() a tad less cryptic
don't use variables where the value is known.

Change-Id: I3ec21441c5b7ee0b028f8f72e05d9e40e6192ecf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-30 13:24:11 +00:00
Oswald Buddenhagen
7e97d360a3 don't export cached libraries which were in fact not found
amends ce7df6ac7d.

Change-Id: I9898e756283a2e2556458bf71b59b0c1c76064ec
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-30 13:24:07 +00:00
Oswald Buddenhagen
95eed6278a fix location of injected headers in shadow builds
they are build-time generated, so they must go to the build dir
irrespective of whether we're using pre-synced headers.

Task-number: QTBUG-55585
Change-Id: I5f10b35c40b0ae2ddc5568d70e254b787ac3f914
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-30 13:23:27 +00:00
Oswald Buddenhagen
f43a258fc4 fix build with configure -sdk iphonesimulator
we need to suppress another qtConfig(simulator_and_device) check during
the configuration phase.

amends 60985aa4.

Change-Id: Iae279d282d47b4c254b7a6f9f33315abe126eff0
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-30 12:55:57 +00:00
Liang Qi
1cc571593a Merge remote-tracking branch 'origin/5.7' into 5.8
cf53aa21bf and 3aaa5d6b32
were reverted because of reconstruction in 5.7.

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

DirectWrite: Fix advances being scaled to 0

Since 131eee5cd, the stretch of a font can be 0, meaning
"whatever the font provides". In combination with ec7fee96,
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
2016-08-29 15:30:17 +02:00
Liang Qi
cc74452d6d Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	configure
	src/plugins/platforms/winrt/qwinrtclipboard.cpp

Change-Id: Ic6d58be3d1ed2bb507f2ba06c82361afd9f9ddb9
2016-08-29 08:13:40 +02:00
Thiago Macieira
2743cd54a0 Mark Clang 3.9 as warning-free
Change-Id: Id75834dab9ed466e94c7ffff1444b71f29f49afd
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-27 19:05:08 +00:00
Liang Qi
c7cdf3aac7 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/corelib/mimetypes/qmimeprovider.cpp
	src/corelib/mimetypes/qmimetype.cpp

Change-Id: Ib483ddb6bfc380e7c8f195feca535703814c3872
2016-08-25 16:12:11 +02:00
Maurice Kalinowski
f4b2115b51 winrt: Add support for version requirements for MSVC2015
Previously we hardcoded the minimum windows version to the initial
Windows 10 release. However features have been added which require a
higher SDK version (eg drag and drop). Deploying such a package might
fail during distribution to consumer devices.

Hence introduce WINRT_MANIFEST.minVersion and
WINRT_MANIFEST.maxVersionTested as variables for the manifest file. If
nothing is specified, both values will be set to the UCRTVersion
environment variable, implying the development setup from which qmake
has been invoked.

Change-Id: I1dcf1e75c67c4ab2fd5a3fdcc32c8783a336e6ff
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-25 13:27:22 +00:00
Oswald Buddenhagen
15c39dfe3d don't cache test result after pre-dep failure
there is no point in doing that, as we don't load it in that case
anyway. in fact, it would lead to caching a new result in every run.

Change-Id: Ia5cb27fa8a5d705d7f32a785b1e3b944f92d8929
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-25 11:59:54 +00:00
Oswald Buddenhagen
0f68ac2512 don't cache results of build_parts and skip_modules
as these tests do nothing but validating the command line, caching the
result is more confusing than anything else.

also make the tests silent, so they don't clutter an otherwise fully
cached configure run.

Change-Id: Ifc3d65278769b36a056650f077fd6274a7e192e7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-25 11:59:15 +00:00
Oswald Buddenhagen
d76a756b03 clean up qconfig/qmodule.pri handling in configure
instead of saving the files away and restoring them afterwards, use the
new and shiny discard_from() function to throw away everything the files
might contain.

strictly speaking, this is not precise, as the pris may also use *=, -=,
and possibly other operations which cannot be trivially undone, but the
purpose is essentially to discard the special outputs of some features
which may affect subsequent tests, for which this is sufficient.

as a side effect, the failure to load qmodule.pri is not fatal any more
(like for qconfig.pri), to save the pointless effort of ensuring that it
exists.

Change-Id: I07625b60c4f2e27b21206b2c16d24ab111737395
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-25 11:56:45 +00:00
Oswald Buddenhagen
d7a2852dd4 remove extra empty line before configure report
Change-Id: Id985e4738dda89e4d1af1ceccda33d830316e66a
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-25 11:54:41 +00:00
Jake Petroules
75211131aa qmake: handle QMAKE_PLUGIN_BUNDLE_NAME in resolve_target.prf
Change-Id: I532dcc4a6595f8b3c8371225cc4fb46fe38d8762
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-25 11:02:47 +00:00
Jake Petroules
aae7a5e09d qmake: Add shallow bundle support
This is a prerequisite for properly constructed framework bundles.

On certain Apple platforms (iOS, tvOS, watchOS), bundles are used
in "shallow" format, meaning that the directory structures are
flattened compared to the one used in macOS bundles.
shallow_bundle allows the difference to be expressed independently
of the platform. Note that the term "shallow bundle" is used by
Apple in Xcode internals.

Change-Id: I1189c52b0ea66843c313783176c11cc2af97ad25
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-25 10:55:31 +00:00
Oswald Buddenhagen
2c5eb3e668 fix conditions relating to host_build in non-cross builds
when it comes to compiler flags (be it warnings or include paths), it
doesn't matter whether we building/using bootstrap libraries, but
whether we are actually cross-building.

amends c55bdc271f and d8be8110a.

Change-Id: Idf988107e9cccc486672c0ee70dc9bdf8eab9d8c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-24 15:28:50 +00:00
Jake Petroules
89c235ca82 qmake: Also add bitcode flags to linker
This fixes errors linking against Qt when built as shared libraries and
with bitcode enabled (default on tvOS and watchOS).

Change-Id: I3eb3bb0b9615e0bc41e43ffae8645248dbf803c6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-20 00:32:07 +00:00
Jake Petroules
57378a108c Add support for Apple watchOS
Change-Id: I3f9e00569458a463af2eaa5a3a16a6afd1e9c1ea
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-08-19 21:05:55 +00:00
Oswald Buddenhagen
8185fe84a6 fix up detection code for compiler defaulting to c++98
- remove the unconditional CONFIG+=c++11 from default_pre.prf, so the
  change actually has any effect
- fix up the description fields somewhat

this amends 091df96fb8, which was rushed in without maintainer review.

Change-Id: I88b859d6e2f0fe3d6a4771afe464a7c445e7b47b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-19 09:25:48 +00:00
Oswald Buddenhagen
ce7df6ac7d add configure test result caching
Started-by: Lars Knoll <lars.knoll@qt.io>
Change-Id: I29bafc5913cf95d9908dbcdd9597df2258b69837
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-19 04:28:55 +00:00
Lars Knoll
b62a42dde1 Remove useless guards around #define's in qconfig.h
These are not meant to be overwritten by command line defines
anyway. Bad things could happen if they are not in sync with
the values in the pro files.

If you want to change them, reconfigure Qt.

Change-Id: Ic456e54b97e6909f01a4f4be33e3d7e2b2571e80
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-19 04:28:48 +00:00
Lars Knoll
3196527c1a Don't define QT_OPENGL_ES_2* in opengl.prf
Defining QT_OPENGL_ES_2 would only lead to conflicts with defines from
qconfig.h.
QT_OPENGL_ES_2_ANGLE also moves to the .pri.
QT_OPENGL_ES_2_ANGLE_STATIC is not used and is removed altogether.

Change-Id: I614fb00525ac696e066ac8328bb9bf61fca08a01
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:28:40 +00:00
Lars Knoll
60985aa42b Use qtConfig throughout in qtbase
Use the new qtConfig macro in all pro/pri files.

This required adding some feature entries, and adding
{private,public}Feature to every referenced already existing entry.

Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:28:05 +00:00
Lars Knoll
56ee007b3f Rework privateFeature
privateFeature would add QT_NO_FEATURE to the DEFINES in the private
.pri file, which was somewhat inelegant.
Additionally, it would add the feature to the _public_ QT_CONFIG
variable, which was plain wrong.

Replace the implementation with the one just introduced for
publicFeature, with the difference that the features are written to the
private files instead.

As this entirely disposes of the old system, all usages in the project
files need to be replaced atomically as well.

Change-Id: I506b5d41054410659ea503bc6901736cd5edec6e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:27:29 +00:00
Lars Knoll
606924132f Add support for safe feature checking at compile time
Added a qtConfig(feature) function to qmake, and a QT_CONFIG(feature)
macro. These can safely check whether a certain compile time feature of
Qt is enabled or not.

For this to work the feature has to have a publicFeature or
privateFeature output in the configure.json file.

In pro files, please use the qtConfig(feature) test function
instead of checking contains(QT_CONFIG, feature), as the latter
will be unreliable with the upcoming modularization (it requires a
load(qt_module_config) before doing any such checks). Note that
feature names are now lowercase, and identical (except for hyphens
versus underscores currently) in the pro and c++ files.

This makes the logic easier to follow, as we avoid all double negations,
and most importantly, QT_CONFIG and qtConfig are implemented in a
way that you'll get a build error for a mistyped or non-existent
feature. This will also prevent accidental use of a widget feature
in gui in the future.

This gives us complete symmetry between the handling in pro and
c++ files.

Change-Id: I60404f97953724e639ffb6386cce2e8b1e4b735a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:27:17 +00:00
Lars Knoll
48b4e0bf6f Improve library version handling
Output the version as a define into the private config header as
a define using a hex number. Like that we can easily do version checks
on libraries using the QT_LIBRARY_VERSION(lib) and QT_VERSION_CHECK()
macros.

Change-Id: I6dc4ac6550886ca95c5542b6e75cd933ed079d76
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:27:06 +00:00