Commit Graph

1913 Commits

Author SHA1 Message Date
Edward Welbourne
601019e3f4 Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/dev 2016-07-22 10:15:48 +00:00
Thiago Macieira
da04322b4c Make moc obey the preprocessor environment variable for include paths
C preprocessors augment their standard list of include paths from the
environment: Unix preprocessors use $C_INCLUDE_PATH (for C) and
$CPLUS_INCLUDE_PATH (for C++), plus CPATH for both, whereas MSVC uses
the an environment variable simply called "INCLUDE". Handling this for
MSVC is particularly important because the VCVARSALL.BAT script sets the
necessary #include paths in the environment for important things.
Without that being parsed, moc won't find some #defines, like
WINAPI_DESKTOP_FAMILY.

[ChangeLog][moc] qmake and moc now cooperate to use the Visual Studio
environment variables (set by the VCVARSALL.BAT script) to find system
include files. A possible consequence is that moc parses application
headers slightly differently, depending on #if conditions that depended
on macros that previous versions had not seen #define'd. Implementers of
other buildsystems are advised to pass the --compiler-flavor=msvc option
to moc.

Change-Id: I7e06274214d1939b0124e5b4bf169cceaef9ca46
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-07-20 02:54:09 +00:00
Thiago Macieira
36d524e6a3 moc: get the system #defines from the compiler itself
In order for moc to properly parse #ifdefs and family, we've had
QMAKE_COMPILER_DEFINES as a list of pre-defined macros from the
compiler. That list is woefully incomplete.

Instead, let's simply ask the compiler for the list. With GCC and
family, we use the -dM flag while preprocessing. With ICC on Windows,
the flag gains an extra "Q" but is otherwise the same. For MSVC, it
requires using some undocumented switches and parsing environment
variables (I've tested MSVC 2012, 2013 and 2015).

The new moc option is called --include to be similar to GCC's -include
option. It does more than just parse a list of pre-defined macros and
can be used to insert any sort of code that moc needs to parse prior to
the main file.

Change-Id: I7de033f80b0e4431b7f1ffff13fca02dbb60a0a6
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-07-20 02:54:03 +00:00
Edward Welbourne
782ebeada1 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	qmake/library/qmakebuiltins.cpp
	qmake/library/qmakeevaluator.cpp
	qmake/library/qmakeevaluator.h
	qmake/project.h
QMakeEvaluator:
* evaluateConditional(): one side changed return type, the other
  changed a parameter type.
* split_value_list(): one side changed a parameter adjacent to where ...
* expandVariableReferences(): ... the other killed one overload and
  changed the survivor

	src/corelib/io/qlockfile_unix.cpp
One side changed a #if condition, the other moved NETBSD's part of
what it controlled.

	src/corelib/tools/qdatetime.cpp
One side fixed a reachable Q_UNREACHABLE in toMSecsSinceEpoch(), the
other moved it from the private class to the public one, in the midst
of the "short date-time" optimization, which confused diff entirely.
One side changed a QStringLiteral to QLatin1String, the other rewrote
adjoining code.

	src/network/kernel/qauthenticator.cpp
Both rewrote a line, equivalently; kept the dev version.

	src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
	src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
One side changed #if-ery that the other removed.

	tools/configure/configureapp.cpp
One side added a check to -target parsing; the other killed -target.

	tests/auto/testlib/selftests/expected_cmptest.lightxml
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt
	tests/auto/testlib/selftests/expected_cmptest.xml
	tests/auto/testlib/selftests/expected_cmptest.xunitxml
Regenerated using generate_expected_output.py
I note that quite a few other expected_* come out changed, now.

There was no git-conflict in
	src/widgets/kernel/qformlayout.cpp
but it didn't compile; one side removed some unused methods; the other
found uses for one of them.  Put FixedColumnMatrix<>::removeRow(int)
back for its new user.

Change-Id: I8cc2a71add48c0a848e13cfc47b5a7754e8ca584
2016-07-19 20:14:40 +02:00
Edward Welbourne
82ea53ad24 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	qmake/library/qmakeevaluator.cpp

One side changed the iterator to use ranged-for, the other changed its
body; they only conflicted because the latter had to add braces around
the body, intruding on the for-line.  Trivial resolution.

Change-Id: Ib487bc3bd6e3c5225db15f94b9a8f6caaa33456b
2016-07-15 20:47:57 +02:00
Lars Knoll
c81f957457 Fix the linkerSupportsFlag configure test type
Change-Id: Iefc874958d1f6d2447f9774a9c3cdf6d7a3b885b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2016-07-15 06:52:25 +00:00
Thiago Macieira
a372cf5a80 Enable -WX (warnings are errors) for MSVC 2015
Change-Id: Ib57b52598e2f452985e9fffd1458b565f9bda0f8
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2016-07-15 01:54:06 +00:00
Lars Knoll
4cb3c3e15a Replace EXTRA_LIBS with EXTRA_LIBDIR and EXTRA_FRAMEWORKPATH
Now that -l and -fw options are gone, using a combined EXTRA_LIBS
makes no sense anymore and only complicates things.

Change-Id: Ic12bf482f3bed041aff7f0891f008b1f34ae2b4d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-07-13 19:51:34 +00:00
Lars Knoll
1f3eab5536 Set QMAKE_DEFAULT_INC/LIBDIRS on MSVC
Change-Id: I19b60e178e7cc3cc5f73e5a9f252f886c8678c3d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-07-13 19:50:58 +00:00
Jake Petroules
5cbe16be78 Set library strip flags on Apple platforms
This was missed in ab599a3931 when
QMAKE_STRIP was set as a side effect of adding support for separate
debug info.

Task-number: QTBUG-54212
Change-Id: I86dd040dbefec4c58879c7d029ed89dd8bad3daf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-07-13 16:50:47 +00:00
Oswald Buddenhagen
a42c9cfc28 generalize references to exclusive builds
exclusive_builds_post.prf (via default_post.prf) processes
debug_and_release into BUILDS, so .prfs which can rely on being
executed later (because they are loaded via CONFIG) can rely on BUILDS
and related variables.

Change-Id: I5677079ad5145bf493af17b4b60347208572fd21
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-07-13 14:27:07 +00:00
Oswald Buddenhagen
fc57a6587b remove redundant condition from private module use warning
the whole point of the check is ensuring that the message is printed
only once for each sub-project, so !build_pass alone is fully adequate.

Change-Id: Ib8f821ead6709efc9bfa935e1d05f8caba02a814
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-07-13 14:27:04 +00:00
Samuel Gaist
07d3cbbe84 Add warning when using pkg-config with a Qt build with it disabled
This patch adds a warning that will be shown when link_pkgconfig is used
in a project but Qt's configuration has it disabled. This can happen
when Qt is built before pkg-config has been installed or if it's not
detected.

This will avoid user losing time trying to make pkg-config work while Qt
just ignores it.

Change-Id: Ieeff8dd6784b9430cfebef355855ec1be91bc96e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-07-13 14:26:38 +00:00
Ralf Nolden
d6177b55ea OpenBSD: add X11R6/lib to QMAKE_RPATHDIR
As OpenBSD ships its own X11, linker errors occur when not explicitly
adding the X11R6/lib dir to rpath dirs.

Change-Id: I75991e9d7de115d2d212a017d9c8f9aa93cecc27
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-07-13 06:50:00 +00:00
Lars Knoll
a64d1d5499 Fix log message
Change-Id: I0192d3a3073038d98e72ce7abd3bf1ecae002989
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-07-08 13:03:20 +00:00
Ralf Nolden
3658354a7d OpenBSD: redefine g++/gcc commands to eg++/egcc to use newer gcc 4.9
On OpenBSD, the system compiler shipped is still gcc 4.2.1 but for proper
C++11 support in Qt, QtCreator and Qt-based projects we need to use
the compilers provided in ports/packages which have the binaries renamed
to eg++/egcc. Therefore, redefine the variables from g++-base.conf to
use the newer compilers.

Change-Id: Ic8ea1c5d2c2c0263dad5ae85c8c747bcd3985b7d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-07-07 09:24:53 +00:00
Lars Knoll
0e1efdf549 Remove the -target command line option
This was only used to specify XP as a target which is
not supported on 5.8 anymore. Clean up all associated
special handling in the mkspecs and pro files.

This effectively reverts change 10a0ac75.

Change-Id: I420d73002912989f1a5be961a2d09277ec4a4425
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-07-05 15:49:03 +00:00
Lars Knoll
8ca247e287 Get rid of the qt_no_framework setting in the CONFIG variable
It's only used in one place, where it's actually not required either.

Change-Id: I5766d2b5f0c1083bbd58a9b9fb07cc67bbd46a94
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-07-05 15:48:58 +00:00
Lars Knoll
27be7c764e Make more configure tests work on Windows
Change-Id: I87d775de7b6d790a44bbc3c9598d617ad57d9d4c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-07-05 15:48:53 +00:00
Edward Welbourne
b5695bd5be Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: Ibd81cd1df4a0650d93fcb556a57be90be2e1f569
2016-07-04 15:58:39 +02:00
Thiago Macieira
cf9b445ed4 Fix the naming of an LLVM tool in common/clang.conf
Probably was copied from the gcc equivalent.

Change-Id: I87e17314d8b24ae983b1fffd14535b9d7f616a1b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-07-02 16:35:01 +00:00
Lars Knoll
c167308c5d Fix handling of -v/-verbose command line flags to configure
This is not a feature that should get propagated to other
configure runs, so simply hardcode support for it.

Change-Id: Ieb1c33243154b3583e91061d3592d7e87c36f402
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-07-02 06:18:40 +00:00
Lars Knoll
3114237877 Call arch test through the new qmake based configure system
Detect host and target architecture from within qmake, and set
QT_ARCH accordingly.

Change-Id: I30255f88c7645d197bd07355a1dff02b377cbbe8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-07-02 06:18:32 +00:00
Frederik Gladhorn
5b66f4ba40 Allow passing configure opts with two dashes again
The regexp were capturing too greedy:
$$replace(c, "^--?(.*)", "\\1") changes --developer-build to
-developer-build. Do not accidentally capture the second dash.

Change-Id: I19586a1678fc3bf3f450ec31f5bd7e71e9514b34
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-01 21:17:53 +00:00
Liang Qi
200fdd96f0 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	configure
	configure.json

Change-Id: Iba032d9a29c273da2585632bc6e22bbafb961808
2016-07-01 13:21:29 +02:00
Ralf Nolden
cc42979e46 NetBSD: add QMAKE_RPATHDIR for standard QMAKE_LIBDIR
NetBSD is heavily dependent on using rpath, so we need to add the
lib dir QMAKE_LIBDIR and QMAKE_LIBDIR_X11 to QMAKE_RPATHDIR
explicitly to avoid linker errors. See http://www.netbsd.org/docs/elf.html
for more info.

Change-Id: I225143d5e2d9a125060b14e3a8a7953927d63b33
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-07-01 07:53:07 +00:00
Maurice Kalinowski
1e662ff166 winrt: Set minimum SDK version to 10586
10586 reflects Update 1, which is the mininum supported version for many
months, hence reflext this in the manifest template as well.

There are additional features (like drag and drop) which require and
even later SDK version. However, they do not reflect the minimum.

Change-Id: I6d71dc499c928ed98c8a25283e0b53994317bb00
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-07-01 07:45:07 +00:00
Oswald Buddenhagen
d0e4f28dea pass pkg-config environment to qmake invocations
qmake tries to use pkg-config when the config.test contains PKG_CONFIG,
which will of course fail without the sysrooted env vars. and unlike in
the old configure, these don't become automatically available by virtue
of the script simply exporting them.

longer-term, the test programs shouldn't mention pkg-config deps
explicitly, as these are redundant with what is specified in the JSON
file. relevant changes are already pending.

Task-number: QTBUG-54403
Change-Id: Ie9d3bbb2e4febffde5fd122d7d0a8b70b8679fcc
Reviewed-by: Liang Qi <liang.qi@qt.io>
2016-06-28 18:23:42 +00:00
Oswald Buddenhagen
16203353d0 beautify generated spacing
don't have extra spaces in the pkg-config calls when no environment
variables are injected.

Change-Id: Ieb14f775b2a04726e8f62114b69d9be7fa662eb0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-06-28 18:23:39 +00:00
Oswald Buddenhagen
0c382efc79 use globally available constants
configure_base.prf gained them in a bugfix in 5.6.

Change-Id: I7763b3dcdfbcc6cfb0392ddc4b6556f926395111
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-06-28 18:23:34 +00:00
Oswald Buddenhagen
a8c98dcb89 fix default inc/lib path detection on msys
using the Makefile target separator to determine the host system is of
course not a terribly good idea. the correct variable to query would be
DIR_SEPARATOR, which always reflects the host. however, a direct os
query is less obscure in this case.

Task-number: QTBUG-54346
Change-Id: I6bc1372a7c9a84a241a97f9f767f046b026411c3
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2016-06-28 10:41:44 +00:00
Liang Qi
06f55f0695 Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/dev 2016-06-23 20:09:58 +00:00
Lars Knoll
fa23682630 Clean up some unused variables in the qmake.conf files
Change-Id: I04cdcc514b851ad529ad62883fda850159447505
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-06-23 19:43:04 +00:00
Oswald Buddenhagen
17519feadd don't override user-provided dependencies for our extra compilers
while the names of the compilers are actually an undocumented internal,
we don't provide an actually working proper way to sequence extra
compiler execution with build-time generated inputs when they are
indirectly listed (as via .qrc files).

Task-number: QTBUG-54299
Change-Id: I269c26512897b72706dc8b769aa47e8157c2a5c5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-23 13:25:22 +00:00
Liang Qi
dd90af1221 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	mkspecs/common/mac.conf
	mkspecs/features/configure_base.prf
	mkspecs/features/configure.prf
	mkspecs/macx-clang-32/qmake.conf
	mkspecs/macx-clang/qmake.conf
	mkspecs/macx-ios-clang/qmake.conf
	src/network/ssl/qsslsocket_openssl_symbols_p.h

Change-Id: I768b592e8e589662b1fdb9b8cbd633fef26845b6
2016-06-23 14:24:55 +02:00
Liang Qi
5cfb80a28e Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/angle/src/libGLESv2/libGLESv2.pro
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp

Change-Id: If8da4cfe8f57fea9f78e7239f378a6302c01674e
2016-06-23 10:29:37 +02:00
Jake Petroules
4b0cb35b84 Fix installation of debug symbols on Apple platforms.
This follows up ab599a3931, which did not
take installation into account.

Task-number: QTBUG-54036
Change-Id: Ic1b3acb8984255dd1ca1c288b7b150814ce9e606
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-06-22 22:30:03 +00:00
Oswald Buddenhagen
1d034244c2 purge vestige: plugin_no_soname is no more
... for a loooong time.
it was replaced by plugin_with_soname (which is unused so far).

Change-Id: Ifc377d155d6eac41e85f3a0914ed817d55b5648b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-22 15:13:02 +00:00
Oswald Buddenhagen
4c630fce9e fix make -i wreaking havoc in configure tests outside qtbase
the tests would inherit MAKEFLAGS, with somewhat predicatble results.

Change-Id: Ia17638f6229d0ae86f5558726850040703d90044
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-22 15:12:57 +00:00
Oswald Buddenhagen
5c38740031 limit installation of ANGLE translator and preprocessor helper libraries
libGLES2 (the only user of these libraries) is built dynamically even in
a static qt built when dynamicgl is configured. in this case the static
libraries need not be installed.

amends 2311997.

Change-Id: Ic9bc3937d6ee0d97e0ca7fc96596fa90ebfe8710
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2016-06-22 15:12:48 +00:00
James McDonnell
f99bcd763d Add some 64-bit QNX platforms
Add x86-64 and aarch64le QNX platforms.  These platforms will be
available in QNX 7.0.

Change-Id: Iba1f635ba45fddf1a1caf907415a23a510ba0818
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-06-22 14:59:26 +00:00
Lars Knoll
90eee08b3e Let qmake do most of the work of configuring Qt
Command line arguments, configure tests and features are now
defined in a json file and a configure.pri containing some
custom functions.

qmake uses the json file to determine command line arguments,
tests and features to be executed at configuration time.

A new qt_configure.prf contains all the infrastructure to parse
the command line, run the configure tests, determine the set of
available features and create a report about it.

Change-Id: If30ac089dd3e9f8c67ebd642bde10cfa960893bb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-06-22 14:19:35 +00:00
Liang Qi
ea438b2508 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	src/corelib/global/qglobal.cpp
	src/corelib/global/qsysinfo.h
	src/corelib/kernel/qcoreapplication_win.cpp
	src/gui/text/qdistancefield.cpp
	src/gui/text/qdistancefield_p.h
	src/plugins/platforms/windows/qwindowsglcontext.cpp
	src/plugins/platforms/windows/qwindowsglcontext.h

Change-Id: Ib3500acc2b28553bde06758cd9a2e19eb7fe2978
2016-06-21 08:39:41 +02:00
Liang Qi
e32f1a4d61 Merge remote-tracking branch 'origin/5.6' into 5.7
And blacklisted a few tests in tst_QUdpSocket.

Conflicts:
	src/android/jar/src/org/qtproject/qt5/android/QtNative.java
	src/corelib/global/qglobal.cpp
	src/corelib/global/qsystemdetection.h
	src/corelib/io/qfileselector.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp
	tests/auto/network/socket/qudpsocket/BLACKLIST

Task-number: QTBUG-54205
Change-Id: I11dd1c90186eb1b847d45be87a26041f61d89ef6
2016-06-20 08:00:26 +02:00
Oswald Buddenhagen
4c23b69bf7 fix detection of default incdirs on mac
don't add framework directories (including the respective marker!).
this is consistent with the unix configure code.

Change-Id: I2e187057bc3fe2b35128cd5dc2af57b9f3685d83
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-06-17 09:47:02 +00:00
Oswald Buddenhagen
ccf461acf0 fix logical mismerge from 5.6
iphonesimulator_and_iphoneos was renamed to simulator_and_device in 5.7.

Task-number: QTBUG-54163
Change-Id: If4a76f45450edc0f6e8fb3615355613212314300
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-06-17 09:45:23 +00:00
Liang Qi
3cb56800d5 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp

Change-Id: If899cda251b4dc8b8a7c6764520e88ab719737cd
2016-06-17 10:53:42 +02:00
Jake Petroules
1e147f446a Add back osx compatibility check in QMAKE_PLATFORM.
If macx is present, osx AND macos should be required.

Change-Id: I5cd9d41270c741dc314720a1119b163dd17fdfd7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-06-16 22:44:15 +00:00
Liang Qi
c4e472ea10 Merge remote-tracking branch 'origin/5.7.0' into 5.7
Conflicts:
	src/corelib/tools/qsimd_p.h

Change-Id: I7c6bfc5873d97ad7f51a540dd9c18b9359dde59f
2016-06-16 07:30:02 +02:00
Ralf Nolden
792947da7e Common BSD: Add --gc-sections ld flags
As common bsd's are using the -ffunction-sections flags from
mkspecs/common/gcc-base.conf, also use the --gc-sections ld flags
like Linux as all are using GNU ld as their linker and all are
capable of using it. The last remaining problems with --gc-sections
removing the .name sections providing the OS tags for distinction of
the execution layer were solved with NetBSD 6.0 and OpenBSD 5.4, see
http://gnats.netbsd.org/40401 and http://www.openbsd.org/plus54.html
so this option can safely be used now to reduce the size of moc and rcc
tools.

Change-Id: I74ccd4f6bc607f6d82d32fc864875f26b26bf167
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-06-15 19:17:35 +00:00