Commit Graph

3303 Commits

Author SHA1 Message Date
Lars Knoll
d1882c79f2 Get rid of some QT_STRICT_ITERATORS leftover
Amends 06456873fc.

Fixes: QTBUG-82611
Change-Id: I8b1e01549f3e910b85a571833237e38a7c2b49a9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-03-05 16:08:30 +01:00
Lars Knoll
a0ffdf765e Merge "Merge remote-tracking branch 'origin/5.15' into dev" 2020-03-04 19:10:37 +00:00
BogDan Vatra
519ea72108 Android: Bump gradle (plugin) versions
Move min & target sdk from AndroidManifest.xml to build.gradle

Fixes: QTBUG-70817
Change-Id: Id9bb9825a3232587e0255b2d3d6f0273c5f9b66a
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-03-04 18:02:35 +00:00
Lars Knoll
2a4b957789 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I99ee6f8b4bdc372437ee60d1feab931487fe55c4
2020-03-04 14:39:18 +00:00
Eskil Abrahamsen Blomfeldt
5f1afeacf6 Android: Increase minimum API level to Android-23 / Android 6
There are certain APIs we need which cannot be used without this,
and in general it simplifies some code.

[ChangeLog][Android] Minimum Android version is now Android 6.0,
API level 23.

Change-Id: I72ca3b429bf48969e16e2bc6b99d9c4af993ea77
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-03-04 08:28:04 +01:00
Joerg Bornemann
065ace2bca Generate separate debug info for Qt tools too
If Qt was configured with -separate-debug-info, Qt's tools should be
separated from their debug information too.

Fixes: QTBUG-56482
Change-Id: Ief0130db1787b767496d0052716183fe773460bf
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-03-03 20:08:56 +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
Lars Knoll
a450cce6b6 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I469b0501cc65fc5ce4d797a69ae89405cc69c7f8
2020-02-28 09:48:30 +01:00
Lars Knoll
5c6c0289f0 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I4212d070d5752275085e754b96f0392113604dba
2020-02-27 14:22:01 +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
Qt Forward Merge Bot
75c0ffaf6d Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	examples/network/bearermonitor/CMakeLists.txt
	examples/network/CMakeLists.txt
	src/corelib/tools/qlinkedlist.h
	src/sql/kernel/qsqldriver_p.h
	src/sql/kernel/qsqlresult_p.h
	src/widgets/kernel/qwidget.cpp
	src/widgets/kernel/qwidget_p.h
	tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
	tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
	tests/auto/tools/moc/allmocs_baseline_in.json

Change-Id: I21a3c34570ae79ea9d30107fae71759d7eac17d9
2020-02-26 18:39:21 +01:00
Qt Forward Merge Bot
226533fd85 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Iad459349ea8b4090d79b4771bfff8f656a8a8189
2020-02-26 01:00: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
Friedemann Kleint
41ecb6abbf Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ide8768d0d95aaeec943658aea27a03737d7dbf3f
2020-02-20 08:34:46 +01:00
Sona Kurazyan
63a559845c Remove QLinkedList
QLinkedList has been moved to Qt5Compat. Remove and stop mentioning
it in docs, examples (the docs & examples for QLinkedList itself will
be moved to Qt5Compat) and remove the corresponding tests.

Also remove QT_NO_LINKED_LIST, since it's not needed anymore.

Task-number: QTBUG-81630
Task-number: QTBUG-80312
Change-Id: I4a8f1105cb60aa87e7fd67e901ec1a27c489aa31
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-02-19 21:01:07 +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
Liang Qi
b9585277e7 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/corelib/tools/qlinkedlist.h
	src/plugins/platforms/wasm/qwasmintegration.cpp
	src/plugins/platforms/wasm/qwasmscreen.cpp

Change-Id: Iefca7f9f4966bdc20e7052aca736874861055738
2020-02-18 09:26:53 +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
Lorn Potter
9354af237b wasm: fix loading of default_pre.prf
This fixes windows build and detection of c++ version

Task-number: QTBUG-80610
Change-Id: I5196e83f9aad6663aea47c31ae4a2da4c4d74e94
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-02-15 05:34:52 +10:00
Liang Qi
6b2535ea15 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	examples/widgets/graphicsview/boxes/scene.h
	src/corelib/Qt5CoreMacros.cmake
	src/corelib/Qt6CoreMacros.cmake
	src/network/ssl/qsslsocket.cpp
	src/network/ssl/qsslsocket.h
	src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp
	src/testlib/CMakeLists.txt
	src/testlib/.prev_CMakeLists.txt
	tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp

Disabled building manual tests with CMake for now, because qmake
doesn't do it, and it confuses people.

Done-With: Alexandru Croitor <alexandru.croitor@qt.io>
Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io>
Change-Id: I865ae347bd01f4e59f16d007b66d175a52f1f152
2020-02-13 18:31:40 +01:00
Qt Forward Merge Bot
9a5df00a61 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I8caee4d1ce0eed27d905194df3c3d46c5d07d2b0
2020-02-12 01:00:50 +01:00
Ulf Hermann
673038ebd5 metatypes: Only load qt_build_paths if we need them
Otherwise this fails for user projects.

Fixes: QTBUG-82038
Change-Id: I01bae2aab28bcedf745d1c5ae6932659ed4a7ed5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-11 15:36:18 +01: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
Olivier Goffart
4933a5f892 Use C++17 for qmake and force the build of everything with C++17
We will want to use C++17 code in our headers soon.
(including the one in the bootstrap libraries)

This patch is quick and dirty, I guess it will be cleaner once we move to cmake

Updated QMAKE_MACOSX_DEPLOYMENT_TARGET because 10.13 runtime does
not support C++17 stdlib features

Change-Id: I75ac171436945dddd1bb953a9c8d323ac20da7ac
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-02-08 09:49:07 +01:00
Morten Johan Sørvig
7d19dd7730 wasm: Change compiler flags to target "upstream" llvm
As of version 1.39, Emscripten now uses upstream llvm instead of
the "fastcomp" fork. As a result of this em++ no longer builds
via the asm.js text format, and the performance issues related
to text parsing are gone.

Reducing the binary size for debug builds is no longer needed,
and we can fall back to using the default build flags.

This effectively makes 1.39.x the minimum Emscripten version for
Qt 5.15. The "-fastcomp" SDK variant is not supported.

Change-Id: Id66ef77294a9accd1b103e34785458d71dc188b1
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2020-02-05 09:59:27 +00:00
Qt Forward Merge Bot
97417e8f28 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	.qmake.conf
	examples/widgets/widgets/imageviewer/imageviewer.cpp
	src/corelib/text/qchar.cpp
	src/corelib/time/qdatetime.cpp

Change-Id: I9762f5c4ff650799219729d6aee79ac07ce9024a
2020-02-04 10:44:00 +01:00
Thiago Macieira
02eb9df851 Add new AVX512 extensions found in Intel CLX, ICL and ICX processors
Cascade Lake (CLX) added AVX512VNNI, Ice Lake has added that plus the
integer multiplication (IFMA), the vector bit manipulation instructions
(VBMI and VBMI2), bit algorithms (BITALG), the extended vector AES
instructions (VAES), among others.

I haven't turned on the configure check for those yet. I believe the
VBMI and IFMA instructions will be interesting for Qt image algorithms,
but we'll need some Ice Lakes to do benchmarking on.

Change-Id: Ib5d667bf77a740c28d2efffd15cb43dd821d4b2d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-02-03 11:31:49 -07: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
Qt Forward Merge Bot
a3fc03c130 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I98b1a5a11ece3957a1115c1d9be8841759206ffe
2020-01-29 01:00:56 +01:00
Robert Loehning
94bc57213f configure: Add switch for clang's "source-based" code coverage feature
This adds instrumentation to the binaries. At the end of their
execution, these will then write a file containing information which code
was executed. This can be used for code coverage analysis.

[ChangeLog][QtCore][configure] Add switch "-coverage source-based" to
enable clang's "source-based" code coverage feature. This can be used
for code coverage analysis.

Change-Id: If31c6849aa797ff8820e041e85a492a14e2f1a6b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-28 20:26:15 +00:00
Simon Hausmann
a4ea0d9eac Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ia5727ce68001bcaab467f5fae3a4933d1217015f
2020-01-28 18:27:28 +01:00
Qt Forward Merge Bot
6c3eb39832 Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2020-01-28 16:02:04 +01:00
Qt Forward Merge Bot
558fc903ac Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/io/qsettings.cpp
	src/corelib/kernel/qvariant.cpp
	src/corelib/serialization/qjsoncbor.cpp
	src/corelib/serialization/qjsonvalue.cpp
	src/corelib/tools/tools.pri
	src/gui/image/qimage.cpp
	src/gui/kernel/qguivariant.cpp
	src/widgets/kernel/qshortcut.cpp
	tests/auto/tools/moc/allmocs_baseline_in.json
	tests/auto/tools/moc/tst_moc.cpp
        src/opengl/qglframebufferobject.cpp

Done-With: Edward Welbourne <edward.welbourne@qt.io>
Done-With: Leander Beernaert <leander.beernaert@qt.io>
Change-Id: Ie7f5fa646c607fe70c314bf7195f7578ded1d271
2020-01-28 14:14:20 +00: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
Qt Forward Merge Bot
082faeff9c Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/gui/image/qpnghandler.cpp

Change-Id: I8630f363457bb613d8fb88470a71d95d97cdb301
2020-01-28 08:09:51 +01:00
Joerg Bornemann
fcd3a20059 macOS build: Fix 'direct access in function...' warning
For every executable that uses a static Qt library (e.g. rcc using
libQt5Bootstrap.a) we got a warning: 'direct access in function...to
global weak symbol'.

This was because we've built all libraries with -fvisibility=hidden
-fvisibility-inlines-hidden but not the executables linking against
them. On macOS however, all translation units must have the same
visibility setting.

We're now setting the same visibilty for libs and executables on
darwin.

Fixes: QTBUG-81297
Change-Id: I2668e9385caa7f0ce78bf3727b4e5322bc4a294f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-28 07:52:58 +01:00
Alexandru Croitor
e9a797799e CMake: Add Qt6 forward compatible CMake API and targets
Create Qt:: versionless targets for libraries and tools. So
Qt::Core will link to Qt5::Core.

Add additional feature properties to targets, with the same name
they have in Qt6: QT_ENABLED_PUBLIC_FEATURES,
QT_DISABLED_PUBLIC_FEATURES, QT_ENABLED_PRIVATE_FEATURES,
QT_DISABLED_PRIVATE_FEATURES, to be forward-compatible with Qt6.
Prefix properties with INTERFACE_ for interface libraries.

Create functions with no major version in their prefix, so qt_foo
instead of qt5_foo.
The non-versioned functions will call the versioned functions,
depending on the value of QT_DEFAULT_MAJOR_VERSION, which can be
set by an application developer before finding the Qt package.

Set QT_DEFAULT_MAJOR_VERSION to 5 if the value has not been defined
in the current scope.

Application developers can set QT_NO_CREATE_VERSIONLESS_FUNCTIONS to
TRUE before calling find_package(Qt5) to suppress creation of the
non-versioned functions.

Application developers can set QT_NO_CREATE_VERSIONLESS_TARGETS to
TRUE before calling find_package(Qt5) to suppress creation of the
non-versioned targets.

Setting these can be useful when both find_package(Qt5) and
find_package(Qt6) are in the same project.
If none of these are set by the user, then the first find_package(Qt5)
will create versionless targets with the major version being "5",
which means the second find_package(Qt6) will not create versionless
targets.

Handle versionless plugin names in qt_import_plugins, so both
Qt::QCocoaIntegrationPlugin and Qt5/6::QCocoaIntegrationPlugin
are recognized by the function.

Allow specifying multiple types in EXCLUDE_BY_TYPE in
qt_import_plugins, to be consitent with the Qt 6 version.

Make sure to set the QT_PLUGIN_CLASS_NAME property to compatible with
Qt 6.

Task-number: QTBUG-74137
Task-number: QTBUG-80477
Change-Id: Ib89d090ea6f7794d7debd64f03f29da963a17ca7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-01-25 18:10:26 +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
Ulf Hermann
1e65445015 qml_plugin.prf: Use and prefer QML_IMPORT_VERSION over IMPORT_VERSION
qmltypes.prf does the same and the name is nicer.

Change-Id: I3364f7a244a941a4c6178cf87c65e289dc64ca22
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-01-17 11:16:44 +01:00
Qt Forward Merge Bot
0a4e5bb265 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/widgets/kernel/qshortcut.cpp
	tests/auto/network/access/spdy/tst_spdy.cpp

Change-Id: If76c434beac2c0a393440aa365f89f77439774ce
2020-01-16 11:20:42 +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
Qt Forward Merge Bot
c3123c757a Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I8dbcf23835d52d3aa7d018ed250814d60c68aa83
2020-01-15 01:00:39 +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
Qt Forward Merge Bot
cccc9d0b95 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp

Change-Id: I4d3041fa291a918c774ffa5eb5c8792a0966451d
2020-01-13 10:13:01 +01:00
Liang Qi
a59c768489 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/corelib/kernel/qobject.cpp

Change-Id: I4780b25665672692b086ee92092e506c814642f2
2020-01-09 20:30:39 +01: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
Qt Forward Merge Bot
6074ebf728 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I7be168303fc4fec5892f20f8dcbdf1bdfcd4986f
2020-01-09 01:00:26 +01:00
Friedemann Kleint
75391511ff Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ia2ce994c42adc010c453edaeea57f672556958f6
2020-01-07 08:34:53 +01:00
Qt Forward Merge Bot
c75e8a6618 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I6c81e3cb6272adc5c3de2513792bd48604ff4dd0
2020-01-07 01:01:16 +01: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
Qt Forward Merge Bot
3a010f72b8 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/corelib/kernel/qvariant.h

Change-Id: I8f3873e74b9795ac889e7c7ec5de2619bca92160
2020-01-06 07:20:18 +00:00
Liang Qi
a503bf5470 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/tools/qvector.h
		Make QVector(DataPointer dd) public to be able to properly merge
		5b4b437b30 from 5.15 into dev.
	src/widgets/kernel/qapplication.cpp
	tests/auto/tools/moc/allmocs_baseline_in.json

Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Change-Id: I929ba7c036d570382d0454c2c75f6f0d96ddbc01
2020-01-04 15:32:34 +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
Qt Forward Merge Bot
4054c0d6ed Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	.qmake.conf
	src/plugins/platforms/xcb/qxcbscreen.cpp
	src/widgets/accessible/qaccessiblewidget.cpp

Change-Id: Ib3138e61ba7981610940509a7ff02ba2dd281bf0
2019-12-27 09:29:30 +01:00
Ulf Hermann
3ea7caed6f metatypes: Add no_check_exist to INSTALLS rule
Without this, the metatypes files are not installed if they don't exist
when qmake runs.

Change-Id: I014fcc1d1c41a7fab48870842f5e27f5b62dfed3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-12-23 10:33:22 +01: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
Liang Qi
ee71a9ba81 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/network/ssl/qsslsocket.cpp
	src/widgets/kernel/qapplication.cpp

Change-Id: Ib7421cc2df59d0969f89b3fbd65a17ea76ffef3b
2019-12-16 07:05:19 +01:00
James McDonnell
fc95ad8616 Add default location for the Wayland scanner tool on QNX
Change-Id: I0cfa823414a8f7866c594edb60b09b60f2b4d16b
Reviewed-by: Dan Cape <dcape@qnx.com>
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2019-12-14 11:22:54 -05: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
Qt Forward Merge Bot
11d7788c18 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I69238f23882deebeaad46e4fdcf899ab22cc2b8f
2019-12-12 01:01:04 +01:00
Qt Forward Merge Bot
a4a7c1bcf7 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	tests/auto/sql/kernel/qsqlquery/tst_qsqlquery.cpp

Change-Id: I6b82507bf9a80a374c40393e72f4843f1557de89
2019-12-11 14:50:53 +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
Liang Qi
90210d5d9c Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	tests/auto/network/kernel/qnetworkinterface/BLACKLIST

Change-Id: I1e8866c63b54bcd95fc2a044276ee15b7f60e79a
2019-12-10 13:51:40 +02: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
Qt Forward Merge Bot
0c29ebe374 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I4134c0c6b6c9911950f58b3b5c86e789d28a185b
2019-12-04 01:00:23 +01:00
Ulf Hermann
e62d04b933 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/corelib/serialization/qcborvalue.cpp

Change-Id: I675a3029955c96e81a33ed9d98b72b55b6784b52
2019-12-03 06:57:05 +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
Qt Forward Merge Bot
ad4ef9836c Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ib8357609b37b7cc22b51c27602ba60c69bf91da9
2019-11-29 01:01:08 +01: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
Lorn Potter
20891777bb webassembly: enable opengl es3
Our WebGL 2 support is half finished, since we use surface format verion of 3
to map to webgl2, but do not enable Open GL ES3 needed for WebGL2 support.

This allows glDrawArrays and glDrawElements to be used

Change-Id: Ifbd434f4d25e49f671145a6727999a90920d6810
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-11-28 00:07:53 +00: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
Qt Forward Merge Bot
58c69df4d3 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/tools/qhash.h
	src/gui/kernel/qevent.h
	src/widgets/kernel/qshortcut.cpp
	src/widgets/kernel/qshortcut.h

Change-Id: If61c206ee43ad1d97f5b07f58ac93c4583ce5620
2019-11-25 11:30:04 +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
Qt Forward Merge Bot
adc7bbe910 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/gui/rhi/qshader.cpp
	tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp

Change-Id: I1c4ae718eb3592a0a0a90af9d11553f3ab68cad5
2019-11-15 16:29:40 +01:00
Robert Loehning
6e42ed217c configure: Add sanitizer "fuzzer-no-link"
Adds instrumentation for fuzzing to the binaries but links to the usual
main function instead of a fuzzer's. The similar sanitizer "fuzzer"
should then be used only for building the test itself.

Requires clang 6 or higher.

Change-Id: I24ee1f018b0b97f2977dc86fbdc29a164d7c4e01
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-11-14 15:45:02 +01:00
Ulf Hermann
1e5d1a43dc Make sure the metatypes are installed in prefix builds
The JSON collection step has to be target_predeps in order to be
executed if the only place its output is referred to is INSTALLS.
Furthermore, some CONFIG options clear the INSTALLS variable.
Therefore, we need to add the metatypes CONFIG entries after
those.

Change-Id: I4694ab1d82c13cb4e3886c1722a03255d14b7f29
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-13 15:26:03 +00:00
Ulf Hermann
63dae62b7f In prefix builds, copy metatypes JSON to MODULE_BASE_OUTDIR
Otherwise we cannot find them when building further projects within the
same module. For example, qmlmodels needs the metatypes of qml in order
to build its plugins.qmltypes file, but the QML metatypes would only be
available after installing.

Change-Id: Ic2cdfa5b57fd3e5977eea16f2a9b192386737a1f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-13 16:25:53 +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
Ulf Hermann
e927d83407 Disambiguate do_install target in metatypes.prf
qmake matches those targets in a purely lexical way, disregarding any
scopes. do_install is much too generic and clashes with another
do_install target in the qmltypes installation code in qtdeclarative.

Change-Id: I8edab329eacc548cee880a9182a1e5ae4dd095fb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2019-11-11 10:20:13 +01:00
Ulf Hermann
18753e5493 Don't create duplicate plugins.qmltypes rules
If the qmltypes are generated by qmltyperegistrar, we should not offer a
rule to generate them using qmlplugindump. Otherwise we get warnings
from make.

Change-Id: Ifb88cbff8e6c577f9889ff3f071bf31f48f634ad
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2019-11-11 10:20:13 +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
78c687f98e Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I963b5f48b5d6f3500ca379fbd7f1a4290b570175
2019-11-08 09:11:02 +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
Qt Forward Merge Bot
e3cc16e9fb Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	.qmake.conf
	mkspecs/features/mac/default_post.prf
	src/corelib/tools/qsimd_p.h
	src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
	util/qfloat16-tables/gen_qfloat16_tables.cpp

Change-Id: If48fa8a3bc3c983706b609a6d3822cb67c1352a4
2019-11-06 11:41:19 +01:00
Tor Arne Vestbø
2e63d12183 Update supported platforms and build requirements for Apple platforms
Per earlier discussions we bump the deployment target for LTS releases
and follow up by requiring the latest SDK available for building.

As layer backed views and dark mode is a lot more stable these days in
Qt and on macOS in general we no longer support the option to build with
the 10.13 SDK. A workaround in case this functionality is still needed
is to explicitly set the QMAKE_MAC_SDK_VERSION qmake variable, which
will tell the linker to write that version into the MachO header of
the executable, which will then be read by AppKit when determining
which features to opt in to.

Change-Id: Ied4f6d75b710505a5c440c990b82567bea780db6
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-11-05 19:49:14 +01:00
Joerg Bornemann
577b6554f0 Move RESOURCE flattening code to dedicated function
Introduce resources_functions.prf with the test function
qtFlattenResources which ensures that RESOURCES has a flat structure,
e.g. only contains *.qrc entries.

This can be called by other .prf files like qtquickcompiler.prf
without disturbing the ability to extend RESOURCES in other .prf files.

Task-number: QTBUG-79672
Change-Id: I43246e40f5ea52a9d9c917a1bd781aeeb1304acc
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-11-05 14:51:29 +01:00
Kai Koehne
99e43db7ce Fix regression in how "pkg-config --static" output is handled
Change a1ea498789 did replace different pkg-config calls for
-L, -l arguments to one. Anyhow, it also removed the eval() call that
ensured that the return string was split by whitespace, meaning that
paths couldn't resolve anymore properly if multiple arguments were
returned.

Fixes: QTBUG-79668
Change-Id: I4091fea6891ef79836e05f8e87ffa9d69863a8f5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-11-04 09:31:56 +01:00
Joerg Bornemann
c0bde0da81 Fix cross-compilation to Linux
The CROSS_COMPILE variable wasn't picked up by the linux-g++ mkspec.
Now it's possible to cross-build Qt on FreeBSD to Linux, for example.

Fixes: QTBUG-79255
Change-Id: Ib1cd8ed3d5ef0af42f2d47af8f6d2c2ff5356adc
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-11-04 08:28:20 +00:00
Qt Forward Merge Bot
4b0af2cdbf Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I68a6ed3184e62fa89c47c564bb01002c0918d0fd
2019-11-01 01:01:02 +01:00
Qt Forward Merge Bot
c51ca1d1b2 Merge remote-tracking branch 'origin/5.13.2' into 5.13
Change-Id: Ieb5afc87086758119bcfc8efbe355f5c0a93fc04
2019-10-30 06:52:03 +01:00
Qt Forward Merge Bot
cd04181b2b Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I7f11733bda960196a96c6452bdabeb7072a8430d
2019-10-30 01:00:33 +01:00
Qt Forward Merge Bot
a317bff298 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ib4df563fc7b1f7c40f425e0e71180d9517a672be
2019-10-30 01:00:14 +01:00
Qt Forward Merge Bot
08f90adffd Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/corelib/serialization/qjson_p.h

Change-Id: I83cea141a4de8b3998478bfded84ca9029f7a2a9
2019-10-28 10:50:03 +01:00
Francisco Boni
a9b34f5726 QRandom: add support for RDSEED on INTEL_ICL & MSVC
We set the macro for RDSEED because neither MSVC nor the Intel compiler
on Windows defines the macro. The implication is that when qRandomCpu()
calls qCpuHasFeature() in simd.cpp, qDetectCpuFeatures() correctly
receives the expected CPU features enabled in the build from
qCompilerCpuFeatures, namely CpuFeatureRDSEED (qsimd_x86_p.h)

Change-Id: I5741d4f956a93f21c358af8a4ee393c1741b85ee
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-27 15:53:58 -03:00
Qt Forward Merge Bot
8bcecd86fa Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I182a639748760393f9e6b0724259201588aeaae3
2019-10-27 01:00:50 +02:00
Qt Forward Merge Bot
7b3bdcbfe8 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I379794a01cbf6fb39d94b24cc8c90b1971a212b9
2019-10-26 01:01:32 +02:00
Qt Forward Merge Bot
86e74d60d2 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I208a36bf1c88c8291baaa5ca8fe8e838bc9d7aea
2019-10-26 01:01:14 +02:00
Christian Romberg
6acab25f97 Remove GCC-style PCH directives from android-clang mkspec
As described in QTBUG-72404, the android-clang mkspec has the gcc pch
style hardcoded for no reason. This change removes the respective lines.

[ChangeLog][qmake][Android] Remove gcc-style PCH directives from the
android-clang mkspec.

Fixes: QTBUG-72404
Change-Id: Iad42651e25ecce08eda7aa5fa8bbf531c9497896
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-10-25 07:04:57 +00:00
Qt Forward Merge Bot
375efdd0e1 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Iebedaa967a263854f18cd403ce007d7965f26d2b
2019-10-25 01:00:16 +02:00
BogDan Vatra
86a0f1cfd7 Add build-id flag
This flag is needed by LLDB & simple perf tools to locate the right binary.

Change-Id: Iffa1b0678663cfb9d1d699da5ad6fe672863918c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-10-24 12:30:53 +03:00
Oliver Wolff
c686e885c0 qmake: Disallow building Qt examples inside the source tree
Building examples inside a Qt source tree is considered unsupported.
Instead of checking, whether the build is done "in source" inside the
source directory, we also have to check for "shadowed example builds" as
they are done by Creator. An example would be:
qtbase/examples/widgets/widgets/build-wiggly as a shadow build for
qtbase/examples/widgets/widgets/wiggly.

Fixes: QTBUG-76237
Change-Id: Iceb88af006fad249a4c13fa0b0345cf3f7086252
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-10-24 10:41:29 +02:00
Ulf Hermann
4514b67d7c moc: When generating metatypes, allow empty MOC_DIR
We don't want the metatypes to be generated into the file system root in
that case.

Change-Id: I91bab20fa498de0f2918d8ee5b2f230cc0610aae
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-24 09:27:00 +02:00
Christian Romberg
8409844bd6 Fix java mkspec for compatibility with JDK 12
Starting with JDK 12, javac no longer supports source and target
version 6. This commit changes the source and target version to 7.

[ChangeLog][General]

Fixes: QTBUG-79094
Change-Id: Ife8966db01c68251de2fe85307de30c31e658172
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-10-21 07:54:01 +02:00
Tor Arne Vestbø
a254472a49 Xcode: Ensure there's always a CFBundle[Short]Version[String] set
Leaving it empty resulted in errors from Xcode when compiling the app.

Task-number: QTBUG-25309
Task-number: QTBUG-74872
Change-Id: I61b0f47d754c5f5b181a6f918283d990458cc78d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 1d1ed01711)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-18 06:42:35 +02:00
Francisco Boni
da12c06b99 Fix build with ICC under IPO on Windows
qmake.conf(25) incorrectly sets QMAKE_CFLAGS_DISABLE_LTCG to -Qno-ipo.
The correct form to disable IPO on Windows with ICC 18.x and 19.x should
be: -Qipo-. The implication is that the CONFIG feature in simd.prf (31)
modulating the compilation of specific ISA optimized sources now
successfully disables IPO on intel_icl when needed.

Fixes: QTBUG-78976
Change-Id: Id691f69b909d2bbba77402ff4f0b17b3b07ad6f3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-10-13 15:08:43 -03:00
Qt Forward Merge Bot
8d8140dffa Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I9953c1ca16862184c2373027e946c482ce8e6f0e
2019-10-13 01:00:43 +02:00
Joerg Bornemann
a90899df43 Default to #!/bin/bash in wrapper scripts on macOS
This gives the user the opportunity to employ BASH_ENV to circumvent
macOS System Integrity Protection and set variables like
DYLD_FRAMEWORK_PATH.

Fixes: QTBUG-57204
Change-Id: Icd99d903a3be76fabd509e204ea61a254a96609c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-12 09:57:28 +02:00
Liang Qi
9c84b7786c Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/plugins/platforms/xcb/qxcbscreen.h
	src/src.pro

Change-Id: I4e1981e69a1ddcbe4078ec6ab2a64b0da6a445de
2019-10-10 09:13:49 +02:00
Thiago Macieira
780137d585 QRandom: add support for RDSEED
The Intel whitepaer[1] recommends using the RDSEED over RDRAND whenever
present. libstdc++ from GCC 10 will also use it in std::random_device.

[ChangeLog][QtCore][QRandomGenerator] The system() random generator will
now use the RDSEED instruction on x86 processors whenever available as
the first source of random data. It will fall back to RDRAND and then to
the system functions, in that order.

[1] https://software.intel.com/en-us/articles/intel-digital-random-number-generator-drng-software-implementation-guide

Change-Id: I907a43cd9a714da288a2fffd15bab176e54e1975
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-10-09 07:31:28 -07:00
Milian Wolff
63a3b26b6b Fix QMake build system to support trace points in a cross-compiled build
CONFIG(cross_compile) implies CONFIG(force_bootstrap). The latter is
errorneously used within qt_tracepoints.prf and to decide when
tracegen is to be build.

For the tracepoints, we just need to check if etw/lttng trace points
are enabled.

For tracegen, we don't need to check anything - it doesn't depend
on etw or lttng, it is just a code generator similar to moc or rcc
and should be handled like these tools.

Change-Id: I3784b37db10680efd0ed7ee7860059bdf62b4118
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-09 16:20:08 +02:00
Kai Koehne
a1ea498789 configure: Do use pkg-config --libs for static libs
This ensures that also linker commands like -pthread are returned.

Fixes: QTBUG-77159
Change-Id: If9ab3797ccfb52c6b96a4ab120c59fd8896d5466
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 4ddc50c0cd16ddd146ea9ea21d6565c8f4a5e2bc)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-10-09 07:27:14 +00:00
Joerg Bornemann
53ac8094b1 Fix PRE_TARGETDEPS for iOS projects
This variable was ignored for iOS projects, because the generated
Makefile includes xcodebuild.mk that defines its own default target.

Export PRE_TARGETDEPS to the Makefile before including xcodebuild.mk
and use it there for the dependencies of the generic build targets.

Fixes: QTBUG-41325
Change-Id: I5faa82e05570974b5a844ae95b0a012c3badc64a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-08 17:24:57 +02:00
Qt Forward Merge Bot
327b305e95 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I554a2762890391b3b6013c8b82211a8386a4ced8
2019-10-05 01:01:06 +02:00
Simon Hausmann
da284ef10e Add support for machine-readable JSON output to the MOC
The --output-json parameter will make moc produce a .json file next to
the regular output file. With --collect-json the .json files for a
module can be merged into a single one.

Task-number: QTBUG-68796
Change-Id: I0e8fb802d47bd22da219701a8df947973d4bd7b5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-10-04 18:35:29 +02:00
Tor Arne Vestbø
0768a28fbf Remove CFBundleGetInfoString from Info.plist templates
Is't been deprecated since Mac OS X 10.5.

Task-number: QTBUG-74872
Change-Id: I8b1ad7aca6448883cb164fd0c4b329592ca60548
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-04 13:09:34 +00:00
BogDan Vatra
fcb78b5000 Android: Fix plugins naming
Android 5 doesn't extract the files from libs folder unless they are prefixed with "lib".
This patch sets a proper name for the plugin which will make gdb happy and it will also
avoid any name clashes.
If we rename the plugins when we copy them, gdb won't find them, therefore it can't load their
symbols.
On Android all the libs are in a single folder, so to make sure we don't have any name clashes,
we are prefixing the plugin name with it's relative path to qt folder (we replace / with _).

Fixes: QTBUG-78616
Change-Id: I7e0e67d65448532769d69f46b1856c029e2cf5cb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-10-01 11:36:24 +03:00
Laszlo Agocs
d83995caab Add an i.MX8 (aarch64) device spec
Not much different from i.MX6, apart from switching to aarch64 and the
appropriate tune flags.

[ChangeLog][Platform Specific Changes][Linux] Added a device spec for
64-bit i.MX8 systems (Vivante graphics stack)

Change-Id: I1fe939fca87d5f3031cefbf43fa359aeeaf44752
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2019-09-28 08:36:12 +02:00
Tor Arne Vestbø
fc4a6b0b97 Fix rpath on UIKit systems
Change-Id: I0b35c32f3730dc15d868b10489abeda909bbe926
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-09-25 15:39:10 +02:00
Tor Arne Vestbø
9a1eb86f3d macOS: Prevent warnings about object files without any symbols
Change-Id: Iafe976bdd27da0476b2e6bb6d84db8ca34aa0a62
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-25 15:39:02 +02:00
Tor Arne Vestbø
1d1ed01711 Xcode: Ensure there's always a CFBundle[Short]Version[String] set
Leaving it empty resulted in errors from Xcode when compiling the app.

Task-number: QTBUG-25309
Task-number: QTBUG-74872
Change-Id: I61b0f47d754c5f5b181a6f918283d990458cc78d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-09-23 16:02:59 +00:00
Laszlo Agocs
60e20abf19 Add a RPi4 device spec
[ChangeLog][Platform Specific Changes][Linux] Added a device spec for
Raspberry Pi 4 (32-bit, V3D)

Change-Id: Idea889842a89dcc74705f1bb9559953dadc07251
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2019-09-22 15:49:40 +00:00
Joerg Bornemann
73f880d393 Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	qmake/generators/makefile.cpp
	qmake/generators/makefile.h

Change-Id: I4c2deac4f6376c85f5e4fe7fb0ccc9ab9a013cd7
2019-09-20 08:20:47 +02:00
Simon Hausmann
4d289edb14 Disable debug-and-release builds for MinGW
The requirement to separate debug and release DLLs on Windows stems from
the Visual Studio C run-time library appearing in two different variants
(debug and release) and not mixing well. It's possible to perform builds
without optimzations and with debug symbols while linking against the
release version of the C run-time, but at the same time the debug
version of the run-time brings other developer visible advantages.

MinGW on the other hand does not have this distinction, does not ship
with separate DLLS and does also not require the VS C runtime library.
Therefore we do not need this separation for MinGW, which means that our
packages can be reduced in size and application developers wishing to
debug their applications do not have to use debug builds of the Qt
libraries or run into Qt internal debug code.

Task-number: QTBUG-78445
Change-Id: Idf588606091298dc44262c4c89e689df18d34747
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-09-18 06:28:16 +00:00
Joerg Bornemann
90779d96ad Ignore non-existent .ui file dependencies
Commit 80dea664 broke .ui files with global includes that are not part
of the project, because we blindly added every file path that falls
out of 'uic -d' as dependency.

Introduce the extra compiler CONFIG flag dep_existing_only to bring
back the old behavior that ignores non-existent dependencies and set
it for uic.

Change-Id: I6eaa82817c932a98ebac6d08115a9815d4b9dd21
Fixes: QTBUG-78144
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-09-18 08:24:46 +02:00
Joerg Bornemann
1456b8091a Make it possible to undefine NDEBUG for nmake and VS projects
For nmake and VS projects we added the NDEBUG define for the release
configuration unconditionally within the qmake generators. To undefine
it, users had to use a nasty work-around.

Now, define NDEBUG within the MSVC mkspecs. In order to do that we
introduce the DEFINES_RELEASE and DEFINES_DEBUG variables that are
merged into DEFINES in default_pre.prf.

Users can unset NDEBUG by writing
    DEFINES -= NDEBUG
in their .pro file.

Note that DEFINES_RELEASE and DEFINES_DEBUG are merged in
default_pre.prf in order to give extra compilers (like moc) the chance
to see the fully resolved DEFINES variable. This is different from the
QMAKE_CFLAGS_(DEBUG|RELEASE) variables that get merged in default_post.prf.

Fixes: QTBUG-78071
Change-Id: I381770a1d2f974fbae9b09a2254e3f2fc7842b68
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-09-18 08:24:38 +02:00
Joerg Bornemann
983cfc773d Fix Vulkan SDK detection for MinGW cross-compilation
We must not set QMAKE_INCDIR_VULKAN if the Vulkan SDK is installed in
some default include directory. MinGW's std headers rely on
#include_next, which will break if we mess with the order of default
include paths.

Fixes: QTBUG-76660
Change-Id: I5ee0fc4c328ff88b979a8c1c010472b3883dff8d
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-09-18 08:24:26 +02:00
Joerg Bornemann
9864d2c6f3 Revert "configure: actually resolve libraries into full filepaths"
This reverts commit 521a85395d.

Having libraries resolved to absolute file paths by configure has
annoying consequences:
1. The Qt installer needs to unabsolutify paths in all kinds of files.
This is error-prone and fragile.
2. It hurts Qt's relocatabilty. The absolute paths are unlikely to be
right on different systems.
3. Qt's configure must imitate linker behavior correctly to do the
resolution right on every platform, which is hard to get right.

Consequently, the disadvantages of 521a8539 outweigh the advantages.

Task-number: QTBUG-72903
Change-Id: I3e159c46a1348963615b95614e56f026ecb2aefd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-09-13 10:47:38 +02:00
Qt Forward Merge Bot
104f0535a1 Merge remote-tracking branch 'origin/5.13' into 5.14
Change-Id: Idcf8fc1d79bcd84b494d7f43308e6fe82d60e1a4
2019-09-13 01:00:15 +02:00
Alexandru Croitor
be21ff11b7 CMake: Fix usage of debug frameworks on macOS
If an app wants use a debug framework of Qt, it is still expected that
the app should link against the release version, and just set
DYLD_IMAGE_SUFFIX=_debug when running the app.

This was not the case before, where the CMake Config files told CMake
to link explicitly against the debug libraries. This caused crashes
due to the Qt plugin loader mechanism still trying to find a release
platform plugin, which in turn would load release libraries, and thus
the application would end up loading both debug and release plugins.

Make sure the Config files in a framework case always reference the
release libraries (even though this might be counter intuitive).
Otherwise users of the Debug Config files would always get
crashes.

Fixes: QTBUG-78131
Change-Id: I88b1dc421477ad186012ca67b328a891128eb568
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-09-10 16:48:47 +02:00
Friedemann Kleint
1d53b6d9f2 Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	tests/auto/gui/text/qtextlayout/tst_qtextlayout.cpp

Change-Id: Idd3ca5cb9a2b95a4c3513b2a4c8966e6f56193f1
2019-09-09 07:51:49 +00:00
Qt Forward Merge Bot
1f35c8caa0 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I371c5ae1af6f58e32e579671f485b92b586e0b76
2019-09-08 11:33:28 +02:00
Qt Forward Merge Bot
a9db729095 Merge remote-tracking branch 'origin/5.12.5' into 5.12
Change-Id: I41a252fdbf22551aadb0b1a6e9ecf3f95f99fbd4
2019-09-07 13:08:26 +02:00
BogDan Vatra
891b1f51b9 Android: Fix cmake generator
Fixes: QTBUG-29859
Change-Id: Id0b5f9ab8b4866483361ba9f15cf51dc0d2627d0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-07 06:53:19 +03:00
Joerg Bornemann
cc32a69193 Fix CMake config files for -libdir different from "lib"
When Qt was configured with -libdir different from "lib", one could not
build with CMake whenever a static lib was pulled in (e.g. uitools).

Do not hard-code "/lib" but use the correct variable also for static
libraries.

Fixes: QTBUG-76255
Change-Id: I28c6861752e29e461247628d2b1f8a9ec32f0790
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Fabian Vogt <fabian@ritter-vogt.de>
2019-09-06 13:13:32 +02:00
Liang Qi
6a36fe904c Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/corelib/codecs/qicucodec.cpp
	src/dbus/qdbusserver.cpp
	src/gui/painting/qbezier.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
	src/plugins/printsupport/cups/qppdprintdevice.cpp

Change-Id: I2703128bb64baf5580fbc2c2061b55b0f0611d2a
2019-09-04 07:03:54 +02:00
BogDan Vatra
162e23d838 Android: Add aab target
Move aab, apk, apk_install_target to !build_pass, otherwise these targets
will be executed for each android abi.

Change-Id: I18f6c8946f503f2c08338f24758bf9059987fe0f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-09-02 18:32:29 +03:00
Qt Forward Merge Bot
3176c821bf Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I9823da32168e99bbece2f8337d0bd4d33e6d634c
2019-08-31 01:00:48 +02:00
BogDan Vatra
65dfc485ad Android: clean configure params for android
-android-toolchain-version is not needed anymore as we are using exclusively the llvm toolchain.

Change-Id: Ia033297a6a2c968352c364758eb1436380a5f96e
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-08-30 22:29:14 +03:00
BogDan Vatra
c28b881c98 Android: Use LLVM tools where possible
Properly set CROSS_COMPILE qmake variable

Fixes: QTBUG-77890
Change-Id: I73e22d0f936d35c373c064d30ea8d92005d79b2c
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-08-29 09:45:37 +03:00
BogDan Vatra
8e54fc0880 Android: AUX template doesn't require a multi arch build
Change-Id: I7b7abe7f016b4b85546986354653fc4ddf320dcc
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-08-29 09:45:34 +03:00
Tor Arne Vestbø
0844be34ba iOS: Skip explicit dead code stripping when generating Xcode projects
Fixes: QTBUG-73680
Change-Id: I5d17ef6321bb1f800c39c3f80dca9527ad343d12
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-08-28 13:58:39 +02:00
BogDan Vatra
0315e1945e Android: install qmlfiles only for first ABI
qmlfiles are the same for all ABIs, and installing them for all leads to race condition

Change-Id: I69fe062f59f1d7c028dff5212e2f2fac7e71398d
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-08-28 13:50:31 +03:00
BogDan Vatra
3db14b5bd3 Say hello to -android-abis configure param
This configure parameter is useful to compile Qt only for a selected ABIs.

The old parameter, -android-arch, does the same thing, it's kept for compatibility.

[ChangeLog][Android] -android-abis configure script parameter useful to compile Qt
only for a selected Android ABIs.

Change-Id: I1f418c7e0914dd83b98d763e8cd8c09841e20fdf
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-08-28 12:36:34 +03:00
Liang Qi
0f1f7fb97f Merge remote-tracking branch 'origin/dev' into 5.14
Conflicts:
	src/widgets/kernel/qwidget.cpp
	src/widgets/kernel/qwidget_p.h
	src/widgets/kernel/qwidgetrepaintmanager.cpp
	src/widgets/kernel/qwidgetwindow.cpp
	tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp

Change-Id: Ifae457d0427be8e2465e474b055722e11b3b1e5c
2019-08-27 09:45:52 +02:00
BogDan Vatra
5bb178c479 Say hello to Android multi arch build in one go
Multi arch build in one go is need to support the new .aab packaging format.

By default the users apps are built for all Android ABIs: arm64-v8a armeabi-v7a x86_64 x86
The user can pass ANDROID_ABIS to qmake to filter the ABIs during development,
e.g. qmake ANDROID_ABIS="arm64-v8a armeabi-v7a" will build only for arm ABIs.

[ChangeLog][Android] Android multi arch build in one go,
needed to support the new .aab packaging format.

Change-Id: I3a64caf9621c2a195863976a62a57cdf47e6e3b5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-08-26 12:59:15 +03:00
Alexandru Croitor
6a859f8112 CMake: Fix usage of non debug and release static builds on Windows
As was recently discovered, the debug_and_release CONFIG value is
always true on Windows, even if the feaure is disabled when specifying
-debug or -release when configuring Qt.

In order for the generated CMake Config files to be correct, we need
to use the true feature value.

Amends 44602224bf.

Change-Id: I42be684e8ad2a5ce72cb2e9d36f81de7589112c6
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-08-25 16:47:25 +02:00
Joerg Bornemann
7cbe1ca33d CMake: Fix detection of debug_and_release for Windows builds
If Qt is configured with -release or -debug we must set CMAKE_DEBUG_TYPE
or CMAKE_RELEASE_TYPE, but not both.

This was broken by 82a2c7df which fixed the issue for iOS
simulator_and_device builds.

We have the following situation for both relevant CONFIG values:

                           debug_and_release  build_all
iOS simulator_and_device   unset              set
Windows -release           set                unset
Windows -debug-and-release set                set

Trivia: On Windows, when configuring with -release (or -debug) then
the *feature* debug_and_release is not set.
The *CONFIG* *value* however, is unconditionally set in
msvc-desktop.conf.

Fixes: QTBUG-77754
Change-Id: I326ecb024056bc189be5fa03ec6f59bc71226544
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-08-25 14:47:22 +00:00
Paul Wicking
304587e3db Merge 5.12 into 5.12.5
Change-Id: I188926022fa4afc0db2dadc6dc214ea5173b17ea
2019-08-23 08:42:17 +02:00
BogDan Vatra
9b14950ff6 Android: Update clang mkspecs
Follow Google's BuildSystemMaintainers doc to simplify (a lot) the clang support
It is needed to support future NDK releases painlessly.
Also remove old workarounds.

[ChangeLog][Android] Android depends on NDK r20+

Change-Id: Ib4c07fc71e0f5a264d804b0b3baa18ff79d07630
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-08-22 16:32:47 +03:00
Qt Forward Merge Bot
0c9f8ff2a8 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Ia4bcd81eff948e56a5eda9519cdbee59b7da54d9
2019-08-22 01:00:35 +02:00
Alexandru Croitor
6743b174c0 CMake: Fix invalid setting of QT_PLUGIN_TYPES on interface libraries
It is forbidden to set upper case named properties on CMake
interface libraries which do not start with the "INTERFACE_"
prefix. Rename QT_PLUGIN_TYPES to INTERFACE_QT_PLUGIN_TYPES.

There does not seem to be any usage of the property, so it's just for
informational purposes, so it's a one line change.

Fixes: QTBUG-77754
Change-Id: I3621f2b6188c3c72c4c2446f93ba1e078b755f72
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-08-21 22:18:42 +02:00
Lorn Potter
987cca7bca wasm: allow setting total memory for non thread builds
Using WASM_OBJECT_FILES does not allow memory growth, so we need to just
explicitly check for QMAKE_WASM_TOTAL_MEMORY

Change-Id: I447113972dfc3df4ee4073e8cc25481646d1507b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-08-22 04:41:04 +10:00
Joerg Bornemann
3b5f9678d7 Remove dead QMakeSourceFileInfo caching feature from QMake
Since its introduction in commit
65bb1a25419210e6097cad973fb847aa3719c09b (old internal history, 2005)
with the commit message "optimizations I've been sitting on here"
we're dragging along this dead code. It is time for removal.

Change-Id: Ic7902ebb8c402734974ad6651a1371d1e5bf93c5
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-08-20 20:27:52 +02:00
Tor Arne Vestbø
28ba681eb6 macOS: Whitelist the 10.15 SDK for building Qt and applications
Change-Id: I63689e79d08429e7760bb85a1f2b3f5825178428
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-08-20 15:07:43 +02:00
Tor Arne Vestbø
fe2aaf1b90 qmake: Quote path to project file in Xcode project Makefile rule
Change-Id: I40aba757486548ef9f319d3176e89eb7129a007e
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-08-20 11:31:37 +02:00
Alexandru Croitor
5d7e9c9667 CMake: Fix prl and library names on macOS for debug configurations
The paths to the libraries and prl files should have the "_debug"
suffix for the debug configuration. This prefix is added to the TARGET
when by qt_module.prf when doing a debug build, but not during a
debug_and_release build.
Make sure to strip the _debug suffix if it's there, and re-add it later
always, to be consistent in both debug_and_release builds and in
debug builds.

Amends a12b6e7bf6.

Task-number: QTBUG-38913
Task-number: QTBUG-75520
Task-number: QTBUG-77092
Change-Id: I29e88f2b991e2be06b23652d64edc768fa35a5ae
(cherry picked from qt/78d67d17a6c108a419816b8bd47f78864ddbb07f)
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-08-18 21:06:11 +02:00
Tasuku Suzuki
99749d3b05 Fix build without features.poll_{ppoll,pollts,poll,select}
Change-Id: Idc87521cdf713682ed07eb28b3d3f2f3ca0675ce
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-08-18 13:22:35 +09:00
Alexandru Croitor
82a2c7df30 CMake: Fix detection of debug_and_release for iOS simulator_and_device
create_cmake.prf populates the values of CMAKE_RELEASE_TYPE and
CMAKE_DEBUG_TYPE depending on if Qt was configured with debug, or
release, or the build_all feature was set (which implies
debug_and_release).

simulator_and_device also implies build_all. This
is a problem when configuring a Qt simulator_and_device build with
only a "debug" configuration, or only a "release" configuration.

In that case we would try to parse prl files for both configurations,
even though only one configuration exists.

Switch to checking for debug_and_release scope explicitly instead of
build_all. This allows configuring and building a Qt iOS
device_and_simulator debug configuration which is usable from CMake.

Task-number: QTBUG-38913
Change-Id: Ife6d5d34d2b6bb1ac787d901a166e41c6e0c844b
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-08-17 12:03:41 +02:00
Qt Forward Merge Bot
425d34b70e Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: Icc80dacbca8613f2996be75553ff15d0ad242b7e
2019-08-15 01:00:51 +02:00
Lorn Potter
7a67a78d05 wasm: remove clamp mode for WASM_OBJECT_FILES builds
Change-Id: I2ddda7423c6546ab287111485da9c145ce7d31ea
Fixes: QTBUG-76771
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-08-14 14:38:26 +10:00
Yuhang Zhao
afb5746e62 Enable /OPT:REF explicitly for MSVC
/OPT:REF is enabled for release builds for MSVC by default,
however, clang-cl may not enable it without this flag,
add it to MSVC's mkspec so that all compilers based on MSVC
can benefit from it as well.

Change-Id: Ia80c20a8510cfa1e4687e39104ce99b37a2aa13f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-08-14 07:22:28 +08:00
Liang Qi
1dade1bd8a Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	mkspecs/win32-clang-msvc/qmake.conf
	src/corelib/tools/qlist.h
	src/gui/painting/qcompositionfunctions.cpp
	src/gui/painting/qtriangulator_p.h
	src/gui/text/qfontengine_p.h
	src/network/kernel/qhostinfo_p.h
	src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp

Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io>
Change-Id: Ib8a0308cf77224c4fbdcf56778fdac4a43e37798
2019-08-13 09:46:17 +02:00
Kyle Edwards
63d9cd17d0 CMake: Add support for auto-importing plugins in CMake
This commit adds transitive dependencies to the plugins, so that a
sane set of default plugins get auto-imported when linking against a
module. It also provides a new function, qt5_import_plugins(), which
allows you to override the set of plugins that get imported. The decision
of whether or not to import a specific plugin is based on several custom
target properties and a very clever generator expression.

Note that this change only imports plugins on static Qt builds. It
does nothing on shared Qt builds, as the shared libraries already have
their own plugin import mechanism.

[ChangeLog][CMake] Added ability to auto-import non-qml plugins on
CMake builds

Task-number: QTBUG-38913
Task-number: QTBUG-76562
Change-Id: I2d6c8908b521cf6ba1ebbbc33a87cb7ddd9935cf
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-08-12 18:23:58 +02:00
Alexandru Croitor
ef74730a59 CMake: Prevent creation of library target when it already exists
When doing plugin auto-importing as part of a Qt static build, it can
happen that the same module FooConfig.cmake file is loaded twice.
Make sure not to create the same target twice if it was already
created previously.

Task-number: QTBUG-38913
Change-Id: I734c83ff3c0bb9e3ee9bff37971209c57abaa2b9
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-08-12 18:23:54 +02:00
Liang Qi
44c393f9b6 Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	config.tests/arch/write_info.pri
		Repair architecture config test for the WASM_OBJECT_FILES=1 build mode
	configure.pri
	tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp

Done-With: Jörg Bornemann <joerg.bornemann@qt.io>
Change-Id: I9e12088356eb5bc65b53211cd7a8e330cccd1bb4
2019-08-12 13:23:11 +02:00
Yuhang Zhao
d502b19b28 Fix std detection for win32-clang-msvc
clang-cl will never support C++ standards newer than
C++14 without these flags.
I didn't add them to msvc-based-version.conf because
on Windows, only clang-cl use the same flags with MSVC,
both ICC and MinGW have their own flags. So they are
clang-cl specific flags.

Change-Id: Ia44a5ea4237c77ea5e897fffded32cbc008a4729
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-08-09 15:16:18 +08:00
Tor Arne Vestbø
6ac610c79b Allow specifying explicit SDK version on Apple platforms
This enables building against the latest SDK, while still opting out
of features that this SDK normally enables, by lowering the SDK version
set in the BUILD_VERSION/VERSION_MIN_MACOSX load command.

Change-Id: Id5f13524740bfbf5eda10a5d0c2e3fda04bf3f52
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-08-08 10:27:28 +02:00
Marc Mutz
213f7d1b1f Require opt-out for using QLinkedList
Now that all QLinkedList uses are removed from Qt, make sure
QT_NO_LINKED_LIST is set by default for Qt modules, so new
modules don't need to explicitly specify it in their
.qmake.conf.

Modules can still opt out of the QLinkedList ban by adding
   DEFINES -= QT_NO_LINKED_LIST
to their .qmake.conf.

Change-Id: I34b7ab1c009795649bb7b4f1e7493556eafadd5a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-08-07 20:09:10 +00:00
Liang Qi
f3b28e8021 Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	qmake/generators/unix/unixmake2.cpp
	src/plugins/platforms/cocoa/qcocoawindow.mm

Change-Id: Iba7aa7324f35543e0297a3680956420058cd3630
2019-08-05 09:28:48 +02:00
Tor Arne Vestbø
89e97e9937 Pass qmake arguments when creating Xcode project from Makefile
Change-Id: I0020273b200465f44a135848b4fd505793e85c30
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-08-01 15:24:25 +02:00
Qt Forward Merge Bot
5ee1c86d10 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I4505ec6fe17a1aa2c8d1e6576234d06a34eb9f99
2019-08-01 01:00:10 +02:00
Simon Hausmann
2dddc1c9f4 Fix erroneous missing-cmake-tests errors
After commit 9c7ebd191b, qmake would
complain about missing cmake tests even for internal modules that have
no application side C++ linkage that needs testing.

Change-Id: I23b23c81dbe6be2b6da5672cbd7b8f8454ec2f66
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-07-31 16:37:28 +02:00
Paul Wicking
23841083e3 Doc build: overcome command-line length limitation on Windows
On Windows, create a file containing include paths for QDoc in
cases where number of include paths exceed 30. Based on how moc
does this.

Task-number: QTBUG-68259
Change-Id: I0d03fab4b809174cb6b48c36ee9f8880ff294ff4
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Martin Smith <martin.smith@qt.io>
2019-07-30 07:54:17 +00:00
Qt Forward Merge Bot
f9b8c544e6 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: Ic6cfe08dbda1dc92b969e67063f805df63ba0fcf
2019-07-27 01:00:37 +02:00
Liang Qi
bf08e0bbb2 Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/network/access/qhttpthreaddelegate.cpp

Change-Id: Id47b977587e2d713c16ac17e63c5ec80c2f05ee9
2019-07-26 10:13:06 +02:00
Mike Krus
b202d45026 Make simulator detection work with Xcode 11
Beta version of Xcode 11 changes the format of the json object
returned by simctl and used to detect running simulators.

While multiple versions of Xcode can coexist on the same system,
they share the same simulator infrastructure so installing
Xcode 11 Beta affects projects using previous versions.

Change-Id: Icf06a794aa5ba3624163ace2ce827c0ecf97c38c
Reviewed-by: Frank Osterfeld <frank.osterfeld@kdab.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-07-21 14:05:15 +01:00
Qt Forward Merge Bot
64df0eda36 Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	src/corelib/global/qlogging.cpp
	src/gui/painting/qtextureglyphcache_p.h
	src/gui/text/qfontengine.cpp
	src/widgets/widgets/qlineedit.cpp

Change-Id: Ic8798538df466b7141caa8bbf1fb7605eb56be37
2019-07-17 10:44:21 +02:00
Qt Forward Merge Bot
77d126ccb5 Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	configure.pri

Also required s/solid\.color/solidColor/ in a couple of places in:
	src/gui/painting/qpaintengine_raster.cpp

Change-Id: I29937f63e9779deb6dac7ae77e2948d06ebc0319
2019-07-12 12:23:29 +02:00
Qt Forward Merge Bot
fd2d9de51e Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: Icaabf08f9af539ddf844d96bc9c3a2d09408ba8a
2019-07-12 01:00:42 +02:00
Kai Koehne
3f8e754f07 CMake: Properly escape '.lib' in regex
In a CMake regex, you need two backslashes to escape a character. The
.in file therefore needs four backslashes ...

This amends ba4fdd99ff

Fixes:  QTBUG-76698
Change-Id: Ic757354ba596bf020c3ee5e90ee6d2d0fe3ba352
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-07-11 14:13:19 +00:00
Qt Forward Merge Bot
85d3061c1c Merge "Merge remote-tracking branch 'origin/5.13' into dev" 2019-07-10 17:01:22 +02:00
Joerg Bornemann
3052e621a4 Fix duplicates in QMAKE_DIR_REPLACE
When building Qt, qt_build_config.prf adds all directory variables but
DESTDIR to QMAKE_DIR_REPLACE_SANE. We must not add the content of
QMAKE_DIR_REPLACE_SANE unconditionally to QMAKE_DIR_REPLACE in order
to avoid duplicate entries.

Duplicate entries result in an interesting build folder structure like

.obj
├───debug
│   └───debug
└───release
    └───release

This commit amends 274882a5.

Change-Id: Ifa8178410d82f58635babc46d43774bab522fbf8
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-07-10 12:35:52 +02:00
Qt Forward Merge Bot
6fd20defb9 Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	src/corelib/time/qdatetime.cpp
	src/widgets/widgets/qcombobox.h

Change-Id: Ib84352e8fe34aed2986a1c94e7346a46a71c803b
2019-07-10 10:39:33 +02:00
Ryan Chu
17ac9f8ced Revert "Disable Docker-based test servers on Windows temporarily"
This reverts commit 17512d497d.

Reason for revert: force vmx instructions to Coin level B virtual

Relates to qt/qt5 84ff024609e4eca003c604294b4102e73deba8c3

Change-Id: Id87a5629a5cd6ebc18c676eae390466e280fc600
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-07-09 13:49:18 +02:00
Alexandru Croitor
9c7ebd191b CMake: Create Config.cmake files for internal modules in static builds
This change will create Config.cmake files for internal modules like
AccessibilitySupport when doing static builds. They need to be
find_package()'ed and linked in when linking in certain qt plugins.

Task-number: QTBUG-38913
Task-number: QTBUG-76562
Change-Id: Ia2e446025c87df48f20bb65cfd9da6c6a4354bb1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-07-08 11:04:35 +02:00
Alexandru Croitor
44602224bf CMake: Put the static dependencies into the relevant configuration
When adding the static dependencies for a module, they should be
added to the debug|release configuration as appropriate, otherwise
it ends up adding the debug version of the libraries to the release
configuration as well as the release version of the libraries.

Implementation wise, that means we have to use generator expressions
of the form $<$<CONFIG:Configuration>:${dependencies}>, because
INTERFACE_LINK_LIBRARIES does not have a
INTERFACE_LINK_LIBRARIES_<CONFIG> equivalent that can be set per
configuration.

Note that the condition part of the generator expression can not
explicitly check for Debug or for Release, because a user can
configure their application without specifying CMAKE_BUILD_TYPE,
which means that both Debug and Relase conditions would fail.
So the actual condition has to be isDebug or isNotDebug.

The same approach is used for INTERFACE_LINK_OPTIONS.

For debug_and_release builds we use the isDebug and isNotDebug
conditions for the generator expressions.

For singular builds (only release or only debug), we set the
generator expression condition to "1" aka always true.
This means that the Qt libraries and link options will always be used
regardless of the configuration with which the CMake application
is configured with.

Fixes: QTBUG-76337
Task-number: QTBUG-38913
Change-Id: I5369d8ba083359a4a92253dbd1dabe9d1efa34db
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-07-05 15:59:13 +02:00
Liang Qi
deee7b7ece Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	.qmake.conf
	qmake/generators/makefile.cpp

Change-Id: Ifb2633a69d0bf8cdf12d799c6259beefc279c49e
2019-07-05 15:37:50 +02:00
Alexandru Croitor
6ad08b9cad CMake: Fix handling of static dependencies that have spaces in path
The absolute paths of certain static dependencies can have spaces in
them. The _qt5_$${CMAKE_MODULE_NAME}_process_prl_file fails to handle
this, and simply replaces all spaces with semicolons, which obviously
breaks the list of dependencies, and a consuming application fails to
link with a message like:

LINK : fatal error LNK1181: cannot open input file 'C:\Program.obj'

This change partially restores the functionality that was added in
102e1822ff specifically the part
that changes qmake to export an additional variable
QMAKE_PRL_LIBS_FOR_CMAKE. This variable has the same content as
QMAKE_PRL_LIBS except it uses a semicolon as a separator, so that
CMake can correctly parse the separate lib entries.

This is much cleaner than trying to parse the original QMAKE_PRL_LIBS
variable with a complicated regular expression.

Amends eda28621f6.

Task-number: QTBUG-38913
Change-Id: I1d18fb779606505bc92320d8ce13232c7022e212
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-07-05 10:18:56 +02:00
Alexandru Croitor
78d67d17a6 CMake: Fix prl and library names on macOS for debug configurations
The paths to the libraries and prl files should have the "_debug"
suffix for the debug configuration. This prefix is added to the TARGET
when by qt_module.prf when doing a debug build, but not during a
debug_and_release build.
Make sure to strip the _debug suffix if it's there, and re-add it later
always, to be consistent in both debug_and_release builds and in
debug builds.

Amends a12b6e7bf6.

Task-number: QTBUG-38913
Task-number: QTBUG-75520
Change-Id: I29e88f2b991e2be06b23652d64edc768fa35a5ae
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-07-05 10:18:47 +02:00
Joerg Bornemann
11d9af5d95 Unbreak the -silent build
The header clean command must not be prefixed by "@echo ...", because it
now starts with "$(CXX)" which already is prefixed.

This amends commit 6fa5dfdd.

Change-Id: I5c2e0d2c2ed91c7232fce0a4a49db0fccfdc005d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-07-04 13:16:52 +02:00
Andy Shaw
faf742b05d dumpcpp: Run dumpcpp if the generated files do not exist at qmake time
By running dumpcpp if the files do not exist at qmake time we enable
the dependency finder to find these files and set up the dependencies
as appropriate. Since other changes ensure that dumpcpp will be called
at the right time when building if the typelib changes, we no longer
need to have the generated files dependent on the objects. As a
result, we are able to prevent it from unnecessarily rebuilding
everything if certain files are updated.

Change-Id: I334f48c7a980aa8b893c14cb2a4687d3b2b7a4b9
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-07-03 22:15:44 +01:00
Qt Forward Merge Bot
a2b221e595 Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	.qmake.conf

Change-Id: I936be3c0df2b9845ff6a85eb3d4442cdabe63d37
2019-07-03 15:19:26 +02:00
Joerg Bornemann
cee5a11bdb Fix directory separator of QMAKE_INCDIR_VULKAN
Like in Qt code itself we should use forward slashes consistently.

This enables the vulkan test to run on Linux for MinGW
cross-compilation.

Task-number: QTBUG-76660
Change-Id: Ifc6dec11bac3c3769d5d06e49da529f66f7b5843
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-07-02 08:02:53 +02:00
Liang Qi
d25c322729 Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	src/network/ssl/qsslsocket_openssl.cpp
	src/platformsupport/vkconvenience/qvkconvenience.cpp

Change-Id: I97ce6ed185f7fdad8102cc58d3cfec0119fd7bb4
2019-07-01 10:21:37 +02:00
Mikhail Svetkin
222b81f5da rtems: Fix missing some ernno defines
By default RTEMS does not support linux extensions for errno.
Enable it for build.

Change-Id: I43b346794b99ac0ed339bfbe6e39684071615503
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ryan Chu <ryan.chu@qt.io>
2019-07-01 02:04:19 +02:00
Ryan Chu
57055ffafd Share the common configurations among different modules
This change is used to generalize a template docker-compose file for all
modules. Ideally, the leaf module only need to keep a docker compose
file for all platforms (docker-compose.yml).

NOTE:
The version of docker-compose file downgrades from 3.4 to 2.1 because
the 'extends' keyword is not supported in Compose version 3.x.

Change-Id: I2e36fd9236eda86cb5fcf940d787ccefe9200696
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2019-07-01 01:09:42 +02:00
Qt Forward Merge Bot
134ee9d548 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I4cb91777e7ae9f462fa219d5b9ebeb277fde49c3
2019-06-29 01:00:34 +02:00
Joerg Bornemann
57eed823e4 Fix build with Android NDK's make on Windows
The make executable that comes with Android's NDK tries to execute the
shell-builtin "move" as a stand-alone executable unless you trick it
to execute "move" through the shell by surrounding one argument with
double quotes or such.

Force the execution of "move" through shell by altering QMAKE_MOVE for
Android on Windows.

Change-Id: I5b1490ad0606960dbd06a4cafb0b0b983e265159
Fixes: QTBUG-35713
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-06-28 15:13:34 +02:00
Qt Forward Merge Bot
7265fb0597 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I912bd8851c390302414d3dfb3c8220df5a0d5630
2019-06-28 01:00:23 +02:00
Liang Qi
25eb97d2d4 Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	.qmake.conf
	src/network/ssl/qsslsocket_openssl.cpp

Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change-Id: Ibb57a0548b4977797b400637487a56245ac1c024
2019-06-27 14:38:03 +02:00
Joerg Bornemann
18a6c5ebe2 Fix QMAKE_LIBDIR_BCM_HOST for linux-rasp-pi3-g++
The directory must be prepended by = to denote the sysroot.
This amends commit 797f686e.

Change-Id: Ib85c0abc58fce3504ecccef0e223b2618ac9149a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-06-25 09:42:09 +02:00
Joerg Bornemann
c450e8bd20 Fix .la/.pc replacements if libdir is in QMAKE_DEFAULT_LIBDIRS
We must use the same two-level replacements like for .prl files.
This amends commit d5071a40.

Change-Id: Iea065d01dee61cf2d1ff78640d045c3c76db9ac8
Fixes: QTBUG-76625
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-06-25 09:17:07 +02:00
Thiago Macieira
859eb2467d Add qmake config for controlling LTCG behavior for static libs
Static libraries may get installed and used by other builds, which may
be done with a different version or build of the compiler. So this
commit introduces two new flags:
 - no-static-ltcg: disables LTCG completely for static libraries
 - fat-static-lto: forces static libraries to produce fat LTO objects

fat-static-lto is useful for Linux distributions, since installed static
libraries should not carry LTO information, but that information is
useful during Qt's own build. This feature should be used alongside some
compiler-specific method of removing the LTO information from the
static libraries prior to installation, so only the regular part
remains.

For current GCC versions, this command suffices:
  strip -R '.gnu.lto*' -R '.gnu.debuglto*' libname.a

Otherwise, distributions can use "no-static-ltcg" to disable it
completely.

Change-Id: I495bc19409f348069f5bfffd155237ade9f4b42f
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-06-17 15:27:51 +00:00
Liang Qi
bd9959bde2 Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	.qmake.conf
	src/gui/painting/qdrawhelper.cpp
	src/network/ssl/qsslsocket_openssl.cpp
	src/widgets/styles/qstylesheetstyle.cpp

Change-Id: Ibe1cd40f46a823c9e5edbe0a3cd16be1e1686b17
2019-06-20 07:50:44 +02:00
Liang Qi
ef37ab9970 Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
	.qmake.conf
	src/gui/painting/qdrawhelper.cpp
	src/gui/text/qdistancefield.cpp
	src/gui/text/qdistancefield_p.h
	src/network/ssl/qsslsocket_openssl.cpp
	src/plugins/platforms/android/qandroidinputcontext.cpp
	src/widgets/styles/qstylesheetstyle.cpp

Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change-Id: Ia7daad21f077ea889898f17734ec46303e71fe6b
2019-06-25 13:04:27 +02:00
Tor Arne Vestbø
6fa5dfddf8 Don't hardcode compiler when building headers
Normal sources are built using $(CXX), which is defined in the makefile,
but can be overridden. We should do the same lazy evaluation of the
compiler for headers.

Change-Id: Ic548786bd18ed8fb7eb0b58a527615ab19000323
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-06-13 14:11:50 +02:00
BogDan Vatra
e428cdc32c Android: Fix sanitize_address
Starting with Android 8.1.0 wrap.sh can be used to enable ASAN on Android.

Change-Id: I6ef6e5989475b9b7981d05e78a03f9680c1acb1b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-05-29 15:03:47 +03:00
Thiago Macieira
36c6b7ee4d Append LTCG arguments properly
If the QMAKE_CXXFLAGS already had -ffat-lto-objects, the *= wouldn't add
it it again, after our "-flto -fno-fat-lto-objects", which meant the
last one would stand.

Change-Id: Ic9cfa6256b5045caa6e6fffd15a7f6cda7aaa837
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-06-13 23:02:22 -07:00
Liang Qi
98813ead02 Merge remote-tracking branch 'origin/5.13.0' into 5.13
Change-Id: I39248f6c561c6274ab5ead64238dd2f80e167eee
2019-06-17 10:17:56 +02:00
Qt Forward Merge Bot
2a9cf3aeab Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I53a50669face6f68ddc046fd2102de8c1f888b4b
2019-06-14 01:00:09 +02:00
BogDan Vatra
0676645318 Android: Fix build with NDKr20
In NDK r20 clang adds -lc++ library automatically which leads to link fails.

[ChangeLog][Android] Fix NDK r20 linking.

Task-number: QTBUG-76293
Change-Id: I6675180a3555d1ad9047d7a9ce1c03333cf0ab35
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-06-13 07:14:54 +00:00
Fredrik Orderud
90aefe0843 Add quoting to deal with empty ${CMAKE_CXX_STANDARD_LIBRARIES}
Done to fix broken CMake WebAssembly support, where CMAKE_CXX_STANDARD_LIBRARIES
appear to be empty. The regression was introduced by
ba4fdd99ff.

This fixes the following CMake error on find_package(Qt ...):
string sub-command REGEX, mode REPLACE needs at least 6 arguments total to command.

Fixes: QTBUG-73475
Fixes: QTBUG-76244
Change-Id: Ieebe8cd1d49bb302dc37d8f118cc0b9376d6cdd7
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-06-11 12:44:49 +02:00
Joerg Bornemann
015d7f16cb Fix QMAKE_PRL_INSTALL_REPLACE for macOS
The regular expression with the alternative is not portable.
Use a separate QMAKE_PRL_INSTALL_REPLACE item.

This amends commit f00de33.

Fixes: QTBUG-75950
Change-Id: I78e172053f8b05be7d595a1c9e1695ea658b0547
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-05-22 10:40:36 +02:00
Joerg Bornemann
f00de3322e Replace absolute Qt lib dir in .prl files
In the case of building a Qt module repository against an installed
qtbase the .prl files contain absolute paths to Qt dependencies e.g.
'/install-prefix/lib/libQt5Core.so'.

Those must be replaced with $$[QT_INSTALL_PREFIX]. The .prl
replacement code however only takes $$MODULE_BASE_OUTDIR/lib into
account.

Fixes: QTBUG-75804
Change-Id: I5ea5623ca7396b672fded3f1b9434b9ad5ed12ec
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-05-20 13:06:57 +00:00
Kai Koehne
9dbbccf7a2 Fix emar invocation on Windows for MinGW
If qmake is called without sh.exe in PATH, the relative paths
in OBJECTS will contain backslashes as separator.

Anyhow, emar needs forward slashes. Use GNU make's subst command
to fix this.

This amends  22c1e10e19.

Task-number: QTBUG-75257
Change-Id: Iacc6fe69cf470f35c6ddd829be7a80944346452d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-05-13 04:37:47 +00:00
BogDan Vatra
c996d13126 Android: Fix x86_64 linking
x86_64 libs are located in ANDROID_PLATFORM_ROOT_PATH/usr/lib64
not in ANDROID_PLATFORM_ROOT_PATH/usr/lib .

Fixes: QTBUG-47672
Change-Id: Ia1f74f7c2a30b276b95fd0e7dcf8370d739e3c41
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 43763e2796)
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2019-05-08 08:40:44 +00:00
Frederik Gladhorn
4f5b2733b6 Merge 5.13 into 5.13.0
Change-Id: I98e2b93d78dba1cbf746c39a0b5877d5e72c91fc
2019-05-07 14:51:25 +02:00
BogDan Vatra
854156dd07 Android: Nuke mips architectures
Mips archs were removed from Android NDK long time ago.

Change-Id: Icf64a1e2cfbe3fe7307c7898b14fd199d9eeaad3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-05-06 08:01:04 +00:00
Qt Forward Merge Bot
e4e5a1f0b7 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Iaad9509712c848ed42ada2c25065162a6fc5a930
2019-05-06 01:00:13 +02:00
Joerg Bornemann
6288c12bb4 Resolve QMAKE_INCDIR_VULKAN on every qmake call
Do not store this variable locally, because
a) it might change if the SDK location changes
b) does not play well with Qt installer packages which would provide the
include path of the build machine.

To achieve this we introduce the (usual) magic value - for
QMAKE_EXPORT_INCDIR_VULKAN to denote "do not export this value".

Fixes: QTBUG-73796
Change-Id: Ied26ee12cbcdf7f5f6e1caef5d29dadf6309c5d6
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-05-05 13:15:37 +00:00
Liang Qi
b5c2535eb0 Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/3rdparty/pcre2/qt_attribution.json

Change-Id: Ibae941cb12662f27bd6962ee02bc235971c59a15
2019-05-03 10:44:24 +02:00
Joerg Bornemann
d5071a4016 Fix prl replacements if libdir is in QMAKE_DEFAULT_LIBDIRS
QMAKE_PRL_LIBS contains absolute paths to libraries, e.g. libqtpcre2.a.
On "make install" the libdir is replaced with the installation target
libdir. If the libdir is in QMAKE_DEFAULT_LIBDIRS (e.g. /usr) then the
replacement was empty. That worked fine for include paths but not for
paths referencing files in that libdir:
/my/build/lib/qtbase/lib/libqtpcre2.a would become /libqtpcre2.a.

Add another replacement that takes care of file paths and inserts
$$[QT_INSTALL_LIBS].

Fixes: QTBUG-75460
Change-Id: I4e84478a50c24d4143ad5695493cad2992735cf2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
2019-05-02 13:04:22 +00:00
Joerg Bornemann
22c1e10e19 Fix emar invocation on Windows
On Windows we hit the command line length limit when building the wasm
port of Qt. We must not pass the list of object files directly to emar,
but write a response file which is then passed via the @ parameter.

Fixes: QTBUG-75257
Change-Id: Id518fd81325716b8efaba29f495568a9a3e34be4
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2019-05-02 05:35:09 +00:00
Allan Sandfeld Jensen
ef05c48898 Fix -Wdeprecated-copy warnings
Implicit copy constructors or methods are considered deprecated for
classes that has one of the two or a destructor.

The warning is enabled with -Wextra in gcc 9

Change-Id: Ic9be654f2a142fb186a4d5a7d6b4f7d6f4e611d8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-01 07:39:55 +00:00
Kai Koehne
ba4fdd99ff CMake: Ignore CMAKE_CXX_STANDARD_LIBRARIES in .prl files
Do not call find_library() on libs that are part of CMAKE_CXX_STANDARD_LIBRARIES:
At CMake call time they might not be found.

Fixes: QTBUG-73475
Change-Id: I350b3280744883e82d83c46e70f6a7cfc8aeed2e
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-30 11:50:07 +00:00
Qt Forward Merge Bot
9f1a1e320c Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Ibce9bfef928ce39070183c488ce86ae32e5ea705
2019-04-28 01:00:26 +02:00
Joerg Bornemann
bbfc95914f Fix determination of OpenGL include paths on macOS, take 3
The sysrootification of QMAKE_INCDIR_OPENGL on macOS must happen only
once. Commit 49ef3773 addressed this but stored the sysrootified
QMAKE_INCDIR_OPENGL in qt_lib_gui_private.pri. For installer packages,
these paths are the paths of the build machine and most likely wrong
on the user's machine.

This reverts commit 4949ef377349ba4dae840c2d5caa36e2d516707baa and
restores the sysrootification in sdk.prf. The original include paths
are assigned to QMAKE_EXPORT_INCDIR_OPENGL and stored as
QMAKE_INCDIR_OPENGL in qt_lib_gui_private.pri.

Fixes: QTBUG-75374
Task-number: QTBUG-73736
Change-Id: I4c0f65866d60660c632363dba3adc7ea2e344bfc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-27 07:32:53 +00:00
Qt Forward Merge Bot
0dff40adf8 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I6ecf7074eda57ef4954fb3fdc7a6d1e8cd229340
2019-04-26 01:00:13 +02:00
Martin Storsjö
65a33d73ea qmake: Always split QMAKE_DEFAULT_LIBDIRS using ; with clang on windows
When building in a unix style build system (i.e. msys), QMAKE_DIRLIST_SEP
is a colon, not a semicolon. Thus, always split the incoming string
(after the fixup regex) using semicolons on windows.

This matches the code for gcc, further up, which does:

    equals(QMAKE_HOST.os, Windows): \
        paths = $$split(line, ;)
    else: \
        paths = $$split(line, $$QMAKE_DIRLIST_SEP)

Change-Id: I6a0175f9d14ae9ca188553483b7868f0549c784a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-04-25 09:29:23 +00:00