Commit Graph

2137 Commits

Author SHA1 Message Date
Joerg Bornemann
93ac7b9d17 qmake/vcxproj: Fix handling of extra compiler outputs
In commit 68866b1a7b we introduced a bug:
At a point where the first output of an extra compiler is extracted, we
try to evaluate the first output as qmake variable. This is as
nonsensical as it sounds and leads to malformed extra compiler output in
vcxproj files.

Pick-to: 5.15
Task-number: QTBUG-87601
Change-Id: Ib9aaf8a6eed8c69243f364554325c240d0bfc7f4
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-11-02 15:31:01 +01:00
Assam Boudjelthia
75d32a195a Android: fix documentation about ANDROID_EXTRA_LIBS
ANDROID_ABIS should be used instead of ANDROID_TARGET_ARCH.

Fixes: QTBUG-81866
Pick-to: 5.15
Change-Id: I6dc9e0cd2a19bea8864e3ab4174bd609c0aad4dc
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-11-02 15:08:35 +02:00
Paul Wicking
5c352f47b9 Add doc target for qmake
qmake currently doesn't have a doc target in CMake. In qmake builds, the
doc target is in qtbase/ (not in qtbase/qmake). This patch mimics the
mechanic used in QDoc, and adds this as a special case (as the project
file doesn't contain the doc target).

Fixes: QTBUG-87868
Change-Id: Ib1ca249465c5df2f22ba73084c680781e595c30a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-27 12:49:39 +01:00
Joerg Bornemann
f22644c5fa Make "qmake -qtconf my-qt.conf -install ..." possible
Detect the case where the first argument is -qtconf <file> and ignore
that for the -install argument.

Task-number: QTBUG-87801
Change-Id: If6822ee3ebef99de645aee8d110ebdcb13fb2da2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-23 21:11:50 +02:00
Joerg Bornemann
661b586a69 Make "qmake -qtconf my-qt.conf -query" possible
It's now possible to put the -qtconf argument in front of the -query
argument (and others).

Fixes: QTBUG-85136
Change-Id: I74b78f084acf264ef637ed2f6cb63b655b176056
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-23 21:11:46 +02:00
Friedemann Kleint
008343a05e qmake: Fix qHash-related integer conversion warnings
Use size_t instead of uint.

Change-Id: I1dc38f61653f9bfc4ddeddcc65b0271aa4ad1256
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-10-17 11:56:59 +02:00
Alexandru Croitor
1925909c5f qmake: Fix iOS code signing after QSettings behavior change
6d9ec41f6f changed the behavior of
QSettings::NativeFormat for .plist files.

Previously an array of values was flattened into a multi-key QMap.

Now that QMap doesn't support multiple values for the same key,
the array is returned as QVariantList.

Adjust the code to take that into account.

Task-number: QTBUG-87218
Change-Id: I0cbf8ac7ef10b81539a29d1e68a09a40d3fe74ca
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-10-06 18:49:32 +02:00
Assam Boudjelthia
1907599bfd Android: rename Android's package name for Qt 6
Rename Android package name org.qtproject.qt5.android to
org.qtproject.qt.android to avoid inconsistency with Qt 6 name.
Also, we include the major version number in the jar target.

Task-number: QTBUG-86969
Change-Id: Ibb68947289be1079911b34ea157bf089cc52c47f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-03 11:22:35 +03:00
Assam Boudjelthia
ac0be4d568 Android: set default API level to 23 in docs
Android minimum API level for Qt 6 is 23, this reflects that to some
instances that still mention 21.

Change-Id: I996f3ed3af14dca114129351d6ea06afcb8f45f5
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-23 17:59:07 +03:00
Alexandru Croitor
403213240c CMake: Regenerate projects to use new qt_internal_ API
Modify special case locations to use the new API as well.
Clean up some stale .prev files that are not needed anymore.
Clean up some project files that are not used anymore.

Task-number: QTBUG-86815
Change-Id: I9947da921f98686023c6bb053dfcc101851276b5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2020-09-23 16:59:06 +02:00
Alexandru Croitor
a3bd80c08c CMake: Regenerate projects
Clean up the state of the projects,
before changing the internal CMake API function names.

Task-number: QTBUG-86815
Change-Id: I90f1b21b8ae4439a4a293872c3bb728dab44a50d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-09-22 19:08:53 +02:00
Kai Koehne
cccace0c10 qmake: Make use of QHash deterministic
As a build tool, qmake should produce deterministic outputs.

Pick-to: 5.15
Task-number: QTBUG-86675
Change-Id: Ifc855d6ddf025cdad3aa57aee79beabf9c6008e2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-09-19 13:48:45 +02:00
Joerg Bornemann
2cbeacd2cd qmake: Support multiple /MERGE:from=to options in MSVC generator
Any but the last /MERGE:from=to option passed to QMAKE_LFLAGS was
ignored. Now, the first options gets a <MergeSections> tag and all
further options are added as AdditionalOptions, because vcxproj files /
the VS property editor do not support multiple MergeSections entries.

Pick-to: 5.15
Fixes: QTBUG-86062
Change-Id: I65bddf0b8c7ed6c162008d6ad1b58c2aba2d07d9
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-09-18 18:48:58 +00:00
Jarek Kobus
d76c472743 qmake: Compile fix
This code, after applying it to linguist, didn't compile.

Change-Id: I25011a44ca059a149f041f8f07848232883140cc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-09-18 09:01:42 +02:00
Lars Knoll
557623cc4f Rename QLibraryInfo::location() to path()
As per ### Qt6 comment. Also rename the LibraryLocation enum
to LibraryPath.

Change-Id: I556025a19c5bcdf2ff52598eaba32269522d4128
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-12 23:35:56 +02:00
Lars Knoll
c4dbd1cddc Cleanup ProString::append/prepend
Don't use evil hacks that make assumptions
about QString internals.

Change-Id: I663602d197f0fcf62886dbfb9a87547097cdab04
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-09-10 17:36:10 +02:00
Jarek Kobus
8ef41d1713 Use QList instead of QVector in qmake
Task-number: QTBUG-84469
Change-Id: I4a3da94702f1dad1ee10b1ba3c6712b6f40338c9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-09-05 07:07:44 +02:00
Ulf Hermann
53fde3c573 Reimplement QSequentialIterable using QMetaSequence
Change-Id: Ie721a5f0caa697c4bf15a81f3762cf79d3c54f5a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-09-03 08:27:44 +02:00
Ulf Hermann
4fbb2f66d6 Add a QMetaSequence interface
This is in line with QMetaType and will be used to implement a mutable
QSequentialIterable. Later on, a QMetaAssociation will be added as
well, to implement a mutable QAssociativeIterable.

The code here represents the minimal set of functionality needed to have
a practical sequential container. The functionality is not completely
orthogonal. In particular, the index based operations could be
implemented in terms of iterator-based operations.

Task-number: QTBUG-81716
Change-Id: Ibd41eb7db248a774673c701549d9a03cbf2e48b6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-09-01 13:35:39 +02:00
Marcel Krems
7e1432898e Remove MSVC workaround for QPolygon
Change-Id: I62f7c6da7629dcdfda653a136d3bcd483359c86c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-08-29 14:49:15 +02:00
Assam Boudjelthia
00a1e5da7e Android: add option to get app arguments with AndroidManifest.xml
AndroidManifest.xml file and the Android plugin already has a way
to provide commandline-arguments to app with the tag
"android.app.arguments". This change allow to set it from qmake/cmake
and allow Qt Creator to use that.

Task-number: QTCREATORBUG-23712
Change-Id: I3e680f40fd36ba6aaac7f344fb9509d2c3360e74
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2020-08-28 10:23:18 +03:00
Topi Reinio
1ff82d1eba Doc: Improve documentation of ANDROID_EXTRA_PLUGINS qmake variable
Clarify that the variable must point to a directory with a specific
structure, and how the name mangling is applied to the deployed
plugins.

Pick-to: 5.15
Fixes: QTBUG-60022
Change-Id: I949cd73f65f86d4902eeab41fa7e5c6e6ffe44c3
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-08-25 07:25:24 +00:00
Lars Knoll
ed8acbeb7c Automatically register data/debug stream operations in QMetaType
And remove the old manual registration code for those operators.

Add some special handling for long/ulong, as these types could be
streamed as a QVariant so far, but are not directly streamable
through QDataStream.

[ChangeLog][QtCore][QMetaType] The QMetaType::registerStreamOperators()
and QMetaType::registerDebugStreamOperator() methods have been
removed. The streaming operators for a type are now automatically
registered together with the type registration.  This implies that the
operators should be visible wherever the type is visible and being used.

[ChangeLog][Behavior Incompatible Changes] Because the QDataStream and
QDebug serialization operators are automatically registered with
QMetaType, the declarations of those functions must be present at any
point where the type is used with QMetaType and QVariant.

Change-Id: I4a0732651b20319af4a8397ff90b848ca4580d99
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-08-24 00:17:03 +02:00
Paul Wicking
0a12416172 Doc: Drop dependency on qtgraphicaleffects
qtgraphicaleffects is not part of 6.0, drop the doc dependency.

Change-Id: I64a355860e0a3a92fa0ffe5ed960796f2e756d61
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-08-20 06:31:44 +02:00
Kai Koehne
1022944a35 Document qmake variable ANDROID_TARGET_ARCH
ANDROID_ABI is only available in CMake. In qmake, the variable is called
ANDROID_TARGET_ARCH.

Fixes: QTBUG-85542
Change-Id: I0f3f7320b08a4fe6448dd40c294254c644cfb3ee
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-08-19 12:46:09 +02:00
Lars Knoll
f741a12de1 Disentangle QIODevice dependencies
Move the QIODevice::OpenMode enum into a base class, so that
we can remove the full QIODevice (and thus QObject) dependency
from qdatastream.h and qtextstream.h.

This is required so that we can include QDataStream in qmetatype.h
without getting circular dependencies.

As a nice side effect, QDataStream and QTextStream can now inherit
QIODeviceBase and provide the OpenMode enum directly in their
class scope.

Change-Id: Ifa68b7b1d8d95687ed032f6c9206f92e63bfacdf
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2020-08-15 20:55:31 +02:00
Giuseppe D'Angelo
14090760a8 Long Live QMap as a refcounted std::map!
... and QMultiMap as std::multimap.

Just use the implementation from the STL; we can't really claim that
our code is much better than STL's, or does things any differently
(de facto they're both red-black trees).

Decouple QMultiMap from QMap, by making it NOT inherit from
QMap any longer. This completes the deprecation started in 5.15:
QMap now does not store duplicated keys any more.

Something to establish is where to put the
QExplictlySharedDataPointer replcement that is in there as an
ad-hoc solution. There's a number of patches in-flight by Marc
that try to introduce the same (or very similar) functionality.

Miscellanea changes to the Q(Multi)Map code itself:

* consistently use size_type instead of int;
* pass iterators by value;
* drop QT_STRICT_ITERATORS;
* iterators implictly convert to const_iterators, and APIs
  take const_iterators;
* iterators are just bidirectional and not random access;
* added noexcept where it makes sense;
* "inline" dropped (churn);
* qMapLessThanKey dropped (undocumented, 0 hits in Qt, 1 hit in KDE);
* operator== on Q(Multi)Map requires operator== on the key type
  (we're checking for equality, not equivalence!).

Very few breakages occur in qtbase.

[ChangeLog][Potentially Source-Incompatible Changes] QMap does not
support multiple equivalent keys any more. Any related functionality
has been removed from QMap, following the deprecation that happened
in Qt 5.15. Use QMultiMap for this use case.

[ChangeLog][Potentially Source-Incompatible Changes] QMap and
QMultiMap iterators random-access API have been removed. Note that
the iterators have always been just bidirectional; moving
an iterator by N positions can still be achieved using std::next
or std::advance, at the same cost as before (O(N)).

[ChangeLog][Potentially Source-Incompatible Changes] QMultiMap does
not inherit from QMap any more. Amongst other things, this means
that iterators on a QMultiMap now belong to the QMultiMap class
(and not to the QMap class); new Java iterators have been added.

Change-Id: I5a0fe9b020f92c21b37065a1defff783b5d2b7a9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-08-06 19:15:39 +02:00
Andy Shaw
64491c9b72 iOS: Add a variable to customize where the launch image is taken from
For those who are providing their own launch images for their iOS
projects then QMAKE_IOS_LAUNCH_SCREEN can be set to point to the
location where the launch image to be used over the default.

[ChangeLog][Platform Specific Changes][iOS] Added support for
specifying a launch image to be used for an iOS project. This can be
achieved by using QMAKE_IOS_LAUNCH_SCREEN.

Change-Id: Ibb236655b282132ab5eee747986a93abb9802200
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-07-22 00:42:36 +02:00
Sona Kurazyan
361dc074f2 Move QRegExp and its remaining mentions out of QtCore
Task-number: QTBUG-85235
Change-Id: Ibd6c98d952c1bb9916b64715c6430fb0d3fe3843
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-07-13 10:53:23 +02:00
Friedemann Kleint
f4e4ad6d2b Silence some warnings about fallthrough
src/corelib/text/qunicodetools.cpp:1243:13: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/corelib/text/qunicodetools.cpp:1247:55: warning: this statement may fall through [-Wimplicit-fallthrough=]

Change-Id: I441000db46cb6d85a5dcd0534ea2168b39a3f3bd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-07-09 08:32:23 +02:00
Lars Schmertmann
6ce2f3f26b Add ; to Q_UNUSED
This is required to remove the ; from the macro with Qt 6.

Task-number: QTBUG-82978
Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-07-07 11:51:48 +02:00
Lars Knoll
df853fed66 Use qsizetype in QList
The change creates a slight source incompatibility. The main
things to take care of are

* code using printf statements on list.size(). Using qsizetype in
printf statements will always require a cast to work on both 32
and 64 bit.
* A few places where overloads now get ambiguous. One example is
QRandomGenerator::bounded() that has overloads for int, uint and
double, but not int64.
* Streaming list.size() to a QDataStream will change the format
depending on the architecture.

[ChangeLog][QtCore][QList] QList now uses qsizetype to index into
elements.

Change-Id: Iaff562a4d072b97f458417b670f95971bd47cbc6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-07-06 21:31:14 +02:00
Lars Knoll
76004502ba Get rid of shared null for QByteArray, QString and QVector
As a side effect, data() can now return a nullptr. This
has the potential to cause crashes in existig code. To work
around this, return an empty string from QString::data()
and QByteArray::data() for now.

For Qt 6 (and once all our internal issues are fixed), data()
will by default return a nullptr for a null QString, but we'll
offer a #define to enable backwards compatible behavior.

Change-Id: I4f66d97ff1dce3eb99a239f1eab9106fa9b1741a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-07-06 21:29:58 +02:00
Orgad Shaneh
4c20a35cd9 MinGW: Use a response file for long include paths
Change-Id: I55ce73ad08473bca27c7ab5730f633fb77c9b8cd
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-06 13:41:37 +00:00
Orgad Shaneh
cd75446c1e Makefile: Deduplicate logic for response file name
+ verify that the file was actually written.

Change-Id: I14a3c0b75f41f926b469109a1d7f2f80368ec9bb
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-06 13:40:45 +00:00
Giuseppe D'Angelo
75deec3462 QMake: fixup a mistake when porting to QRE
The original expression seems to have been accidentally
changed during the port.

Amends a1947aeffe.

Change-Id: I87821e1e025621a5efaf7a1e4f946fd3109fb256
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-06 13:35:29 +02:00
Tor Arne Vestbø
be1bb19295 Remove unused variables in MSVC generator after WinRT removal
Change-Id: I2b7e1dbecc17d61c9126145bea95947dab38e7d1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-06-29 12:26:26 +02:00
Karsten Heimrich
18ec53156e Move QTextCodec support out of QtCore
* Assume UTF-8 on all Unix like systems
* Export some functions to be able to compile QTextCodec once
  moved to Qt5Compat.

Task-number: QTBUG-75665
Change-Id: I52ec47a848bc0ba72e9c7689668b1bcc5d736c29
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-20 02:04:38 +02:00
Alexandru Croitor
976fa5134a CMake: Use intelcet flags for bootstrap and qmake
This should fix build failures on Ubuntu 20.04.

Amends fa98adbd04

Change-Id: Iff399faff0cf06f5b88d756b1f632b8798069578
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-06-18 11:51:41 +02:00
Oliver Wolff
2f2340c97e qmake: Fix generation of Visual Studio projects
While removing winrt code too much code was removed. The
ProjectConfiguration is needed for every Visual Studio project.

This patch amends 45b0f1be68

Fixes: QTBUG-85086
Change-Id: Ic8b42583a159d5b69c0c4e82f46dd98ad8e54ce2
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-06-17 19:14:52 +02:00
Alexandru Croitor
a08bf7f00a CMake: Fix usage of gc_binaries feature
The qt_internal_apply_gc_binaries function should apply both compile
and link flags, not just link flags.

The flags should be applied publically to all consumers of Bootstrap
regardless if the gc_binaries feature is enabled.

The flags should be applied publically to Core only in case if the
feature is enabled (aka for static builds only).

Change-Id: Id42af0d9b527004d74c04eff2c9e3c2be1e76aac
Fixes: QTBUG-84461
Task-number: QTBUG-83929
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-12 22:34:12 +02:00
Oliver Wolff
45b0f1be68 Remove winrt
Macros and the await helper function from qfunctions_winrt(_p).h are
needed in other Qt modules which use UWP APIs on desktop windows.

Task-number: QTBUG-84434
Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-06-06 20:25:49 +02:00
Dmitry Shachnev
f133b226cd qmake: Stop using -isystem flag
This option changes the order of include paths, which can cause problems
of various kinds. See https://bugs.debian.org/958479 for an example.

The benefit of that option is minimal for what it was intended.

Pick-to: 5.15 5.12
Change-Id: I80eeabd09764df290b60bc59aeb2f90d07723608
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-06-06 09:53:59 +00:00
Lars Knoll
c49728eb27 Port qmake from QStringRef to QStringView
Change-Id: Ie07a976cd3c634e04c8b9b1e0a6cacd4c2d94939
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-06-05 09:07:14 +02:00
Leander Beernaert
5a779a4ad3 CMake: Make it possible to build tools when cross-compiling
This patch allows tools to be built for the target platform when the
QT_BUILD_TOOLS_WHEN_CROSSCOMPILING parameter is set at configuration
time.

To avoid naming conflicts, the target tools are suffixed with "_native".
The qt_get_tool_target_name() function can be used to get the tool name
for both scenarios (cross and non-cross compilation).

Extend pro2cmake to refer to the right target name for tools.
The relevant write_XXX functions have a new target_ref parameter that
will be "${target_name}" for tools and literally the target name for
everything else.

Fixes: QTBUG-81901
Change-Id: If4efbc1fae07a4a3a044dd09c9c06be6d517825e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-06-02 22:42:15 +02:00
Joerg Bornemann
d4ff606941 Mark qmake as Qt tool in qmake/qmake.pro
...and re-regenerate qmake/CMakeLists.txt.
This removes one special case and is necessary for a subsequent patch
that changes how pro2cmake converts Qt tools.

Change-Id: Ie87b7841f3c29de3f2c8907e82975b6272f096cc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-29 20:45:09 +02:00
Joerg Bornemann
45fb75a17a CMake: Re-generate qmake/CMakeLists.txt
Change-Id: Ifb1fadbd0f2ea13068085e7e47d0b883efff7380
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-29 20:44:56 +02:00
Joerg Bornemann
1c31f0f554 Fix qmake.pro
The registry.cpp file is in the library subdirectory.

This doesn't contribute to the qmake or CMake build, but it removes the
need for a special case in qmake/CMakeLists.txt.

Change-Id: I66a566f0d1e0b82791822ca55a7de037369536a7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-29 20:44:51 +02:00
Kai Koehne
1381b59222 Remove last remainings of Qt Quick 1 imports
amends  e1fd607493

Change-Id: I4587ae287635bc9718325a24bee728f1c1938978
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-25 11:48:12 +02:00
Lars Knoll
97d22d7171 Remove qxmlstream from qmake compile
It's not used at all.

Change-Id: Ia30befd497cc337221dfad89c201822b5bb7fd7c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-25 10:28:35 +02:00
Lars Knoll
b4fd377aa9 Make utf8_source the default for qmake builds
We now assume that source code is encoded in UTF-8 by default on
all platforms (and verify this with an auto test). Provide
a CONFIG+=no_utf8_source option for backwards compatibility.

[ChangeLog][qmake] qmake will tell the compiler that source code is
encoded in utf-8 by default. This mainly has an effect on Windows, where
MSVC still assumes source code is encoded in the current ANSI code page.
Use CONFIG+=no_utf8_source to get back the Qt 5 behavior.

Change-Id: I6dcafcaeefdea7d3907ccb723aeb7d23ccc0f04f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-14 19:14:51 +02:00
Lars Knoll
ea0a08c898 Move the UTF conversion methods to qstringconverter
Separate them from the qutfcodec, so that the codec
can later on be moved out of Qt Core.

Fix the QUtf methods to take qsizetype instead of int
for length arguments.

This also makes it possible to not build QTextCodec into
the bootstrap lib anymore.

Change-Id: I0b4f83139d61b19c651520a2f3a5012aa7e85cb8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-14 07:46:38 +02:00
Assam Boudjelthia
4ff5c8b954 Android: add ANDROID_ABIS qmake snippet
Add snippet on how to use ANDROID_ABIS inside the .pro file.

Pick-to: 5.15
Task-number: QTCREATORBUG-24014
Change-Id: Id3bb960c04ea6480b06878121ad33f89c03e5642
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-05-13 08:35:41 +00:00
Lars Knoll
2134740e59 Disable the PCRE Jit when compiling qmake
I'm getting compile errors with gcc 9.3 without this, and it
makes sense to disable the JIT in bootstrapped builds anyway.

Change-Id: Ife867bd2d6fd0bf133edae4903bb6b6d295db547
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-12 13:43:12 +02:00
Marc Mutz
1a8916cc4f qmake: fix a few deprecated QChar(non-char-type) warnings
The QChar ctors from non-char-types are going to be deprecated.

Change-Id: I17d7916fb1dac9889ead61daca846b1257d17312
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-12 07:43:48 +02:00
Yuhang Zhao
2844631aa9 qmake: Remove the DISCARDABLE flag for icon resources
According to [1] the DISCARDABLE attribute is for 16-bit Windows,
and it is ignored. We can drop it.

[1] https://docs.microsoft.com/en-us/windows/win32/menurc/common-resource-attributes

Change-Id: I70e5b0441a9d20f6c76c3d7a84947f8bce5c8fbd
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-11 23:36:27 +00:00
Yuhang Zhao
fc1e5d9877 qmake: Update the macro names
I generated a rc file using VS2019 and I found that it's
using other macros.

According to [1], both of VOS_NT_WINDOWS32 and VOS__WINDOWS32 refers to
"File was designed for 32-bit Windows", although they have different
values, and 0x0L is the value of VFT2_UNKNOWN. So I think it's safe to
update them. VS2019 is using them as the default template for rc files,
after all.

[1] https://docs.microsoft.com/en-us/windows/win32/menurc/versioninfo-resource

Change-Id: Ibaf91394668844492f1357da05b881b9d81aa15f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-12 07:35:32 +08:00
Yuhang Zhao
ef8640596c qmake: Fix handling of manifest file of msvc
Setting the QMAKE_MANIFEST variable doesn't have
any effect for MSVC. This commit fixes that.

If the developer is setting this variable,
he/she will definitely use CONFIG-=embed_manifest_exe
or CONFIG-=embed_manifest_dll at the same time,
so I think there is no need to check this.

Change-Id: Ie32b7e0cded71efcf14bf4c0eecab5ab1944fa2c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-11 21:23:18 +08:00
Lars Knoll
adf829e65d Add a QRegularExpression::fromWildcard() convenience method
Simplify constructing QRegularExpression objects from a glob
pattern.

Change-Id: I06f60b1dfea3da969e2474dedd44b6ca5d456d7d
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-06 09:57:40 +02:00
Lars Knoll
56a7984a90 Remove QRegExp from the bootstrap library
All it's uses have been replaces with QRegularExpression.

Change-Id: I5bcdfdd8a39dad6d1288f18f1b24d2eea9e028d2
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
2020-05-06 09:57:31 +02:00
Lars Knoll
a1947aeffe Port qmake over to user QRegularExpression
Use the DotMatchesEverythingOption for all places
where we interpret .pro files, to increase compatibility
with QRegExp.

Change-Id: I347d6b17858069f3c9cedcedd04df58358d83f27
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-05 18:41:27 +02:00
Lars Knoll
412dd857b8 Compile QRegularExpression into qmake
This is required to be able to port qmake over to use
QRegularExpression instead of QRegExp.

Change-Id: I0ad2c19bf3c0a28e52c1e12b4d3daa0300a75ed2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-05 18:41:20 +02:00
Lars Knoll
52f3a7d9d4 Build qmake with QT_USE_STRINGBUILDER
Should improve performance and is going to be required in
the future anyway.

Change-Id: I89d7c50441d2491da1ab0a4d564dcc91f52ade85
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2020-05-05 18:41:10 +02:00
Yuhang Zhao
317383217b Add more entries for QMAKE_TARGET_XXX
Change-Id: I1cf4a8f19ec47247fbe469b9cc81ed80f6ba5a82
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-05 08:24:22 +08:00
Qt Forward Merge Bot
0f7987f0c9 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/text/qlocale.cpp
	src/network/access/qnetworkaccessmanager.cpp

Regenerated tests/auto/testlib/selftests/float/CMakeLists.txt

Change-Id: I5a8ae42511380ca49a38b13c6fa8a3c5df8bed01
2020-05-04 17:38:40 +02:00
Alexandru Croitor
c85b393023 CMake: Fix developer build of MinGW cmake configuration
qmake is not warnings clean, so don't add -Werror.

Change-Id: I7a823241ded56967c1b802203f404ee36ed26429
Reviewed-by: Simon Hausmann <hausmann@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-01 19:11:33 +02:00
Lars Knoll
42d2d70abe Remove textcodec codepaths in qmake
They were anyway unused since years

Change-Id: I559b5042f6b942d7a940ac374d2b2740f2d4dc12
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-05-01 18:50:02 +02:00
Andy Shaw
85c09f3c51 Use QMAKE_TARGET for the name of the object script file
Since TARGET at this point contains the path to where the target will
be then it can include ".." as part of it which will cause problems when
building for Android on Windows. Therefore, QMAKE_TARGET should be used
as an identifier here as the path is not needed.

Change-Id: Idb8babd0459c65cbcfd64fe47baeac4303a3fd87
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-04-28 06:32:59 +00:00
Qt Forward Merge Bot
efd7757154 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/widgets/widgets/qabstractbutton.cpp
	src/widgets/widgets/qbuttongroup.cpp
	src/widgets/widgets/qbuttongroup.h
	src/widgets/widgets/qsplashscreen.cpp
	tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp
        tests/benchmarks/opengl/main.cpp

  Needed update:
	src/plugins/platforms/cocoa/CMakeLists.txt

Change-Id: I7be4baebb63844ec2b3e0de859ca9de1bc730bb5
2020-04-22 15:28:01 +02:00
Assam Boudjelthia
cc106ce565 Android: update Android specific variables docs
Android variable are missing from the list of QMake variables...

Task-number: QTBUG-80390
Change-Id: Ic10f96687334eea99c0302d7137685b1bf6e56c6
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-04-17 17:27:36 +03:00
Lars Knoll
c6cdf38e75 Change qHash() to work with size_t instead of uint
This is required, so that QHash and QSet can hold more
than 2^32 items on 64 bit platforms.

The actual hashing functions for strings are still 32bit, this will
be changed in a follow-up commit.

Change-Id: I4372125252486075ff3a0b45ecfa818359fe103b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-04-09 20:03:25 +02:00
Qt Forward Merge Bot
8823bb8d30 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	examples/opengl/doc/src/cube.qdoc
	src/corelib/global/qlibraryinfo.cpp
	src/corelib/text/qbytearray_p.h
	src/corelib/text/qlocale_data_p.h
	src/corelib/time/qhijricalendar_data_p.h
	src/corelib/time/qjalalicalendar_data_p.h
	src/corelib/time/qromancalendar_data_p.h
	src/network/ssl/qsslcertificate.h
	src/widgets/doc/src/graphicsview.qdoc
	src/widgets/widgets/qcombobox.cpp
	src/widgets/widgets/qcombobox.h
	tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp
	tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
	tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
	tests/manual/diaglib/debugproxystyle.cpp
	tests/manual/diaglib/qwidgetdump.cpp
	tests/manual/diaglib/qwindowdump.cpp
	tests/manual/diaglib/textdump.cpp
	util/locale_database/cldr2qlocalexml.py
	util/locale_database/qlocalexml.py
	util/locale_database/qlocalexml2cpp.py

Resolution of util/locale_database/ are based on:
https://codereview.qt-project.org/c/qt/qtbase/+/294250
and src/corelib/{text,time}/*_data_p.h were then regenerated by
running those scripts.

Updated CMakeLists.txt in each of
	tests/auto/corelib/serialization/qcborstreamreader/
	tests/auto/corelib/serialization/qcborvalue/
	tests/auto/gui/kernel/
and generated new ones in each of
	tests/auto/gui/kernel/qaddpostroutine/
	tests/auto/gui/kernel/qhighdpiscaling/
	tests/libfuzzer/corelib/text/qregularexpression/optimize/
	tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/
	tests/libfuzzer/gui/text/qtextdocument/sethtml/
	tests/libfuzzer/gui/text/qtextdocument/setmarkdown/
	tests/libfuzzer/gui/text/qtextlayout/beginlayout/
by running util/cmake/pro2cmake.py on their changed .pro files.

Changed target name in
	tests/auto/gui/kernel/qaction/qaction.pro
	tests/auto/gui/kernel/qaction/qactiongroup.pro
	tests/auto/gui/kernel/qshortcut/qshortcut.pro
to ensure unique target names for CMake

Changed tst_QComboBox::currentIndex to not test the
currentIndexChanged(QString), as that one does not exist in Qt 6
anymore.

Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
2020-04-08 20:11:39 +02:00
Ulf Hermann
fc49325c80 qmake: Document QML_FOREIGN_METATYPES
Task-number: QTBUG-82709
Change-Id: I0ca648114adbbed1ab3c6406e9f14f60f7924e96
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-03-26 13:51:44 +01:00
Simon Hausmann
bc64ccbf00 Re-generate various CMake projects and configure after merge
Change-Id: I02f5926c6664aab518c5c81e0c33dca0818a1871
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-16 20:43:56 +01:00
Simon Hausmann
c2f167b412 Merge "Merge remote-tracking branch 'origin/5.15' into dev" 2020-03-16 20:43:50 +01:00
Simon Hausmann
ff922e7b87 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/kernel/qmetatype.cpp

Change-Id: I88eb0d3e9c9a38abf7241a51e370c655ae74e38a
2020-03-16 18:41:27 +01:00
Tor Arne Vestbø
77885f8402 cmake: Remove APPLE prefix from platform names
None of the other platforms have it.

Change-Id: Ib448c2c03ba03f711b507ef391977c0e6aa7c192
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-16 17:57:56 +01:00
Tor Arne Vestbø
db745fdd2d cmake: Fix naming when referring to Apple macOS
Change-Id: Iafb5e448d0d65d42f788464fc600594a5666f9af
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-16 17:57:52 +01:00
Topi Reinio
26ed956cbc Doc: Remove \contentspage commands
The command is deprecated and has no effect apart from generating
a documentation warning.

Change-Id: I30871bfd6975f8268930cce99993a8579242fdb8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-03-15 10:48:58 +01:00
Tor Arne Vestbø
5f940253bf macOS: Merge qcore_mac cpp and mm files
Files ending with .mm are Objective-C++ files, so we don't need
a separate file for the C++ parts.

Change-Id: I3ef52bc98291fd461b889978a538e81630d17c6e
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-03-12 06:07:35 +01:00
Qt Forward Merge Bot
865afac250 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ibee5acec72a1a1769d4bc5f23f56c7dc8d4cf3cb
2020-03-11 15:34:21 +01:00
Ulf Hermann
37a66236d2 qmake: Document qmltypes and metatypes
Task-number: QTBUG-81615
Fixes: QTBUG-82305
Change-Id: I0a411ff2ebc2dbf5462fa110b1eb70a1876b6ae5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-03-09 09:25:06 +01:00
Qt Forward Merge Bot
63312fe2ec Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: If36d96c0fef3de5ab6503977501c55c62a2ecc97
2020-03-03 14:13:02 +01:00
Edward Welbourne
26b1cf2bba QMake: Use Qt::SplitBehavior in preference to QString::SplitBehavior
The Qt version was added in 5.14 "for use as eventual replacement for
QString::SplitBehavior." Move another step closer to that goal.

Change-Id: I3f1b836cfb47bba0fdc27f2c3aa7b0576d123dca
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-02-28 15:37:11 +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
Alexandru Croitor
eaa29378b9 CMake: Fix c++ standard config tests with MSVC
Need to pass additional -Zc:__cplusplus flag when using
MSVC, so that the __cplusplus define has correct values.

Additionally make the option be propagated to consumers of Qt
via the public Platform target, which QtCore links against.

Change-Id: Ie1283c25334b93f993529beb7fb32bdb001627f5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
2020-02-18 14:44:57 +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
Kai Koehne
81bd1bba7b Windows: Add install/uninstall rules for target.targets
Mirror the behavior in unixmake.cpp and do actually install
/uninstall files in target.targets. This fixes the installation of
.debug files on MinGW for a Qt with -force-debug-info
-separate-debug-info.

[ChangeLog][qmake] Install/uninstall rules are now generated for
target.targets on Windows. This mirrors the behavior on Unix.

Fixes: QTBUG-81354
Change-Id: Ie9366f132ebd8e18680f32f2e52cec64dbd87e9a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-02-14 15:03:10 +00: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
Andy Shaw
2310d9dc65 qmake: Allow the use of a response file when building a library
Change b274f656b8 enabled the use of a
response file for application building specifically needed when building
an application for Android on Windows. The same cause can happen when
building a library too with a lot of object files, so the command for
the link step can be too long. So we expand the functionality to be
used for libraries too.

Task-number: QTBUG-71940
Change-Id: Ia6d1943bf33f6decb53f6e71a8dc65310d2f20a1
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-02-13 15:46:05 +01:00
Yuhang Zhao
97bb1ddc08 Doc: Document some missing CONFIG values
Task-number: QTBUG-81035
Change-Id: I1976e700aa9cfcc32ad8cb1d4fae5b2d7497c429
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-02-13 11:34:01 +08: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
Joerg Bornemann
5b59b2ea15 Doc: Document the ltcg CONFIG value
Fixes: QTBUG-81035
Change-Id: I41bff3aef3ac0ce7c117ab2245491dceb6f2685b
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-02-10 15:09:20 +01: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
Alexandru Croitor
1c571e5fe7 Merge "Merge remote-tracking branch 'origin/wip/cmake' into dev" 2020-02-07 18:19:51 +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
Lars Knoll
10afe69c16 Use a QMap instead of a QHash for the ProValueMap
qmake relies heavily on stable references to nodes stored within the
container. QHash in Qt6 doesn't offer that guarantee, so use a QMap
instead, that supports this.

Change-Id: Ifcf3d67098585ea26f4e02f4570d407a56e33c9c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-02-03 17:43:30 +01:00
Joerg Bornemann
1f8ced2d6d Fix line ending in custom build steps of vcxproj files
We must use Windows line endings in .vcxproj files to separate command
lines of custom build steps.

This amends commit f65cfadd.

Fixes: QTBUG-81553
Change-Id: I8d257f3846af7006df7f8d462b8f44efdce6a1fd
Reviewed-by: Miguel Costa <miguel.costa@qt.io>
2020-01-30 11:56:09 +00:00
Alexandru Croitor
a1dbdcbd6e Merge remote-tracking branch 'origin/dev' into wip/cmake
Conflicts:
        src/corelib/Qt5CoreConfigExtras.cmake.in
        src/corelib/Qt5CoreMacros.cmake
        src/dbus/Qt5DBusConfigExtras.cmake.in
        src/widgets/Qt5WidgetsConfigExtras.cmake.in

Change-Id: Ib782f3b177c38b2cce83beebe15be9c0baa578f7
2020-01-29 16:57:27 +01: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
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
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
Leander Beernaert
48c82e90af Post Merge Fixes
Change-Id: I1e06c01b76b119c3f23b6e6ecbaae8df719b70ce
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-24 12:29:18 +00:00
Joerg Bornemann
41b919919e Purge the dep_cd_cmd parameter from callExtraCompilerDependCommand
We always pass the same value. The builtins are also using exactly this
"cd command" unconditionally.

This deduplicates the code at the call sites of
callExtraCompilerDependCommand a bit.

Change-Id: I5c412c815d50afdac55e1b45021f37f2545ce8f0
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-01-24 13:25:06 +01:00
Joerg Bornemann
16885a6033 De-duplicate the last occurrence of calling a depend_command
Use the central callExtraCompilerDependCommand in the last place where
the code to call an extra compiler's depend_command was duplicated.

Note that this is in the "Bad hack" section. We're making this hack less
bad, but the comment still applies.

Change-Id: Iaa857af20ca46b2d73053d3e264c63124c87a41b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-01-24 13:24:59 +01:00
Leander Beernaert
502d3d6744 Merge remote-tracking branch 'origin/dev' into merge-dev
Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
2020-01-24 13:17:33 +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
Qt Forward Merge Bot
35a461d026 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I68702c9f9680772d332b5bb777ddd2663168abd5
2020-01-19 01:00:10 +01:00
Qt Forward Merge Bot
3e9f8b5249 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I12148e7b20bcdb72d9b328035d528c99633b1e92
2020-01-18 01:00:08 +01:00
Nico Vertriest
28f95d4688 Doc: Fix qdoc compilation errors qtbase
Task-number: QTBUG-79824
Change-Id: I5a39525e3e735415ba96e2d585c5de754deb15de
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2020-01-17 12:56:08 +00: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
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
Joerg Bornemann
6d545dedad Fix mkdir warning for object_parallel_to_source projects
Source files that are right next to the project file result in an
empty "object subdirectory" if object_parallel_to_source is set.
We must not attempt to create empty directories.

Fixes: QTBUG-81271
Change-Id: I431f9fbe46f50fbbaa5d6a59966bfb059418036c
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-01-14 07:58:03 +01:00
Samuel Gaist
44fd33e05c doc: improve SUBDIRS documentation for dependency handling
The use of the 'ordered' CONFIG option is known to not be efficient for
multi-core builds. This patch updates the documentation with an example
using the .depends modifier as well a discourage the use of 'ordered'.

Change-Id: I3575243a7c4138f0671d171441c932c3ad89a411
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2020-01-14 06:55:48 +01: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
Qt Forward Merge Bot
0dc5562fa4 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I784e23d7913294225686879c9bd77dafe3580bac
2020-01-10 01:01:15 +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
Joerg Bornemann
8bfdb25c1f Doc: Extend the documentation about qmake scopes
Fixes: QTBUG-18025
Change-Id: I2b587266cde2002d965dc824a869be255cf3522e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-01-09 11:27:10 +01: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
Qt Forward Merge Bot
9bb9de461f Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I9b4816b4aa6f0c51a446742db58b9d0dcf69aa09
2020-01-09 01:00:08 +01:00
Jean-Michaël Celerier
ea81b69cde Implement qtbase fixes for superbuilds
Change-Id: I0d3445cf0740e3925fa9342dac4d07892518afe5
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-01-08 10:42:21 +00:00
Joerg Bornemann
9d7ed92f6e Fix dependency resolution for extra compilers in VS projects
De-duplicate the code that calls the extra compiler's depend_command by
using the central function callExtraCompilerDependCommand. This one
actually tries to resolve dependencies unlike the removed code that
blindly resolved relative paths to the build directory.

This fixes dependencies reported by uic which need to be resolved
against what is in DEPENDPATH.

Fixes: QTBUG-80579
Change-Id: If482e50ff3eff716fefffee82004acc076b3a547
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-01-07 07:16:59 +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
7c65527a02 qmake: Document QML_IMPORT_PATH
qmake itself does not use the variable, but Qt Creator does.

Fixes: QTBUG-77866
Change-Id: I313d1ebe32dbc1eeac8d2d79b519349c7097a5a6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-01-06 13:10:57 +01:00
Joerg Bornemann
4b2de41b13 CMake: Add support for framework builds
Framework builds are enabled by default on macOS.
They are controlled via the framework feature.

Task-number: QTBUG-75751
Change-Id: I00bc64672f02bbd1672508b2b5010d202984a961
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CMake Build Bot
2020-01-06 11:53:53 +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
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
6c2052f9d7 Doc: Fix name of no_check_exist flag
There is only one 's' in there.

Change-Id: I02288c138784086e535c339660b02bf9c33f8fda
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-12-23 10:33:36 +01:00
Joerg Bornemann
542d14bd02 Fix "Broken filename passed to function" message for qmake -tp vc
Since commit 9ab043b6 we're checking for invalid file paths passed to
Qt's file system engine. When initializing the deployment tool for VS
projects we accidentally passed a file path containing '\0'. Fix that by
using an infix QString, not QChar.

Change-Id: Ieae066d20ac290354febd420abce68f28649b365
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-12-16 13:28:37 +01:00
Liang Qi
1d00f52fd3 Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2019-12-16 12:58:50 +01:00
Allan Sandfeld Jensen
deeaa500ad Mark the old style unprefixed stream functions deprecated
Requires a third definition for the source-compatible but deprecated
version.

Change-Id: I260ae79f4547f99eed701b10e0b25222f81cd5ff
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-12-16 11:23:47 +01: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
Tor Arne Vestbø
f733c1c6e7 Xcode: Use output directory as SYMROOT when shadow-building
Setting the CONFIGURATION_BUILD_DIR variable to tell Xcode where to
place the final application bundle confuses Xcode when archiving
a project, and the archive ends up without the dSYM files.

Unfortunately we can't leave it up to Xcode to place the build
artifacts wherever it wants, as Qt Creator's iOS support expects
to find the artifacts in a well-defined place. Until we've taught
Qt Creator to find the artifacts for deployment where Xcode placed
them we need to keep this logic.

We now avoid setting the CONFIGURATION_BUILD_DIR variable unless we
really need to due to in-source builds. As long as we're dealing with
a shadow-build it's okey to set SYMROOT.

Change-Id: I9661c1c57725dc8ba5a21f8467b8b61834f2e64d
Fixes: QTBUG-74841
Task-number: QTBUG-52474
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-12-12 14:56:31 +01:00
Ulf Hermann
23d2312506 Split cborstream feature in two
Reading of Cbor streams is substantially more complicated than writing
as it requires float16 support. When writing Cbor, we can just choose to
always write 32bit floats, even if we could compress the numbers into
16 bits.

We need Cbor writing in the bootstrap library, but we cannot easily add
float16 support.

Furthermore, Cbor reading is required for plugin support, but not Cbor
writing. It might make sense for some users to build a custom Qt with
Cbor writing disabled.

Therefore, provide two features, cborstreamreader and cborstreamwriter,
split up the code in cborstream.{h|cpp} into several files, and enable
Cbor writing in the bootstrap library.

Change-Id: I15450afb0e328a84a22ebca9379cffc4f900a75a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-12-12 10:42:27 +01:00
Nico Vertriest
5a660353ed Doc: Fix qdoc compilation errors qtbase
Task-number: QTBUG-79824
Change-Id: I6557de598de1931fc30556951d35783d02b83abe
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-12-12 07:14:50 +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
Joerg Bornemann
ee1f3b55b6 Remove superfluous qt_internal_add_target_aliases call
This smells like copy & paste from the boostrap lib.

Change-Id: Ibb0c392df610f02fc3bdcfc72a2d0c925e27a89e
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-12-11 11:21:05 +00: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
Alessandro Portale
83df5c71e6 Fix qmake's sed functionality for input containing CR+LF newlines
QTextStream, reading a file with CR+LF newlines from an stdio FILE
handle that was opened without "b", will always return false in atEnd().

Changing the open mode from "r" to "rb" works around the issue.

Task-number: QTBUG-80443
Change-Id: Ib2eafc0c4c6a6d2bcaeea3036474549d2d9e1511
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-12-05 13:34:18 +01:00
Leander Beernaert
1c655fb0fc Post merge fixes
Change-Id: I78d3c9687f99c0a32da04257e297e88ef0b02581
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-11-25 14:53:27 +00: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
Qt Forward Merge Bot
1315133233 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ic4ffd206bdd3ed68fd3d21a93818923e8d3a1e7a
2019-11-20 01:00:51 +01:00
Leander Beernaert
26e8769124 Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: Ifecc2d9db396d783124df8567553ba5f846f30bb
2019-11-19 13:53:21 +01:00
Yuhang Zhao
9567103f38 qmake: Remove /O3 from win32-icc
Use O3 causes warnings when combined with O2, so just remove it.

Partially revert commit 11111c5a7d

Change-Id: Ifbf6e024e35933ecc3610d6efc3423589dab9a38
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-11-19 13:48:09 +08:00
Qt Forward Merge Bot
587f1cbc5d Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I4e5c8a1fcef443c3383e207102f21d41000ff322
2019-11-19 01:00:12 +01:00
Joerg Bornemann
52c8e9dc99 Fix precompiled headers on macOS
Since commit 059172c6 precompiled headers did not work anymore on
macOS, because the ${QMAKE_PCH_ARCH} string was suddenly appearing in
locations where it was not replaced with the actual architecture, e.g.
the directory where the PCH files are written.

Fix this by replacing the whole file path and not just portions of it.

Fixes: QTBUG-79694
Change-Id: I925d4ee8980a0de3205a0e387a516a5c6f8cfa4b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-11-18 10:46:56 +01:00
Alexandru Croitor
e9a58ba9e5 Regenerate src/*
Change-Id: I0314b4faa1e4860e86198eea4189987e527dfec2
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-14 09:05:48 +00: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
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
Lars Knoll
5357231c0a Make QList an alias to QVector
This is almost 100% source compatible with Qt 5. Exceptions are

* Stability of references for large or non movable types
* taking a PMF for types that are now overloaded with r-value references
  in QVector
* The missing prepend optimization in QVector (that is still planned
  to come for Qt 6)

Change-Id: I96d44553304dd623def9c70d6fea8fa2fb0373b0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-30 11:52:48 +01:00
Ulf Hermann
fc3c6cde83 qmake: Don't call QDir::count() over and over
This can be expensive. We don't expect files to be added to the
directory while qmake is running, and if that happened, the result would
be unpredictable anyway.

Change-Id: I5db93132046c1284130bbe51ce1ecd2a14665206
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-30 09:23:24 +01: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
059172c633 Fix precompiled headers for Clang
Precompiled headers were put in a directory which had exactly the same
name as the binary to be generated. This resulted in a failure with any
mkspec that used clang_pch_style. The g++-mkspec avoid this problem by
extending the directory name. This change adopts this technique for
clang mkspecs.

[ChangeLog][qmake] Fixed precompiled headers for the Clang compiler.

Fixes: QTBUG-72404
Change-Id: I471462e2bcb1e33f19d277c21acde0c04b1ffcd6
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-10-25 07:04:50 +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
Qt Forward Merge Bot
b327807c5e Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/corelib/io/qstandardpaths_unix.cpp
	src/corelib/tools/qsharedpointer_impl.h
	tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp

Change-Id: Iae95c5778dc091058f16f6db76f04a0178a9e809
2019-10-24 10:23:44 +02:00
Ulf Hermann
35adb74ddd Reimplement JSON support on top of Cbor
In turn, deprecate the QJsonDocument methods that deal with JSON binary
data. You should use CBOR for data serialization these days.

[ChangeLog][Deprecation Notice] The binary JSON representation is
deprecated. The CBOR format should be used instead.

Fixes: QTBUG-47629
Change-Id: Ic8b92ea36de87815b12307a9d8b1095f07166db8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-21 19:12:51 +02:00
Simon Hausmann
0eb4dcad89 Fix developer build with -Werror
The group parameter is only used when cross-compiling, mark it as unused
otherwise. This is noticeable in the cmake branch because there we build
qmake with cmake and apply the same warning flags, as opposed to the
bootstrapped qmake build when using ... qmake.

The cache file parameter in qmake is unused and the
mustEnsureWritability is only used on Windows.

Change-Id: I08655d5150f5a967c2340ee7678bad3a4d69914f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-10-15 10:46:06 +00:00
Alexandru Croitor
e919dfb91e Fix build of qmake
It was missing a source file for the QByteArrayList_join
symbol.

Change-Id: Ifcfd68d216f1e5370f90d7131bb3f7c9f91f07f3
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-10-15 08:11:13 +00:00
Joerg Bornemann
d3d5eadf24 Fix assert in VS project generator
We must check whether outputs or inputVars are non-empty before
accessing them.

This amends commit 68866b1a.

Task-number: QTBUG-79178
Change-Id: Iecf6dc705bac9bef5133ae2e5ceeace5f859f175
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-10-15 04:20:41 +00:00
Alexandru Croitor
440286655e Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: I4a78428a8ea273b6960792e3b8043f816fa37fcf
2019-10-14 17:46:34 +02:00
Alexandru Croitor
b6e75ff3ea Regenerate qtbase after wip/qt6 -> wip/cmake merge
Note that android builds will be broken after this merge and
regeneration, because we don't currently handle the minimum required
changes that were brought in with the Android multi ABI support
that comes from 5.14.

This will have to be addressed in a separate change.
For now the build on Android will fail while compiling due to incorrect
generation of LIB_SUFFIX with QT_ARCH.

Change-Id: Ia4a871f4b7ddd0da11caf5f34e10a599a97bb55d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-14 08:49:24 +00:00
Alexandru Croitor
f4b4c4f79b Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
Change-Id: I3a1d7673c3c20019ab12a2ea0a60f1619920a34c
2019-10-11 16:23:19 +02:00
Qt Forward Merge Bot
50d41f14ee Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I14f539ccfa4ab6e21188b98c314bdb030f3b9f70
2019-10-11 01:01:15 +02:00
Joerg Bornemann
472f5331ca Doc: Fix QMAKE_EXTRA_TARGETS snippet description
The snippet uses the Unix touch command, not qmake's touch function.

Change-Id: I71d1460447249b8941ce4bdbb494bb419e13b119
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-10-10 14:43:15 +02:00
Lars Knoll
e1fd607493 Remove leftovers from QML1
QML1 is not supported anymore, remove the leftover hooks for it.

Change-Id: I2900726714c5faea3523b2ebe39bb393364b3bfb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-10-10 11:28:19 +02:00
Tor Arne Vestbø
9115c7ae45 qmake: Avoid writing glue project file when only generating prl files
When qmake is run with -prl we don't need to write the glue makefile,
and doing so will end up with MakefileGenerator::writeProjectMakefile
trying to write to an invalid Option::output, resulting in warnings:

  QIODevice::write device not open

Change-Id: I196b185570e7329c621c2ccb8530b43f4be51ee6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-09 02:10:03 +02:00
Alexandru Croitor
cb90784eb1 Regenerate qmake and bootstrap projects
Change-Id: I6649a58752309a346bc03271f17fe80d0b727be3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-10-07 22:45:53 +00:00
Qt Forward Merge Bot
2c4b44d750 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ife31dad3c8dc43c5ff4d266e6d646230c5d20a50
2019-10-06 01:01:08 +02:00
Liang Qi
96a2044009 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/network/access/qnetworkaccessmanager.cpp
	src/network/access/qnetworkreplyhttpimpl.cpp

Change-Id: I059be651604623616fd31e8616be8ae61b4f8883
2019-10-04 15:27:15 +02:00
Edward Welbourne
0118e2e915 Include likely-adjusted uiLanguages for the system locale
QLocale::uiLanguages() on the system locale uses whatever the system
locale's query(QSystemLocale::UILanguages,...) returns. On Android,
this is just a list of locales. However, for non-system locales, we
also include some results of removing likely sub-tags from the locale
name, where equivalent. Thus zh-CN would also get zh and zh-Hans-CN
added to it; however, if the system locale is zh-Hans-CN, the shorter
forms are omitted. So post-process the system locale list in the same
way, albeit tweaked to avoid duplicates and rearranged so that we can
insert likely-adjusted entries between what they adjust and what
followed it.

Added QLocalePrivate::rawName() in the process, since it looks likely
to be useful in other contexts (and I needed its value): it just joins
such tags as are non-Any. This, however, uses QByteArrayList, so added
that (it's small) to the bootstrap library and qmake.

This follows up on commit 8796e3016f.

[ChangeLog][QtCore][QLocale] The system locale's UI languages list now
includes, as for that of an ordinary locale, the results of adding
likely sub-tags from each locale name, and of removing some, where
this doesn't change which locale is specified. This gives searches for
translation files a better chance of finding a suitable file.

Fixes: QTBUG-75413
Change-Id: Iaafd79aac6a0fdd5f44aed16e445e84a2267c9da
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-10-04 15:16:15 +02:00
Tor Arne Vestbø
3018c48f32 qmake: Parse -framework link lines the same way the linker does
[ChangeLog][qmake] The syntax 'LIBS += -frameworkFoo', or
'LIBS += "-framework Foo"' is no longer supported. Use the
canonical 'LIBS += -framework Foo' instead.

Change-Id: I50fd02dbfa155a0b95859734486a92bd448e87c2
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:26 +00:00
Joerg Bornemann
5ab8efd66a Make conflicting targets check less strict
People tend to "turn off debug and release builds" by just not building
one of the variants. For example, Qt's own rcc is built in release only,
however it is configured for debug_and_release with the same TARGET for
both.

Let qmake complain about conflicting TARGETs only we're about to build
all of those conflicting targets, i.e. if build_all is set.

Change-Id: I0448bf5cb421e2d801d3cc30e0d80353fba0d999
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-10-03 20:28:03 +02:00
Joerg Bornemann
ce5dc31932 Fix needless resolution of -l LIBS entries on Windows
Do not resolve -l entries to absolute file paths for libraries in the
default search paths.

This restores behavior from 5.12.0 (commit 2327944d) for Windows
system libraries.

Fixes: QTBUG-78827
Change-Id: Ic2d4626df87308dd635afc1ab5c4b8191d3d2831
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-10-03 20:27:48 +02:00
Tor Arne Vestbø
74abe98320 qmake: Place prl files under Resources in framework bundles
The root of the framework bundle shouldn't contain random files,
and doing so will prevent the bundle from being signable.

We still look up prl files in the root, to keep backwards
compatibility.

Change-Id: Ifd0bc3c6e7924e89eec54d3ef9368dfc95ed402c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-03 11:11:20 +02:00
Qt Forward Merge Bot
4c8814a341 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ideaa64d583746f1ce8265997131fb1ce3a9acbcf
2019-10-02 08:39:15 +02:00
Liang Qi
99cdd5fc67 Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/corelib/global/qrandom.cpp
	src/corelib/io/qfileinfo.cpp
	src/corelib/kernel/qeventdispatcher_win.cpp
	src/corelib/kernel/qeventdispatcher_win_p.h
	src/gui/text/qfontdatabase.cpp
	src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
	src/plugins/platforms/windows/qwindowsglcontext.cpp
	src/testlib/qtestcase.cpp

Done-With: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Done-With: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: I4893212471aa24be804c989a581810e2f714545c
2019-09-30 14:43:02 +02:00
Joerg Bornemann
21d988a199 Doc: Document CONFIG values that are worth documenting
Fixes: QTBUG-538
Change-Id: Id06e316e7ae3d59b63b256ef565a1ad6dc5d9dd2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-09-27 15:51:25 +02:00
Qt Forward Merge Bot
f9394275f9 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ic0dbddfa711905bc8e01aa6cbbdabf056a19587f
2019-09-24 17:30:08 +02:00
Liang Qi
6572650641 Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/widgets/styles/qstylesheetstyle.cpp

Change-Id: If11da7799075cc2d5768da5603c5fc46773c4eae
2019-09-23 08:35:49 +02:00
Qt Forward Merge Bot
c0f7cc3a3c Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ic274a375d6fc1312ced2354e034dc0980dd47c51
2019-09-22 22:28:33 +02:00
Leena Miettinen
51f1428d3c qmake: Replace WinRT with UWP in the qmake Manual
Remove info about Windows Phone, which is no longer supported.

Task-number: QTBUG-61884
Change-Id: Ic330f0f19a4e7314dd175f6c492fa25133185517
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-09-20 09:44:00 +02: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
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
Friedemann Kleint
d49d076431 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ic1fd51143f903b7e9086fc19ca960dfd9654ee00
2019-09-17 08:32:43 +02:00
Mårten Nordheim
2cf0ba1fba Use pre-compiled headers when building Qt with cmake
Some modules define their own manually-maintained lists, and we can rely
on the headers generated by each module to include in the pch as well
e.g. QtCore/QtCore.

There's also e.g. QtWidgetDepends for QtWidgets, but this only
works for modules, not for tools, examples or other applications.
For now we'll use the Qt<Module>/Qt<Module> headers for the
modules we depend on.

Building with PCH can be disabled with -DBUILD_WITH_PCH=NO, and it only
works for versions of CMake newer than 3.15.20190829.

Change-Id: Iae52bd69acfdfd58f4cd20d3cfa3c7f42775f732
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-11 08:25:54 +00: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
Alexandru Croitor
4ac872639e Make Qt relocatable
[ChangeLog][QtCore] Qt installations on the host system can now be
relocated, i.e. moved to other directories.

Add a new feature 'relocatable' that's by default enabled for
non-static builds
  - on platforms where libdl is available,
  - on macOS when configured with -framework,
  - on Windows.

If the feature is enabled, the directory where plugins, translations
and other assets are loaded from is determined by the location of
libQt5Core.so and the lib dir (bin dir on Windows) relative to the
prefix.

For static builds, the feature 'relocatable' is off by default. It can
be turned on manually by passing -feature-relocatable to configure. In
that case, QLibraryInfo::location(QLibraryInfo::TranslationsPaths) and
friends will return paths rooted in the user application's directory.

The installed and relocated qmake determines properties like
QT_INSTALL_PREFIX and QT_HOST_PREFIX from the location of the qmake
executable and the host bin dir relative to the host prefix. This is
now always done, independent of the 'relocatable' feature.

Note that qmake is currently only relocatable within an environment
that has the same layout as the original build machine due to absolute
paths to the original prefix in .prl, .pc and .la files.
This will be addressed in a separate patch.

Task-number: QTBUG-15234
Change-Id: I7319e2856d8fe17f277082d71216442f52580633
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-07 20:02:45 +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
Qt Forward Merge Bot
caf123a288 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ib6649a412e131bf679aab97c4c384520af348b4f
2019-09-06 09:44:10 +02:00
Qt Forward Merge Bot
fa2589bbb5 Merge remote-tracking branch 'origin/5.13.1' into 5.13
Change-Id: Ic633850940bbe17dcedc1609217a052b6f81ce4b
2019-09-05 13:33:00 +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
Joerg Bornemann
abfb1b8665 Don't add default lib dirs to LIBRARY_SEARCH_PATHS in xcode projects
Having hard-coded absolute paths in the xcode project breaks switching
between iOS and simulator builds.

Fixes: QTBUG-77804
Change-Id: Ib655bfc774b92c413a7b94ba4d005b6e1c4d2905
(cherry picked from commit 97465b1540)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-09-03 20:52:35 +02:00
Joerg Bornemann
7b82d27429 Fix library suffix replacement for xcode projects
In xcode projects we replace the _debug part of referenced libraries with the
variable $(QT_LIBRARY_SUFFIX). This only worked for libraries passed with -l.

Make the library suffix replacement work for libraries passed as absolute paths
too.

Fixes: QTBUG-77804
Change-Id: Iac2dbd2f67c3fa0f415ac43cbab5a906657164e5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-08-31 07:56:54 +00:00