Commit Graph

3035 Commits

Author SHA1 Message Date
Kai Koehne
0b4ae8e682 MinGW: Fix build with -angle
Since Qt 5.14, debug libs for MinGW don't necessarily have a 'd' suffix anymore.

Fixes: QTBUG-83087
Change-Id: Ia9f499ebed05e96fb056134681a2124c2262fb08
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-03-27 15:34:12 +01:00
Mitch Curtis
1480922511 Merge remote-tracking branch 'origin/5.14.2' into 5.14
Change-Id: I34ca28c75b88e882c3f35f182bf01acb22b77637
2020-03-19 16:10:31 +01:00
Morten Johan Sørvig
bcdf49bcc6 wasm: support emsdk >= 1.39.4
Keep using the old/deprecated behavior for the Qt 5.14
series.

Task-number: QTBUG-74601
Change-Id: Icee99803f300dfa0116a4de75f9fb26d1010625d
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2020-03-13 10:18:43 +01:00
Andy Shaw
1309205b8b winrt: Update capability management to include IOT namespace
Change-Id: Ib24ecb70454af5ab2e82ebbdc1fed9ef2a52bbb1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-03-11 12:01:09 +01:00
Kai Koehne
e06ce2eb62 Fix regression when doing a debug only build with MSVC
qt helper libs for msvc will always get a 'd' suffix for debug builds.
This is different than for MinGW, where it will only get a 'd' for
mixed debug builds in -debug-and-release scenarios (see commit
1749f9184b).

This amends d32a679, which incorrectly removed the 'd' suffix
when linking helper libs built for MSVC.

Fixes: QTBUG-82620
Change-Id: I8097de0e1bab4d1e58fc37b0c50ee6b07650a626
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-03-03 11:18:13 +01:00
Kai Koehne
d32a6793a4 MinGW: Fix debug-and-release configuration
Make sure that, if Qt was configured with -debug-and-release, winmain
and user apps are generated by default in debug-and-release mode, too.

This amends 9b4ec1393f .

Change-Id: I0f169d63ca98c9bde41114225004a0844425db33
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-02-27 09:59:08 +01:00
Andy Shaw
2c35a61025 Delay the processing of the doc features to the end
By delaying it to the end we can be sure that all the Qt modules have
their INCLUDEPATHs set and as a result we can avoid long command lines
on Windows.

Change-Id: I9068f7bf66fe138aad1a633191677a57dfd08d6e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-02-25 18:58:17 +01:00
Kai Koehne
7232c852a6 qmake: Fix handling of QM_FILES_INSTALL_PATH
Do not expect the .qm files to be there at qmake time; they will only be
generated at build time.

Fixes: QTBUG-77398
Change-Id: If73fdb51d40138e52f62eaee0491a5d73d9fe161
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-02-18 18:34:50 +01:00
Lorn Potter
1635848d87 wasm: remove dependency on perl to find emscripten version
Change-Id: I0d5224d497b2b5652d1be036f2a90c6c53f0c9df
Fixes: QTBUG-81722
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-02-17 08:22:01 +10:00
BogDan Vatra
59121d2980 Fix ANDROID_XXXX replace qmake function call
The second parameter of replace is a regex, therefore trying to replace strings like
"plugins/sensors/libplugins_sensors_qtsensors_android.so" will result to super strange
results.

Fixes: QTBUG-81974
Change-Id: I887e70f4fd8fa2af482a60f63af371f954b56ce1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-02-11 09:16:42 +00:00
Cristian Adam
4d798801e0 CMake Support: Fix dependent libraries search for MinGW and CMake 3.17
Fixes: QTBUG-81903
Change-Id: Ie2847e38c196c1f9d664b1a35339cca5ebf424cc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-10 22:36:32 +01:00
Andy Shaw
288d5d8a71 Android: Make sure that it can find qrc files created via the pro file
Since Android will place the created qrc files in their own architecture
then we need to make sure that we account for this when returning a list
of all the resources. This is so that when other files are created that
depend on this list, it is able to find them.

Fixes: QTBUG-81477
Change-Id: I4a083c1c5c3e0aec35649cf7f5419cf3c6a75eae
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-02-10 21:04:03 +00:00
Joerg Bornemann
495db2cd2b Add function for initializing plugin resources for static builds
Also move the setting of default RCC_DIR into qtFlattenResources as we
need a valid RCC_DIR there.

Fixes: QTBUG-81699
Fixes: QTBUG-81713
Change-Id: I7558d99f3aca75d2e9cad0ec89fbb0aa0758dcc7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-30 16:59:31 +01:00
Liang Qi
54b1f1d199 Merge remote-tracking branch 'origin/5.14.1' into 5.14
Conflicts:
	mkspecs/features/create_cmake.prf

Done-With: Artem Pisarenko <artem.k.pisarenko@gmail.com>
Change-Id: I2ecb9fdca06fe687be8ab3457a58dd81e5e81c4c
2020-01-28 09:16:11 +01:00
Joerg Bornemann
474a5e2f3f Fix handling of the DEFINES_DEBUG/DEFINES_RELEASE variables
Modifications of the CONFIG variable in the project file wasn't taken
into account in the handling of DEFINES_DEBUG and DEFINES_RELEASE,
because it was happening before the evaluation of the project file.

Moved the handling code into default_post.prf where the other *_DEBUG
and *_RELEASE variables are handled.

In practice that means: to avoid the addition of the NDEBUG define one
has to remove NDEBUG from DEFINES_RELEASE.

This amends commit 1456b809.

[ChangeLog][qmake] To remove the NDEBUG define that is added by
default in MSVC mkspecs, write DEFINES_RELEASE -= NDEBUG in your .pro
file.

Fixes: QTBUG-81569
Change-Id: I2ea5628653275a4e48ad002977d34969c0663815
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-23 19:44:09 +01:00
Joerg Bornemann
0ab53fbdda Fix qtPlatformTargetSuffix for darwin platforms
Commit 1749f918 changed a "mac" scope to a "macos" scope (thanks to the
enormously helpful hint from in^Wsanity bot). Instead it should use
"darwin", because that's what is equivalent to "mac".

Fixes: QTBUG-81599
Change-Id: I0fd82f984945836a5b7b1bea5ed2117a2f676947
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-01-23 13:37:32 +01:00
Alexandra Cherdantseva
0a4c5b5119 wasm: fix redundant string conversions between wasm and JavaScript
Avoid redundant conversions from UTF16 to UTF8 to UTF16 with
help of new class QWasmString static methods:
+ QWasmString::fromQString to convert QString to js string
using js Module.UTF16ToString
+ QWasmString::toQString to convert js string to QString
using js Module.stringToUTF16

Fixed document.getElementById calls for cavasId with unicode characters.

Change-Id: I3fc55bfeb6aeda75fa3acd85d22cea667b542f38
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2020-01-22 19:26:22 +03:00
Kai Koehne
1749f9184b MinGW: Fix debug builds of applications
Only expect debug Qt libs with 'd' suffix if Qt was configured with
-debug-and-release.

This partially amends 9b4ec1393f and 4d289edb1 .

Fixes: QTBUG-81325
Change-Id: I56c8965272265cf0a91351aae29d648b8687ec77
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-01-22 09:07:40 +01:00
Artem Pisarenko
78a6b80719 Fix win32 support for linking against static builds in CMake
CMake mkspec feature sets CMAKE_PRL_FILE_LOCATION_* values inconsistent
with actual .prl file names being generated/installed, causing
dependency extraction mechanism in Qt5BasicConfig.cmake.in to not work
(function _qt5_$${CMAKE_MODULE_NAME}_process_prl_file silently fails
to find file at given location and skips filling libs deps).

[ChangeLog][CMake][Windows] Fixed linking with Qt static build

Fixes: QTBUG-81401
Change-Id: I5861cc0c42163d898ba55ad83cbad1994dcb1db2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-19 02:50:32 +06:00
Alexandru Croitor
d5c9d88885 [CMake] Fix handling Qt frameworks link flags in static lib deps
QMAKE_PRL_LIBS_FOR_CMAKE can contain "-F/foo/bar" entries which
are search paths for where frameworks should be found.

These should be passed as HINTS to find_library when searching for
frameworks.

Fixes: QTBUG-81369
Change-Id: I4f699800bd49a1f368b6132823e23d08d1fae604
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-01-18 14:01:59 +01:00
Andy Shaw
12df6c63a0 Android: Use the values rather than the variables with str_member
This amends ce04fa345d to correctly get
the information out of the variables when using str_member and str_size,
as it wants a string rather than a variable for these.

Fixes: QTBUG-80582
Change-Id: I8e18e05c605ba1596a7ed7a013f5c6677ab76891
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-01-18 14:01:46 +01:00
Kari Oikarinen
4f55c41816 Merge 5.14 into 5.14.1
Change-Id: Ie90edfd16f48e1907fd18288473ac403f62b9032
2020-01-15 19:08:18 +02:00
Tor Arne Vestbø
457ab46936 Handle resources with dots in the qrc file name
We were removing the .qrc suffix of resources in a way that assumed the
filenames would not have any dots in them, but this is not always the
case, and we would end up resolving an empty resource name for file
names such as .rcc-bar.qrc (e.g. as produced by the qmlcache system).

We now remove the .qrc extension explicitly.

Change-Id: I50e1d88ac71ca1335bb05f3dbbb2d9bb441a8d64
Fixes: QTBUG-81255
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-01-15 12:59:52 +01:00
Michal Klocek
7d7ba311e0 Fix isysroot for simulator only builds on ios
When not doing fat builds, QMAKE_MAC_SDK_PATH defaults
to iphoneos sysroot, which breaks compilation.

This fixes compilation when user sets also CONFIG-=device

Change-Id: I1d18269946cd2a5608e26d943159c824f31db09a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-01-13 14:48:09 +00:00
Andy Shaw
06a7da3c3d yacc: Output the path for the move with the right directory separator
Change-Id: Ic075711062750dde3e3a6bc7a5ba8da25ddecfe9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-01-13 11:50:02 +00:00
Jani Heikkinen
1e42c97cf0 Bump copyright year
Change-Id: I9468ef21a2cf03cf07c38f012a2aa9bae6d02a03
Reviewed-by: Johanna Äijälä <johanna.aijala@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-01-09 14:41:53 +02:00
BogDan Vatra
ce04fa345d Android: make sure we don't add _$${QT_ARCH} twice
Fixes: QTBUG-80582
Change-Id: I2b3790bb18754e146db611d61c48a3b7a532575c
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-01-09 08:25:42 +02:00
Kai Koehne
9b4ec1393f MinGW: Allow debug-and-release builds
Commit 4d289edb14 did disable debug-and-release
for MinGW completely. While it makes sense to change the
default, we should allow people to opt-in to old behavior
by explicitly setting '-debug-and-release'.

To allow differentiation between debug and release libraries
debug dll's (again) have a 'd' suffix.

Fixes: QTBUG-80792
Change-Id: I341b1a94788f490e975be6736159980cd9273f08
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-01-06 12:58:16 +01:00
Joerg Bornemann
cca279338c CMake: Fix usage requirements for static builds of Qt on macOS
When scanning the prl files to set up usage requirements for the Qt libraries
we omitted "-framework Foo" flags. Those were passed as linker flags, but not
as interface libraries. Consequently, the frameworks that are used by Qt
libraries were missing on the link line when building against a statically
built Qt.

Fix this issue by scanning the dependencies for "-framework Foo" just like we
do with "-lfoo" flags.

Fixes: QTBUG-80855
Change-Id: Ie7804304141c86207d143a6e1005e78bdc099113
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Kyle Edwards <kyle.edwards@kitware.com>
2020-01-06 12:48:40 +01:00
Andy Shaw
ef4448f129 Always add the extra Android apk and aab targets
The extra targets should be added to the project regardless so that
qmake can handle it appropriately. This enables make apk to work
correctly then from a SUBDIRS project.

Fixes: QTBUG-80351
Change-Id: If5903e0d2f543babfdb4ebbb13502e32ab97c6fc
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-01-02 14:27:05 +00:00
Andy Shaw
ee1b77e132 dumpcpp: Use tblCopy to ensure the path is detected correctly
This amends faf742b05d

Change-Id: Ia80a4274f61d895c297b2fae5df62c86db95c14c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-01-02 14:26:26 +00:00
Tor Arne Vestbø
fe784abc80 iOS: Silence GL deprecations until we can fix them
Change-Id: I1222708be5017a0dca381f365349fce5887a0bcb
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-12-20 12:23:37 +01:00
Tor Arne Vestbø
669a29f5e7 Xcode: Disable GPU frame capture and Metal API validation by default
The auto-detection Xcode has for whether GPU capture should be enabled
always enables it for our projects, which adds up to second to the
startup time when debugging. There's no need to pay this cost unless
you're actively debugging Metal code.

Change-Id: I4a76c4e7afedad4bb43395ae64bc0f8d62eca6be
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-12-18 19:16:09 +01:00
Lorn Potter
868ded6d87 wasm: do not use clamp mode for upstream LLVM
Emscripten version 1.39.0 and above are based upon upstream LLVM, which
does not contain BINARYEN_TRAP_MODE

Fixes: QTBUG-80691
Change-Id: I6129f84a31a607c202e13847b50705ef1c809630
Reviewed-by: jian liang <jianliang79@gmail.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-12-16 18:31:02 +10:00
Qt Forward Merge Bot
56b0dabf80 Merge remote-tracking branch 'origin/5.14.0' into 5.14
Change-Id: I03927d2ef75514e4f2633839387806125d8954f1
2019-12-13 12:46:12 +01:00
Andy Shaw
1dca7087e9 Account for when qtquickcompiler is used when getting the resources
When passing the resources used to the android deployment setting json
file it needs to check the variable generated by the qtquickcompiler
feature so that it can still find the qrc files originally populated in
the resources. This ensures that qmlimportscanner can still scan the
original qrc files when determining which QML import plugins are
needed.

Fixes: QTBUG-80713
Change-Id: I695b289eaaa78cc6c355fa8abd22a8a1031a9f6c
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-12-12 09:55:55 +01:00
Lorn Potter
93d261b965 wasm: enforce emscripten version
This creates a define in the binary, as well as writing emscripten
version for qmake.

It also enforces app builder to use a certain known version.

Task-number: QTBUG-77745
Change-Id: I37691512171635cec66aa3ffa16258081f3f1e1b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-12-11 06:06:45 +10:00
Joerg Bornemann
c5777ad81c Fix calls to qtFlattenResources from outside resources.prf
The xml_escape function must be part of resources_functions.prf, and the
qmake_immediate resource must not be created multiple times. Instead,
create another qmake_immediate resource with a number suffix.

This commit amends 577b6554.

Task-number: QTBUG-79672
Change-Id: Ibbe20c0fd1940f1fe7733cd1e5b0891f65689782
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-12-10 16:13:51 +01:00
Lorn Potter
73fada6d70 wasm: Fix clamp mode
Clamp mode was being obliterated by not appending to EMCC_COMMON_LFLAGS
This fixes crashes of integer overflow

Change-Id: Icae757a7189de25db5ed41df6d41d86304c39830
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-12-10 09:57:21 +10:00
Joerg Bornemann
485e4a8f0b WebAssembly: Do not use sed directly for wasm_shell.html deployment
Use $$QMAKE_STREAM_EDITOR, instead, which will on Windows expand
to "qmake -install sed" (triggering qmake's own sed implementation)
and otherwise expand to "sed".

Change-Id: I57da5fb3a4f6e5a09ae25c947caa0a10d279b480
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-12-09 17:49:19 +01:00
BogDan Vatra
d463a63bb9 Set proper TARGET name for libs
When doing a multi ABI build in one go, if the TARGET is the same,
we'll endup with only one library which is not okay.

Task-number: QTBUG-80351
Change-Id: I0c5ff24480446d671e59dbd5a045f9889dff39e9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-11-29 20:24:52 +02:00
Aaron Linville
d60b71d635 Fix CONFIG += cmdline testcase creating app bundle paths in Makefiles
Fix an issue where qmake on macOS will generate a Makefile with a path
to a macOS bundle instead of a bundle-less executable in the Makefile's
check rule if cmdline is specified before testcase in the CONFIG
options.

Fixes: QTBUG-80280
Change-Id: Icc9ee1355b0641981ce79526b36f29957e1afb00
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-11-27 22:38:02 -05:00
Andy Shaw
84892e5e69 Get make docs working better on macOS
The system include paths need to be added to the include
paths passed to Clang so it can find the standard types.

Change-Id: I83e13e73a606130e3bc4762b01368bcd4a8bb0dc
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-11-25 17:43:23 +01:00
Alexandru Croitor
8c6824f2af CMake: Fix static build linkage with CMake version lower than 3.13
After appropriate link flags are determined, they are added to the
INTERFACE_LINK_OPTIONS property. Unfortunately this property was added
in 3.13, and thus static builds on Windows for instance failed with
missing symbols due to missing system libraries on the link command
line, when the CMake version was lower.

When detecting a lower version, add the flags instead to
INTERFACE_LINK_LIBRARIES, which is a property that is available in
older CMake versions. To do this we have to strip the SHELL: prefix,
which means that the added link flags might get deduplicated, and thus
it can happen that the linking phase might still fail.

Nevertheless, on Windows this improves the situation when using an older
CMake version.

Amends 44602224bf

Task-number: QTBUG-38913
Change-Id: Ib710b8ea691d4a9281dcd5f5b9700b11df0a5c10
Reviewed-by: Kyle Edwards <kyle.edwards@kitware.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-25 09:14:09 +01:00
Joerg Bornemann
e55a61a77f Fix passing FOO_LIBS variables to configure
This amends commit 9864d2c6. Some variables that are set in
qtConfLibrary_inline were not exported.

Fixes: QTBUG-78873
Change-Id: I10d766c1f41d2baa61967ee931a6631346cac2e9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-19 18:35:49 +01:00
Andy Shaw
2735c5bf06 Add support for passing qrc files to qmlimportscanner
With the qrcFiles entry in the deployment JSON for Android, it can now
pass this on to qmlimportscanner for scanning the qrc files for the
available imports. This enables qmake to populate the qrc files it has
referenced in the project, be it generated by qmake or added by the
user.

Task-number: QTBUG-55259
Change-Id: Ic512ce6f24508b3ea09ebdd07ac4446debfd9155
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-11-13 14:00:39 +01:00
Liang Qi
d140f2f614 Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	examples/widgets/widgets/scribble/mainwindow.cpp
		This amends cb54c16584.

Change-Id: Iaae60a893330524b2973917e23b31f9d51f8bd38
2019-11-13 07:21:33 +01:00
Joerg Bornemann
8ffb200153 Fix LTCG linker flags for macOS with separate debug info
The linker must not throw away the lto.o file. We now instruct the
linker to create a non-temporary lto.o, dependent on the target name.

In order to do that we introduce a new mkspec variable
QMAKE_LFLAGS_LTCG_SEPARATE_DEBUG_INFO. This variable can contain
single-$ variable references that get evaluated when loading ltcg.prf.

Fixes: QTBUG-72846
Change-Id: I0ea882628d63e5406ba0ee68c7435af597364b0f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-11-08 17:00:17 +01:00
Qt Forward Merge Bot
75f791419c Merge "Merge remote-tracking branch 'origin/5.13' into 5.14" 2019-11-06 19:44:29 +01:00
Andy Shaw
b274f656b8 Be able to create a response file for other generators too
When building an application for Android on Windows it is possible that
the command line will be too long when doing the link step. So the code
for generating a response file is moved to MakefileGenerator so it can
be used by the other generators easily. The same variables used by
MinGW can be used elsewhere then.

Fixes: QTBUG-71940
Change-Id: I6c331d12e9541a90a4a95e0154d0ea1c056489bc
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-11-06 18:14:17 +01:00