Commit Graph

2323 Commits

Author SHA1 Message Date
Milko Leporis
bbdcc4ec8e Introduce CI20 mips32 mkspec
[ChangeLog][Platform Specific Changes][Linux] Added support for
cross-compilation for the MIPS CI20.

Task-number: QTBUG-57411
Change-Id: I5be2f53323b1d3c2323cd51064397590c143af1b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-12-05 11:59:31 +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
Liang Qi
d34be32434 Merge "Merge remote-tracking branch 'origin/5.7' into 5.8" into refs/staging/5.8 2016-11-26 10:25:14 +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
Liang Qi
bce25a6340 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	src/gui/painting/qcoregraphics.mm
	src/gui/painting/qcoregraphics_p.h
	src/plugins/platforms/cocoa/qcocoahelpers.h
	src/plugins/platforms/cocoa/qcocoahelpers.mm

Change-Id: Ibe5efcae73526b3d3931ed22730b13d372dcf54e
2016-11-25 14:41:29 +01:00
Liang Qi
50aeedd86c Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	mkspecs/features/qml_module.prf
	src/corelib/tools/qdatetimeparser_p.h

Change-Id: I5382cee3ddb33107dc61ee20f7a9188c4a68a882
2016-11-25 10:32:29 +01:00
BogDan Vatra
17d72c7837 Android: All gcc flags should be set for clang too
gcc-base-unix.conf must be included before clang.conf because
clang.conf doesn't set all the needed flags.

Change-Id: I71f95732d0d245096b575c91610800d91c6aa5d7
Reviewed-by: Vyacheslav Koscheev <vok1980@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-25 06:06:57 +00:00
Liang Qi
4783de0473 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	src/network/socket/qnativesocketengine_winrt.cpp
	tools/configure/configureapp.cpp
	tools/configure/environment.cpp

Change-Id: Ieae6f2ee004a87f041751852b687484f91ee4480
2016-11-24 10:31:21 +01:00
Laszlo Agocs
c3bf358f69 Add a device spec for cross-compiling for the Qt Simulator
Change-Id: I6485beca158c0c81f5e33cf96d51bc88d323de2e
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-11-24 08:29:08 +00:00
Joerg Bornemann
435e7b17a3 Fix qmldir copying in debug and release builds on Windows
This is a backport of 6cc02ce6c8 from 5.7.

In a parallel build we may end up copying the qmldir file at the same
time, which doesn't work on Windows due to file locking. Apply the same
guard for the copying condition as in commit
770a0c91f3.

Task-number: QTBUG-57153
Change-Id: Ibac759b16cebaf04f5d2f785211b62071aa656a8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-23 13:53:53 +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
38c1057f69 Merge remote-tracking branch 'origin/5.6' into 5.7
This also reverts commit 0d2f0164f4.

Conflicts:
	header.BSD-NEW
	qmake/Makefile.win32
	src/openglextensions/qopenglextensions.cpp
	src/openglextensions/qopenglextensions.h
	src/winmain/qtmain_win.cpp
	src/winmain/qtmain_winrt.cpp
	tools/configure/configureapp.cpp
	util/glgen/qopenglextensions.cpp.header
	util/glgen/qopenglextensions.h.header

Change-Id: If26c6f4111b342378dd88bbdc657e322d2ab6ad8
2016-11-23 09:24:36 +01:00
Oliver Wolff
38675e18fc Add support for Visual Studio 2017
Tested with RC

Task-number: QTBUG-57086
Change-Id: I21f56edca3852b52edd2c5fdcce76817141e8d4a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-11-22 06:07:23 +00:00
Vyacheslav Koscheev
0a203faa7f Adjust comment to "new" spec name
Change-Id: I58250de09f10637b145a5f43c3764a86e47bce96
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-22 05:39: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
Laszlo Agocs
57685105d7 Add a device spec for the Renesas R-Car H2
Pretty useful when working on Qt itself or just having to deploy
a proper hand-crafted latest greatest to the Yocto-built image.

[ChangeLog][Platform Specific Changes] Added support for
cross-compilation targeting Renesas R-Car H2 (Lager) systems.

Change-Id: Ie359956046b0752a6053f85b81d32550b91ce453
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-11-16 10:44:19 +00: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
Oswald Buddenhagen
6bfe30a0bf drop obsolete file
amends 97fcf3bc9 (introduction of official android port).

Change-Id: Iaab596559c5d4c825269cbdda77d956c3650fb09
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Otto Ryynänen <otto.ryynanen@qt.io>
2016-11-14 12:19:21 +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
Laszlo Agocs
776cecf5dc Add a spec for 64-bit Jetson TX1
[ChangeLog][Platform Specific Changes] Added support for
cross-compilation targeting 64-bit Jetson TX1 systems.

Change-Id: I439ba0aa2424dbf448746fe2a4d26bf5596b2558
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
Reviewed-by: Louai Al-Khanji <louai.al-khanji@qt.io>
2016-11-05 17:08:02 +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
Jan Arve Saether
68a7874e11 Fix linking against ANGLE in debug builds
Copy and paste bug introduced by
780105f906

Change-Id: I64309f1ea6857926b19afd038094adf1cffa6c17
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-11-01 09:33:23 +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
Jan Arve Saether
780105f906 Merge ANGLE's libEGL and libGLESv2 into QtANGLE
This is needed in order to be able to specify a custom location of
the ANGLE libs, and enables us to perform a LoadLibrary of ANGLE libs
by just having the absolute path to QtANGLE.dll as the argument to
LoadLibrary().

Previously, we had two ANGLE libraries: libEGL and libGLESv2. libEGL hard
linked against libGLESv2.  If we wanted to load libEGL from a custom
location, we couldn't load libEGL by calling LoadLibrary with the absolute
path to libEGL, because libEGL had problems finding libGLESv2.  One
solution to that could have been to call SetDllDirectory() with the path
to the ANGLE libs before calling LoadLibrary("libEGL.dll"). Since the DLL
directory would point to both ANGLE libs, this would ensure that the libGLESv2
was also found.  Unfortunately, this approach is not thread safe
(SetDllDirectory will affect all subsequent LoadLibrary(Ex) from the same
process). Therefore, we chose to merge the two libraries into one to
circumvent the whole problem.

At the same time, this patch also enables loading of two different ANGLE
libraries into the same process at once without renaming them: This was
not possible before because libEGL hard linked to libGLESv2.dll.  When
libGLESv2.dll was already loaded, the second instance of libEGL would
simply link against the already loaded version of libGLESv2.dll.

This behavior is documented in the LoadLibraryEx documentation on MSDN:
"If the string specifies a module name without a path and more than one
loaded module has the same base name and extension, the function returns a
handle to the module that was loaded first."

Change-Id: Ic1d886ba802be72ddcf01235bafaedcef662762e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2016-10-28 11:02:43 +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
Richard Moe Gustavsen
78ee77f491 iOS: link photo lib plugin based on Info.plist contents
If the application's Info.plist contains the key
'NSPhotoLibraryUsageDescription', we know that we can safely link in
qiosnsphotolibrarysupport without violating AppStore requirements.

This is a simple feature that doesn't introduce additional qmake
API for doing app deployment with optional iOS QPA plugins.

[ChangeLog][iOS] Starting from iOS 10, Apple requires all apps
that need access to photos to have the key
'NSPhotoLibraryUsageDescription' in the Info.plist.
Therefore, to get the same support in Qt (when, e.g., using
a file dialog), the Info.plist assigned to QMAKE_INFO_PLIST
will need this key as well.

Change-Id: I7a93afe24b589cad96d5a1d9e2a155ad1671178a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-26 08:55:19 +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
Oleksandr Tymoshenko
72efb2e6f4 mkspec: Add cross-compilation support for FreeBSD
Add conf files for -device qmake switch. It consists of two common
pre/post includes for FreeBSD-base device. "freebsd-generic-clang"
-device option for generic cross-compilation target, with bsdfb as
default platform and freebsd-rasp-pi-clang option for Raspberry Pi
(up to version 2) with OpenGL ES2 (eglfs) support

Change-Id: I45d91c0512f60f2be438ce46e0485844c341188a
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-10-12 22:04:46 +00: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
Oliver Wolff
19cbe171c2 winrt: Added 2013 scheme to Windows Phone 8.1 AppxManifest template
This scheme is needed to define Bluetooth (LE) capabilities on Windows
Phone 8.1. Setting these capabilities is a bit more involved than what
we currently support from qmake (see
https://msdn.microsoft.com/library/windows/apps/dn263090.aspx) but this
way we at least prepare the template for these steps.

On Windows 10 the bluetooth capabilities are set automatically similar
to the way it happens for other modules.

Change-Id: Ib3aa88802c3b421c9c3d02ec4db647cde2191f16
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2016-10-12 09:03:01 +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
BogDan Vatra
98cb497772 Add QMAKE_LFLAGS_SONAME to linker flags for Android plugins
It's needed to shut up Android 6+ warnings

Task-number: QTBUG-52112
Change-Id: I21ff53d687bf545250ec7fcdc059db16d4cecbc9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2016-10-06 13:33:08 +00:00
Jake Petroules
12bc984f65 Clean up QT_QPA_DEFAULT_PLATFORM handling
This is now centralized in configure.pri except where it explicitly
needs to be overridden.

Change-Id: If829d6b5eecf9a5fc403d0a0600d12c9e5781525
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-10-05 19:07:30 +00: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
d2b4a789c3 Fix explicit -sdk iphoneos builds
The order in which exclusive builds are added affects the order of
values in SUBTARGETS. xcodebuild.mk parses the value of SUBTARGETS in
the Makefile and selects the first entry, which would always be
release-iphonesimulator regardless of the build type. This obviously
caused -sdk iphoneos builds to fail.

This patch switches the order of in which exclusive builds are added so
that the entries which are not present in a particular build type are
always added last.

Change-Id: I306d6f7430c1dff3d741a8c5182b7af81d000e7f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-10-01 07:37:16 +00: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
Oswald Buddenhagen
0f503e3bb9 fix also QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO
amends eadd7e9cfb.

Task-number: QTBUG-56162
Change-Id: Ie8162ac7dc01726d902bcbe5bf749cc1610d8be3
Reviewed-by: Hannah von Reth <hannah.vonreth@kdab.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Morten Minde Neergaard <m-qt@8d.no>
2016-09-29 13:43:51 +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
680dd3313c Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/corelib/global/qlogging.cpp

Change-Id: I9cc8f25ad897efab6a42cb5c5161b1c9402952f0
2016-09-23 22:28:33 +02:00
Jake Petroules
87ae0bc169 Remove macx-clang-32 and macx-g++-32 mkspecs
32-bit Qt for macOS is now deprecated.

Change-Id: Idda4f4b3d48c58afae3932e7802bcf82cc75d3aa
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2016-09-21 23:06:20 +00:00
Jake Petroules
c2869c3b0a Pass -quiet to xcodebuild when invoking make with -s option
This makes use of the new -quiet option in xcodebuild 8 to reduce the
noisiness of output when make is invokved in silent mode.

Change-Id: I3730dddcc1d9dae329b5ff254448533cdd573a30
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2016-09-21 21:42:22 +00: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
Laszlo Agocs
103ffa117d Add a spec for NXP Colibri VF50/61
Change-Id: I12450a214d61ffa00270095df0c77e57647d7a2c
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-09-10 14:54:16 +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
Jake Petroules
b012f55017 Remove unnecessary compiler and warning flags from UIKit mkspecs
All of these flags were blindly copied from Xcode and all of them are
not needed because they are unnecessary or at the very least are for no
reason specific to iOS/tvOS/watchOS.

 * -fvisibility=hidden,
   -fvisibility-inlines-hidden - handled in common/gcc-base.conf
 * -fpascal-strings - a Mac OS Classic legacy, no one uses these
 * -fmessage-length=0 - formatting option, not needed
 * -fexceptions, -fasm-blocks - these are on by default and not needed

All explicitly enabled warnings are enabled by -Wall, which is handled
in common/gcc-base.conf. All explicitly disabled warnings should not be
disabled because we simply do not do this anywhere else in qmake.

Change-Id: Ifb9b2ff100837c7cf5888493a6413c972609598d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2016-08-26 22:49:52 +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
Richard Moe Gustavsen
86ebd92add iOS, mkspec: update UUID parsing to support Xcode 8 beta
"simctl list devices" has changed output format in
Xcode 8 beta to include additional information placed
inside parentheses for each device. And this confuses the
scripts we use to parse and find UUIDs.

Instead of making the inline scripts even longer and more
complex, this patch will factor most of it out to a separate
perl script that reads out device information on json format
and parses the UUID.

Change-Id: I3cd4dc276ecda030fda1932073c8bf1e0bc85deb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-08-24 13:05:09 +00:00
Tor Arne Vestbø
16a421aa83 Xcode: Don't enable document versioning debugging
It results in passing an option on the command line that e.g. the
QCommandLineParser doesn't understand.

Change-Id: Ied08c930fab479b6432f025dfe861bdf22c513e6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2016-08-24 12:35:45 +00:00
Jake Petroules
3379dc4c83 Remove obsolete mkspecs for macOS targets
macx-g++40 and macx-g++42 refer to very old versions of GCC that
virtually no one should be using, and macx-llvm refers to the
transitionary LLVM-GCC toolchain that is long gone from Xcode.

Change-Id: Id22ea417515b257babc5ad2a60c8f1fb6d6d1956
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2016-08-23 17:32:28 +00:00
Jake Petroules
de2b626b34 Reorder directives in macOS mkspecs to match iOS, tvOS, and watchOS
Change-Id: Ic365f66908b97a18c72b732b73b65d77a28e91be
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2016-08-22 16:55:16 +00:00
Jake Petroules
8d9bab4752 Remove strange INCLUDEPATH from tvOS and watchOS mkspecs
This was probably a leftover that slipped past review for tvOS, and then
got accidentally carried over to watchOS. They serve no purpose as
there are no such named directories, nor does iOS have anything similar.

Change-Id: If2a0f592e83e07db1f3aace320e73046e824994b
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-08-22 13:51:08 +00:00
Jake Petroules
0b9acb3e32 Move common/ios configurations into common/uikit
These actually affect all UIKit platforms (tvOS, watchOS), not just iOS.

Change-Id: I2b45ebecb10d11e33d301071093b5342ce101816
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-22 13:27:14 +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
f6bd3623a2 qmake: enable bitcode also for iOS
It's optional but default in Xcode, and will probably become required

Change-Id: I6917a9cf15b48dbaee57f1a92ea47d68fb3c253a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-08-19 21:06:05 +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
Oswald Buddenhagen
ce942a2265 sync timestamps also for forwarding headers to generated ones
this wasn't possible when these headers were still generated by syncqt,
as the targets may have been still missing at that time. however, as we
do that now with qmake, forwarding the timestamps is perfectly possible,
and is consistent with what syncqt itself does for "regular" headers.

the immediate problem this solves: when the early creation of the
forwarding headers in qtbase.pro is removed, they get created only when
corelib.pro is processed. their timestamps would be after the timestamps
of the already built bootstrapped libraries. if now the project files of
these libs get re-created, qmake's not conditional-aware dependency scan
would add these headers to the libs' deps, thus causing them to be
re-built. the re-built tools would in turn cause all mocs and thus all
libraries to be re-built. this would be particularly problematic if it
happened between 'make' and 'make install' due to another bug ...

Change-Id: I8d597f1f925369d93aaf3cc6c02e954eeae003a4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-19 04:26:54 +00:00
Oswald Buddenhagen
34b95a643d fix relative paths in forwarding headers to generated privates
Change-Id: I837407503ef81f1059a7d531d9e57a67059855c8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-19 04:26:47 +00:00
Oswald Buddenhagen
4b288e30ef employ QMAKE_USE: LIBS += -lfoo
this switches all instances of LIBS[_PRIVATE] += -lfoo where a config
tests exists for foo.
this removes some code duplication between tests and project files (in
case of conditionals), and ensures that the projects always actually use
the libraries configure has found.

Change-Id: Ia7e80c8db5f329290c7f1a4e03a8bf78882a687e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:26:43 +00:00
Lars Knoll
15bf5ef8b8 Add method to encapsulate dependencies to external libraries
Adding an entry that represents an external library to the
QT_USE[_PRIVATE] variable will cause qmake to lookup the
required compiler/linker flags from the configuration system,
and add them to the module that is being compiled.

Change-Id: I309aa2749ddf4fab13ab8fdd26e8ab2123719ea8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:26:26 +00:00
Oswald Buddenhagen
d90db0f136 rewrite makespec verification with qmake based system
cleaner, and covers windows as well.

Change-Id: I0e884909a3f49610fab750ba1ef6112f43e5d5d1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-08-18 17:10:52 +00:00
Lars Knoll
97b856b788 Use the qmake based configuration system also on Windows
Adapt configure.exe to use qmake to do most of the work of configuring
Qt. This unifies a large part of our configuration system between Unix
and Windows. configure.exe is now still doing the license check,
creating qconfig.cpp, building qmake, and not much more.

On the way, re-implement the still missing Windows-specific tests with
the new system.

The opengles2 vs. opengl-desktop conditions got a bit convoluted, as
Unix prefers desktop GL, while Windows GLES2 (via ANGLE). Superficially,
there is a circular dependency, but the platform scopes are supposed to
break it.

Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: Ia1941f2c34b7f5bd4990a7673cd737361381c2e7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-18 17:10:47 +00:00
Lars Knoll
6a90c9a8e5 Handle windows line endings and tabs in json config files
Change-Id: I154629d862977dde5232db3bb2597474b6053ffd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-18 17:10:35 +00:00
Oswald Buddenhagen
fd3e12e7a6 replace mechanism to override variables from the mkspecs
it is sometimes desirable to override values from the mkspec without
modifying (or wrapping) the spec itself. linux distributors do this on a
regular basis.

so far, we'd pick up CFLAGS, etc. from the environment, in a somewhat
autoconf-like fashion. however, over time, this approach proved
problematic: the concept doesn't mix particularly well with mkspecs to
start with, is unexpected (and therefore causes frustration), and
doesn't mix well with cross-building (at least the way it was realized).
ironically, it was implemented this way (quite a while ago) upon my
explicit request ...

the new mechanism uses explicit variable manipulations on the configure
command line, just like qmake itself understands. as it happens, this is
again quite similar to autoconf-generated configure scripts. however,
this time around we don't pretend to be actually autoconf-like, so we
also don't try to map any variable names (some of which have different
semantics anyway).

this commit also eliminates the last use of the QMakeVar() function,
so delete it and the underlying infrastructure.

Task-number: QTBUG-32530
Task-number: QTBUG-42962
Change-Id: Id31a6b80e1add08ca21f5b178614bda530d12374
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:10:25 +00:00
Lars Knoll
9172143f52 Add configure.exe-like FOO_LIBS=bar style command line options
Add the command line options supported by the windows version of
configure and respect them when running our configure tests.

Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: I1206d60a177e251540d34d232c73c930847564b3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-08-18 17:10:18 +00:00