Commit Graph

2076 Commits

Author SHA1 Message Date
Alexey Edelev
fd3c417af9 Move the common qmake sources into a object library
Some qmake sources could be reused by other tools. It makes sense to
move such sources to the object library, to avoid additional compilation
steps and to simplify the reuse of sources.

Change-Id: I9d7bb7624019149d34d29e4b269b4f26b8aec7a4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-11 15:46:34 +01:00
Joerg Bornemann
e158d699e0 Remove all qmake-related data from q[make]config.cpp
Now that we're not actually using qmakeconfig.cpp anymore, we can remove
it together with all qmake-related information that was written into
qconfig.cpp.

This also moves the qtConfEntries array back to qlibraryinfo.cpp.

Change-Id: I5e57d8c55613332cc3e57b11df4398d46aed259b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-11 10:00:18 +01:00
Joerg Bornemann
9f5a7cb5fa qmake: Do not read from qmakeconfig.cpp
Change-Id: I6a46c2e817f8dc3f580774aba2db8bfb01f5a403
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-11 10:00:11 +01:00
Joerg Bornemann
a08b1f6359 Read QLibraryInfo paths directly from QLibraryInfo and not from qmakeconfig.cpp
Change-Id: I1db1c871ec6b4e572bd36df6aff7a5be8a4a706c
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-11 10:00:01 +01:00
Joerg Bornemann
3c12ab974f Pass target and host mkspec as defines to QMakeLibraryInfo
Change-Id: If07055286496c507310c0dbb3a06f1a42d643596
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-11 09:59:56 +01:00
Joerg Bornemann
c651e7ba18 Do not write Sysroot and SysrootifyPrefix into qmakeconfig.cpp
Those have fixed values.

Change-Id: I7f1ba8036f43413d3c805f4b419ae79e037343fb
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-11 09:59:51 +01:00
Joerg Bornemann
504d0c3755 qmake: Delegate prefix deduction to QLibraryInfo
Now, that qmake depends on QtCore, we can just ask QLibraryInfo for the
prefix instead of calculating it from QT_CONFIGURE_RELATIVE_PREFIX_PATH.
Remove that define.

Change-Id: I14be298a9d08abf33299e4cdbac55e91af318397
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-11 09:59:47 +01:00
Joerg Bornemann
b788c87457 QMakeLibraryInfo: Move reading of default values into separate function
Reduce code duplication.

Change-Id: Ic20c124ad664d16552e3cfea8dde465fc0b6066f
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-11 09:59:42 +01:00
Joerg Bornemann
17055f5f48 Remove the platformsSection constant from qconfig.cpp.in
This is not configurable and doesn't have to be in the generated
q[make]config.cpp files.

Change-Id: If294d735800a3b5c6b3e269abdd86df401cf4864
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-11 09:59:27 +01:00
Alexey Edelev
1f8f13cbe7 Add the 'FEATURE_qmake' feature
Add a conditional build of the qmake.

Task-number: QTBUG-89369
Change-Id: I8d7968ffb20ea31df2f85fff055e0d131ed06a36
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-03-04 09:49:44 +01:00
Joerg Bornemann
b1ad7f938e Generate information about user-facing applications in build dir
When packaging different Qt versions for Linux distributions (or any
distribution with a common bin dir), Qt tools cannot be installed to
/usr/bin, because the executable names of the different Qt versions
clash.

To solve this conflict, our recommendation is to install Qt's tools to
/usr/lib/qt6/bin and to create versioned symlinks to user-facing tools
in /usr/bin.

User-facing tools are tools that are supposed to be started manually by
the user. They are marked in Qt's build system. Distro package
maintainers can now configure with
  -DCMAKE_INSTALL_PREFIX=/usr
  -DINSTALL_BINDIR=/usr/lib/qt6/bin
  -DINSTALL_PUBLICBINDIR=/usr/bin
and will find a file called user_facing_tool_links.txt in the build
directory after the cmake run. Nothing will be installed to
INSTALL_PUBLICBINDIR.

Each line of user_facing_tool_links.txt consists of the installation
path of a user-facing application followed by a space and the versioned
link name in INSTALL_PUBLICBINDIR.

Example content:
/usr/lib/qt6/bin/qmake /usr/bin/qmake6

To actually create the versioned symlinks, the content of this file can
be fed to ln like this:
  xargs ln -s < build-dir/user_facing_tool_links.txt

Or the package maintainer may decide to do something completely
different as suits their needs.

This patch adds the USER_FACING argument to qt_internal_add_tool to mark
tools as user-facing. In addition, every Qt created by
qt_internal_add_app is treated as user-facing.

The only tool this patch marks as user-facing in qtbase is qmake.

Pick-to: 6.1
Fixes: QTBUG-89170
Change-Id: I52673b1c8d40f40f56a74203065553115e2c4de5
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2021-03-02 22:00:51 +01:00
Alexey Edelev
5dab1e931d Improve QMakeLibraryInfo encapsulation
QMakeLibraryInfo uses external data to produce paths. This causes
issues when trying to use it out of the existing qmake environment.
Add data fields that contain the path to the binary that uses
QMakeLibraryInfo and manually specified qtconf.

Task-number: QTBUG-75870
Change-Id: Ic6fa274ede3a9287826ff66c79f155b10d0d455c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-03-01 17:37:03 +01:00
Alexey Edelev
d1101c460e Simplify prefix-related functionality of qmake
Since the QT_CONFIGURE_HOSTBINDIR_TO_HOSTPREFIX_PATH and
QT_CONFIGURE_HOSTBINDIR_TO_EXTPREFIX_PATH definitions keep the same
value in modern CMake build, no need to have special handling in cases
where these values are used in qmake. Also it will be useful to
specify the relative path to the prefix directory from the directories
different of 'bin' when use QMakeLibraryInfo.

Task-number: QTBUG-75870
Change-Id: I5a777001eb334dcf05e22853a514d4257352d59b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-03-01 17:36:56 +01:00
Alexey Edelev
93f55570c4 Remove unused definitions
QT_CONFIGURE_CROSSBUILD is always '0', so it's not necessary to keep
conditional compilation in QMakeLibraryInfo.

Also the QT_CONFIGURE_SYSROOTIFY_PREFIX definition is never used
in the project.

Task-number: QTBUG-75870
Change-Id: I1fe42dce40fddc6a72254736883f93aa4727f6b3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-03-01 17:36:48 +01:00
Alexey Edelev
43c28aa904 Use Core library for qmake instead of the Bootstrap library
Move the qmake-specific logic of the QLibraryInfo class to
qmake internals. 'qconfig.cpp.in' now stores information about
the library info entries to keep them consistent between qmake
and the Core library. qmake requires specific features enabled
in the Core library, so building qmake will be skipped if the
features are not enabled.

All flags directly related to the qmake have been removed from
Core lib.

Remove all bootstrap related sections from qmake CMakeLists.txt

Task-number: QTBUG-89369
Change-Id: I26de157d3bfd4a5526699296e9d46e1c180b89ae
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-02-25 16:08:43 +01:00
Kai Köhne
8f1c4019e5 qmake: Update documentation that c++17 is the default
Since commit 4933a5f892, CONFIG contains C++17 by default.

Change-Id: I1033c256242c03d79a643c12a63d17eb9f4c705f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-02-19 09:59:14 +01:00
Joerg Bornemann
edd1225489 qmake: Introduce QT_HOST_LIBEXECS property
This will be used to access host tools that are installed in
${prefix}/libexec instead of ${prefix}/bin.

Pick-to: 6.1
Change-Id: I36c4b5736330f8229d267a117c65d55cd5e12758
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-02-18 11:46:42 +01:00
Kai Köhne
3c412c93c2 Update name of c++2a to c++20
Keep the c++2a feature, but make it an alias for compatibility
purposes.

Pick-to: 6.1
Change-Id: I6f153109be84659806f1b7a57a88a187875166d8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-02-10 07:54:06 +01:00
Joerg Bornemann
134ee7d932 qmake: Introduce compile_included_sources CONFIG option
By default, qmake does not compile source files that are included in
other source files. The new CONFIG option compile_included_sources
disables this behavior.

Pick-to: 5.15
Fixes: QTBUG-90801
Change-Id: I60c997938895f3a743d32ea385efdbe6bcf315bb
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-02-08 12:07:54 +01:00
Ulf Hermann
4e5d0cf5e5 QLibraryInfo: Rename Qml2ImportsPath to QmlImportsPath
The "2" is meaningless. We retain the old name as alias for source
compatibility, but we don't document it anymore.

Task-number: QTBUG-85064
Change-Id: Id10d58f6d39a0faaec042304b374ae6b23469362
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2021-02-08 11:00:12 +01:00
Alexey Edelev
295d4d6955 Remove usage of the definitions that are never defined
The QT_BUILD_QMAKE_BOOTSTRAP and QT_BUILD_QMAKE_LIBRARY definitions
are never defined in the project since migrating to CMake build.

Change-Id: I7108c92387005a2fde6ebdb2d74843e3efc6413e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-02-01 14:34:41 +01:00
Ralf Habacker
ab2c61e638 If available, use a version-specific qt<major-version>.conf
To enable the current Qt version to use a qt.conf that is independent
from the previous version, a file named 'qt<major-version>.conf' is
searched for first. If this file does not exist, a file with the
name 'qt.conf' is searched for.

Task-number: QTBUG-88635
Change-Id: If75b63f72a7bdbdf1de7729ea4ecb00810b58d12
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2021-01-14 23:30:47 +01:00
Joerg Bornemann
04f11f9935 Remove .prev_CMakeLists.txt files
Those serve no purpose anymore, now that the .pro files are gone.

Task-number: QTBUG-88742
Change-Id: I39943327b8c9871785b58e9973e4e7602371793e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-01-12 20:59:13 +01:00
Giuseppe D'Angelo
c34c6af374 Replace some more erase/remove patterns with removeIf
Change-Id: I6c6f33450fbfd798e5ef71a8ba18f590581dc3a2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-10 15:02:47 +01:00
Joerg Bornemann
ad2da2d27a Remove the qmake project files
Remove the qmake project files for most of Qt.

Leave the qmake project files for examples, because we still test those
in the CI to ensure qmake does not regress.

Also leave the qmake project files for utils and other minor parts that
lack CMake project files.

Task-number: QTBUG-88742
Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-01-07 15:32:28 +01:00
Hou Lei
2d58620140 Adjust the format of code blocks
Change-Id: Id4a98b8b6f66ea4ea18eb90b86c1b84b6342e825
Reviewed-by: Hou Lei <houlei@uniontech.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-01-04 18:09:55 +08:00
Joerg Bornemann
31396f0aff Remove qmake-related code from configure
This leaves a very simple script that delegates the heavy configure work
to a CMake script.

This also removes the Makefile templates that were used for
bootstrapping qmake.

Task-number: QTBUG-88742
Change-Id: Iab9c477e0bb611d680bda2cf8aaa7ad88356a8d1
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-12-21 10:33:33 +01:00
Alexandru Croitor
2304acab5f CMake: Regenerate projects using pro2cmake one last time
And fix up some wrong qmake project files

Pick-to: 6.0
Change-Id: I66cb82aeb9c1419a74df1a650fa78a511ade7443
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-12-10 11:52:30 +01:00
Marc Mutz
105a66e654 Use (new) erase()/erase_if() algorithms
Change-Id: I45c18fd45c20b226e44d16315e3ebb6c305d4ab0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-05 00:47:44 +01:00
Joerg Bornemann
21e7777230 Fix undefined behavior in ProString/ProKey::appendTo
We must not pass null pointers to memcpy.

Pick-to: 6.0
Fixes: QTBUG-88780
Change-Id: Ic1d77b4672310a3f6d0d4fbee5f2889e3e4d219d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-12-02 10:21:45 +01:00
Andreas Buhr
0440614af0 Replace discouraged Q_MOVABLE_TYPE by Q_RELOCATABLE_TYPE
Q_MOVABLE_TYPE was conceived before C++ had move semantics. Now, with
move semantics, its name is misleading. Q_RELOCATABLE_TYPE was
introduced as a synonym to Q_MOVABLE_TYPE. Usage of Q_MOVABLE_TYPE
is discouraged now. This patch replaces all usages of Q_MOVABLE_TYPE
by Q_RELOCATABLE_TYPE in QtBase. As the two are synonymous, this
patch should have no impact on users.

Pick-to: 6.0
Change-Id: Ie653984363198c1aeb1f70f8e0fa189aae38eb5c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2020-11-30 17:16:21 +01:00
Fabio Falsini
88ab9e1800 Change android target SDK version to 29
Play Store now accept only app with target
SDK version set to 29 or above

Pick-to: 6.0
Change-Id: If38f20c88fd6b0e6f29939cdf3d2eb793c0e1489
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-11-26 20:05:41 +01:00
Joerg Bornemann
032c536644 qmake: Sync back changes from qttools
Copy back changes to qmake internals that were done in qttools.
This makes it easier to keep the qmakelib copies in sync.

The code guarded by PROEVALUATOR_CUMULATIVE is not used by qmake itself,
but only by lupdate and Qt Creator. It seems to be sensible to have the
same behavior with regards to feature file evaluation in both
projects. It was originally introduced in qttools for QTBUG-62478.

The change regarding QT_BOOTSTRAPPED is safe, because the 'process'
feature is available and off in the boostrapped case.

Change-Id: I030ca8b093c017040a9ff9f4bb09a7cca4aa8964
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-26 20:05:41 +01:00
Joerg Bornemann
116c2115f8 Doc: Fix documentation of qmake's exists() function
This function may take a wildcard expression, not a general regular
expression.

Pick-to: 5.15
Change-Id: Ia7ba3bac47c310bc035620583b9d2102fdc5ffb0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-11-24 18:54:45 +01:00
Giuseppe D'Angelo
784a290c4b QFileInfo: mark constructors as explicit
These look like leftovers (API flaws).

Construction of QFileInfo from QString (or similar) should be not
implicit, as QFileInfo construction is expensive (might hit the file
system), and this may have users overlook APIs (for instance build a
QFileInfo out of QDirIterator::next(), instead of using ::fileInfo();
using QDir::entryList instead of entryInfoList; etc.).

Leave an opt-out mechanism to ease porting.

Fix a handful of usages around qtbase, with at least a couple of them
likely to be actual "sloppy" code.

[ChangeLog][Potentially Source-Incompatible Changes][QFileInfo] Most
QFileInfo constructors are now explicit. The
QT_IMPLICIT_QFILEINFO_CONSTRUCTION macro is provided to keep old code
working.

Change-Id: Ic580e6316e67edbc840aa0c60d98c7aaabaf1af6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-11-15 18:30:16 +01:00
Giuseppe D'Angelo
8780fbb2eb Build Qt (and client apps using it) with /permissive-
*Not* using /permissive- exposes Qt and client apps to interesting
bugs and/or build failures, (e.g. QTBUG-87225, or
19b5520abf). We demand strict
conformance by any other compiler, it's time to demand it from
MSVC too.

The Windows headers themselves are clean starting from the
Windows Fall Creators SDK (10.0.16299.0), and moreover Qt 6 will
drop WinRT; therefore, the comment in the mkspecs does not apply
any more.

Since /permissive- implies /Zc:referenceBinding, drop that
option. The other implied options are set on MSVC < 2017,
but I leave them in to avoid tinkering with the fragile lists
of C/C++ flags.

Rename the CMake internal helper function to better describe
what it does.

Fixes: QTBUG-85633
Fixes: QTBUG-85637
Fixes: QTBUG-85635
Fixes: QTBUG-88244
Change-Id: Ie03fddb61aa066fdc14b7231c22e7108b4a02fbb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-11-10 20:01:49 +01:00
Assam Boudjelthia
0d6a14bbd9 Android: recommend against using ANDROID_ABIS inside the project file
Pick-to: 5.15
Task-number: QTCREATORBUG-24674
Change-Id: Iad6baa1af61d3d1a44f26cb9d51e3cb97d235707
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-11-10 13:23:09 +00:00
Michal Klocek
632da28e9c Add new way to mess up projects with QMAKE_INSTALL_REPLACE
Qmake supports currently:

 * QMAKE_PRL_INSTALL_REPLACE,
 * QMAKE_LIBTOOL_INSTALL_REPLACE
 * QMAKE_PKGCCONFIG_INSTALL_REPLACE

Introduce QMAKE_INSTALL_REPLACE, where more sed magic
can be put in action in more generic manner.

replace_foo.filename = foo.h
replace_foo.matches = /bad/looking/path/to/foo
replace_foo.replace = /awesome/looking/path/to/foo
QMAKE_INSTALL_REPLACE += replace_foo

Pick-to: 5.15
Task-number: QTBUG-87154
Change-Id: Ie43d0ab4f1d4575bbf6279eb36383f38047484d9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-11-09 19:13:48 +02:00
Michal Klocek
9bade12c2c Minor refactor of installMetaFile
Move some lines into createSedArgs. This is used
in follow up patch.

Pick-to: 5.15
Task-number: QTBUG-87154
Change-Id: I226f4aad4aaf703a4726c42b40afb4bde3a9d878
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-11-09 14:52:03 +02:00
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