Commit Graph

1113 Commits

Author SHA1 Message Date
Edward Welbourne
07ed2b054a Remove unused functions from enumdata.py
It's now a data-only module. The callers of its code-to-ID functions
have, for some time now, been rearranging its mappings to get at data
efficiently.

Change-Id: Ia16dcaa767203cdf3b81a96bd51793491ad41563
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2021-05-18 20:57:25 +02:00
Joerg Bornemann
92185d417d Fix BASE argument of qt_add_resources
The BASE argument of qt_add_resources now denotes the root point of the
alias of the file.  Before, BASE was merely prepended to every file that
got passed to qt_add_resources.

Old behavior:
    qt_add_resources(app "images"
        PREFIX "/"
        BASE "../shared"
        FILES "images/button.png")

Alias is "../shared/images/button.png", and pro2cmake generated
QT_RESOURCE_ALIAS assignments to fix this.

New behavior:
    qt_add_resources(app "images"
        PREFIX "/"
        BASE "../shared"
        FILES "../shared/images/button.png")

The alias is "images/button.png".  No extra QT_RESOURCE_ALIAS assignment
is needed.

The new behavior is in effect for user projects and for Qt repositories
that define QT_USE_FIXED_QT_ADD_RESOURCE_BASE.  Qt repositories will be
ported one by one to this new behavior.  Then the old code path can be
removed.

Pick-to: 6.1
Task-number: QTBUG-86726
Change-Id: Ib895edd4df8e97b54badadd9a1c34408beff131f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-05-18 16:02:52 +02:00
Cristian Adam
5981d44aec pro2cmake: Add support for standalone CMake test configuration
This patchset adds the bits needed for manual tests to work standalone.

Amends ebaa1c15a101579d9296336491e36c63b979f18d

Pick-to: 6.1
Task-number: QTCREATORBUG-25389
Change-Id: Ifc70391bda2a3eea3c7492a58353a703cdc3114c
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-04-27 17:23:07 +02:00
Giuseppe D'Angelo
00ee664f2f Edid vendor table generator (2/N): use idiomatic C++
In C++ we can give names to classes, so just use that, without
C-isms (typedef struct).

Change-Id: I27239d8d5c28864b3f4f7bd4013cc47c045b4b04
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2021-04-21 15:28:54 +02:00
Giuseppe D'Angelo
7763b397e3 Edid vendor table generator (1/N): fix copyright message
The table has been moved to QtGui, adjust the generated "location"
in the (C) comment.

Change-Id: I536fe21ab59085c0d8d89aa638b50876fe3bf1cf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2021-04-21 15:28:47 +02:00
Alexandru Croitor
b25eb6e0bd CMake: Introduce zlib find script to work around hardcoded iOS SDK
Xcode allows building a project targeting either the device or
simulator sysroot in one single build dir, but for the sysroot
switching to work there should be no linker or compiler flags
referencing absolute paths of a specific sysroot.

During CMake configuration of a project targeting iOS, all found
system libraries will be within one single sysroot, either the device
one or the simulator one, whichever one was passed to
CMAKE_OSX_SYSROOT. CMake will then generate the Xcode project
and pass those absolute paths, which makes sysroot switching within
Xcode not work.

To avoid that, the CMake documentation recommends passing linker and
framework flags of the form '-lfoo' and '-framework bar' instead of
absolute paths. Xcode then takes care of setting the correct framework
search path.

Zlib is one of the libraries found in the iOS sysroot and thus passed
as absolute path.
To avoid that, create a new FindWrapZLIB find script. The target it
creates will pass the absolute path to the library on non Apple
platforms and an -lz linker flag on Apple platforms (macOS and iOS).

To avoid issues with target global promotion when system PNG package
is found, ensure that a found ZLIB::ZLIB target is promoted to global
manually in src/gui/configure.cmake.

Pick-to: 6.1
Change-Id: I8bd8649be4f680a331ad51925f27cb9d13ac5e5f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-04-19 20:30:45 +02:00
Giuseppe D'Angelo
a794c5e287 Unicode: fix the extended grapheme cluster algorithm
UAX #29 in Unicode 11 changed the EGC algorithm to its current form.
Although Qt has upgraded the Unicode tables all the way up to
Unicode 13, the algorithm has never been adapted; in other words,
it has been working by chance for years. Luckily, MOST
of the cases were dealt with correctly, but emoji handling
actually manages to break it.

This commit:

* Adds parsing of emoji-data.txt into the unicode table generator.
  That is necessary to extract the Extended_Pictographic property,
  which is used by the EGC algorithm.

* Regenerates the tables.

* Removes some obsoleted grapheme cluster break properties, and
  adds the ones added in the meanwhile.

* Rewrites the EGC algorithm according to Unicode 13. This is
  done by simplifying a lot the lookup table. Some rules (GB11,
  GB12, GB13) can't be done by the table alone so some hand-rolled
  code is necessary in that case.

* Thanks to these fixes, the complete upstream GraphemeBreakTest
  now passes. Remove the "edited" version that ignored some rows
  (because they were failing).

Change-Id: Iaa07cb2e6d0ab9deac28397f46d9af189d2edf8b
Pick-to: 6.1 6.0 5.15
Fixes: QTBUG-92822
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2021-04-16 20:31:39 +02:00
Giuseppe D'Angelo
8546e017c0 util/unicode: enable asserts unconditionally
If one "accidentally" uses a release build of the unicode tool,
the asserts within it won't fire. Enable them in all cases.

Change-Id: I9d63641dc6d6d2e5805b61b36f8c28e624b25e12
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-04-16 16:49:28 +02:00
Qt CI Bot
8f6c93b645 Merge integration refs/builds/qtci/dev/1618489823 2021-04-15 21:27:52 +00:00
JiDe Zhang
50a7eb8cf7 Add the "Territory" enumerated type for QLocale
The use of "Country" is misleading as some entries in the enumeration
are not countries (eg, HongKong), for all that most are. The Unicode
Consortium's Common Locale Data Repository (CLDR, from which QLocale's
data is taken) calls these territories, so introduce territory-based
names and prepare to deprecate the country-based ones in due course.

[ChangeLog][QtCore][QLocale] QLocale now has Territory as an alias for
its Country enumeration, and associated territory-based names to match
its country-named methods, to better match the usage in relevant
standards. The country-based names shall in due course be deprecated
in favor of the territory-based names.

Fixes: QTBUG-91686
Change-Id: Ia1ae1ad7323867016186fb775c9600cd5113aa42
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-04-15 20:17:49 +08:00
Alexandru Croitor
cf27a23937 CMake: pro2cmake: Use latest project version for qml import version
Use PROJECT_VERSION instead of CMAKE_PROJECT_VERSION when setting the
version of a qml module, which extracts the version of the latest
project() call rather than the top-level one.

Using CMAKE_PROJECT_VERSION caused issues in top-level builds where
the qtdeclarative version is 6.2, but the top-level project version is
still 6.1 and hasn't been updated to 6.2, causing qml module import
errors.

This was probably an oversight during initial implementation of qml
support in pro2cmake.
So projects that define qml modules should be adapted accordingly.

Amends cce8ada814
Amends 28fff4a551

Pick-to: 6.1 6.0
Task-number: QTBUG-92861
Change-Id: I494784694e997501a5bc4fd0c0eac458ddc248aa
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-04-15 13:27:23 +02:00
Niclas Rosenvik
75296f347f Fix backtrace on non-linux systems
On BSD systems backtrace lies in libexecinfo. Use
FindBacktrace from CMake to be able to resolve
backtrace on more unixes than linux.

Change-Id: Ie14fd1727d2da03645fc2d6de10c0217baabad6b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-03-22 21:31:09 +00:00
Niclas Rosenvik
05e4c8f2e9 Enable X11 on other platforms than just Linux
Set CMake variable X11_SUPPORTED for all systems that have X11.
Adjust _adjust_library_map() in util/cmake/helper.py to apply X11_SUPPORTED
condition around X11 related packages instead of just LINUX.
Adjust configure.cmake in src/gui based on this change.
Why, because X11 is not just Linux.

Change-Id: Ic3c04eaa55301d1237c7e74281eccd4f8e27e9ce
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-16 13:05:17 +00:00
Dominik Holland
94879987f8 Add QtIvi Modules to cmake util helper.py
Change-Id: Id3b9847a78725fc53d16d8f942126bc0d7a76410
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-10 11:07:38 +01:00
Joerg Bornemann
c8992894bb pro2cmake: Set default API version to the latest version
Change-Id: I83ac2eb3ca36e1454d34fd0181ce0dccc775b47f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-03-09 16:03:28 +01:00
Joerg Bornemann
735466ed2b configurejson2cmake: Add library mapping for libmng
Pick-to: 6.1
Change-Id: Ic6a45ecf14791cd6e780b7b0cb52c7b7275e968a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2021-02-24 17:10:26 +01:00
Assam Boudjelthia
136324ad62 Coin: fix android emulator script to use bash instead of sh
Task-number: QTBUG-91180
Pick-to: 6.0 6.1
Change-Id: I410c6769aac3b3b760ff35aa71d52c8a5d6c1143
Reviewed-by: Toni Saario <toni.saario@qt.io>
2021-02-19 10:31:44 +02:00
Assam Boudjelthia
bcbdbd50fe Coin: remove workarounds to allow running Android tests
We had two workarounds:
* script that adds Gui to tests
* create a symbolic link for the qt install dir to fake_prefix which
androiddelployqt was expecting them to be under

Both issues are fixed, thus removing the workarounds.

Pick-to: 6.1 6.0
Change-Id: Ic022bece15afe92c693d573893d260b13b4227ed
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2021-02-18 13:42:19 +02:00
Edward Welbourne
2fe6f551d9 Do some miscellaneous tidy-up in util/cmake/
A typo-fix, a simplification and a trivial restructuring.

Change-Id: I434457c4eb83eebfb9b472c6914659199fe5be71
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-02-15 13:45:25 +01:00
Edward Welbourne
18bf641777 Use newlines more consistently in generate compile-test code
The generated code contained many repeated blank lines.
Most main()s were preceded by one, but not all.
Only include blank lines for actual empty entries in lists, where
configure.json specified them, plus one before main if anything else
precedes it.

Change-Id: I6e6c34940e08712a1aa848a3c9ad1b0fb5806d77
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-02-15 13:45:14 +01:00
Edward Welbourne
73fbf8bd30 Simplify test-snippets in configure.cmake
The main(void) signature obviates the need for unused parameters and
has existed since (at least) C89; so use that instead of the
old-fashioned argc/argv arguments we don't use in any of these tests.

Change-Id: Ibfe850a1fce378673c9781011475ea623fd75ad4
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-02-15 13:43:52 +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
Edward Welbourne
05e67fbcab Update to CLDR v38.1, adding Yukon Standard Time
No change to QLocale's data, one addition to the Windows time-zone
data. What was formerly "Us Mountain Standard time / Canada" is now
Yukon Standard Time.

Fixes: QTBUG-89784
Pick-to: 6.0 5.15
Change-Id: I4c9a23620e74ea379be8a4c5ba0896d35fe9b594
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-01-27 15:00:57 +01:00
Alexey Edelev
127a1ada32 Change XCB::XFIXES condition in library mapping
Replace condition of XCB::XFIXES from the 'XCB_XFIXES_FOUND' variable
to 'TARGET XCB::XFIXES'.

Fixes: QTBUG-89979
Change-Id: I77b8b4046dc6852ecb209d942ee94d864a35c378
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-26 16:18:24 +01:00
Edward Welbourne
56f12656f5 Eliminate the need to preprocess the public suffix list
The program to digest the public suffix list required the user to
initially grep away the comments and blank lines. Filtering those
lines out in the code to read the file is trivial, so save the user
one step in the process.

Change-Id: I08f2594fc4236a689c849d42b5446efa9ec2ef7a
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-01-25 18:03:00 +01:00
Andreas Buhr
df912d08c3 Update pro2cmake to require CMake 3.16
pro2cmake generated CMakeLists.txt with cmake_minimum_required(3.15.0).
But 3.16 is required now. This patch updates pro2cmake.py accordingly.

Change-Id: I8283e1c4da4d2d36e1d9127cab410c7bfc58830c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-22 15:27:22 +01:00
Edward Welbourne
5ea701337d Mark the public suffix generator as a command-line program
It's a purely command-line program, no need for gui.
Noticed on making a first (abortive) attempt to convert to CMake.

Change-Id: I767f59587d9fe902aec46cd1742576b6bfc84274
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-22 12:16:53 +01:00
Joerg Bornemann
f379938443 pro2cmake: Raise QT_REPO_MODULE_VERSION to 6.1.0
Modules that are ported for dev should get this version now.

Change-Id: I11d47504f163798d53c51e56ef978edaa711d93a
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-01-20 15:24:29 +01:00
Joerg Bornemann
135f93122c pro2cmake: Add mapping for Qt::StateMachine
Change-Id: I0ccc9082cc6417584013dde248ab3347aad5b87c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-01-19 19:10:42 +01:00
Craig Scott
b59f77aab4 FindLibb2: Don't rely solely on pkg-config
Task-number: QTBUG-86283
Change-Id: Ie455d7cfc6e6f9ae8297f8bc0daf2816ccce91b6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-01-18 15:42:52 +11:00
David Skoland
27d96b4789 Replace QtTest headers with QTest
Complete search and replace of QtTest and QtTest/QtTest with QTest, as
QtTest includes the whole module. Replace all such instances with
correct header includes. See Jira task for more discussion.

Fixes: QTBUG-88831
Change-Id: I981cfae18a1cabcabcabee376016b086d9d01f44
Pick-to: 6.0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-12-22 15:20:30 +01:00
Alexey Edelev
bbebfa0be2 CMake: Add --enable-new-dtags flag support
Remove enable-new-dtags from feature mapping, handle it as regular
feature. Regenerate configure.cmake with 'enable-new-dtags' enabled.
Check for enable_new_dtags feature, add -Wl,--enable-new-dtags if
enabled.

Fixes: QTBUG-89013
Pick-to: 6.0
Change-Id: Ice57c02dc85f7f9ecf14e3bc65f31a57b589ce24
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Craig Scott <craig.scott@qt.io>
2020-12-22 10:28:34 +00:00
Joerg Bornemann
9f432a540a configurejson2cmake: Rename assimp to qt3d-assimp
Adapt to changes in qt3d.

Change-Id: Ie21425ef30442c9ca4d6f288f8ca8bf8d4e4f6e3
Reviewed-by: Mike Krus <mike.krus@kdab.com>
2020-12-21 13:22:49 +01:00
Assam Boudjelthia
86a655387c Android: restart emulator if it gets stuck during testing
Task-number: QTQAINFRA-4052
Pick-to: 6.0
Change-Id: Ie1a0d1c6b6c5cd0425b7ccf195ac57408142f3c3
Reviewed-by: Simo Fält <simo.falt@qt.io>
2020-12-11 11:09:22 +02:00
Joerg Bornemann
238f466d49 configurejson2cmake: Fix conditions of features 'tiff' and 'webp'
These features must not depend on TIFF_FOUND/WrapWebP_FOUND, otherwise
it's impossible to use the bundled libtiff/libwebp.
The default-converted conditions are good enough.

This reverts 82941a3f1b which tried to fix
the qtimageformats build. More work to fix the bundled libwebp is to be
done in the qtimageformats repo.

Change-Id: I5050a6e5f2b3c95e3d5fea660f7fbb630113b7dd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-09 22:12:20 +01:00
Joerg Bornemann
3776c51fa0 pro2cmake: Handle conditions for feature system_webp
This is needed for the qtimageformats build with bundled libwebp.

Change-Id: I4d32392d7362f254e9633197497b6d78e12da559
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-09 22:12:18 +01:00
Alexandru Croitor
ac09bd40fa CMake: pro2cmake: Add mapping for qmldom library
Change-Id: Ibd8dbec5fa04192fc57a233a18908cba290f986b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-12-09 20:30:04 +01:00
Michal Klocek
5bad80173f Add qt chart mapping to cmake utils helper.py
Change-Id: I5d9e42dc221419c2f21a533f3fc27ce67ef84450
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-12-04 14:53:17 +00:00
Alexandru Croitor
2f1c087573 CMake: Fix conditions for some subarch features
The AES and SHA features were checking for the wrong TEST_subarch_foo
variables.

Pick-to: 6.0
Task-number: QTBUG-87376
Change-Id: I46cd14d98832529aebac22cfcb01180330c5e091
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-12-04 11:22:38 +01:00
Joerg Bornemann
5592204b19 CMake: Fix QMAKE_LIB of WrapOpenSSLHeaders library
The correct entry for this lib is 'openssl/nolink', not
'openssl_headers'.

In configurejson2cmake's helper.py we already have
this information encoded such that the no_link_so_name field of
'openssl' points to 'openssl_headers'. Extend configurejson2cmake to
take this into account, and re-generate src/network/configure.cmake.

Pick-to: 6.0
Change-Id: I9817ea7722503a373d309b7e6fa201448d403e8d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-30 23:17:50 +01:00
Joerg Bornemann
1a1d3a9a44 pro2cmake: Fix is_public_module calculation
write_library_section traverses the parent/child hierarchy of scopes to
determine whether the scope belongs to a public Qt module. This doesn't
work for scopes that stem from included .pri files, because each
included file has its own parent/child hierarchy.

We already have an include scope hierarchy in the form of
Scope._included_children, but lack a way to get to the including
scope.

Add Scope._including_scope and adjust the is_public_module calculation
to take that into account after hitting the top of the parent/child
hierarchy.

Pick-to: 6.0
Change-Id: I8fee1cfbf048e7afc6783b0a52eaca75be17072f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-30 23:17:40 +01:00
Liang Qi
92a57e0b01 Revert "xcb: add xcb-util dependency for xcb-image"
This reverts commit 39b1dea2ec.

39b1dea2 is wrong, the bug is for static build of qt with static
xcb. It adds the explicit dependency of xcb-util 0.3.9, which is
not available on Debian yet.

Task-number: QTBUG-86287
Fixes: QTBUG-88688
Pick-to: 5.15 6.0
Change-Id: Iffc821f49bdfcad3f2556951d3677c35a7682266
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-11-30 22:11:04 +00:00
Edward Welbourne
b051b18490 Add a note explaining what a macrolanguage is
The comments in enumdata.py indicating macrolanguages meant nothing to
me, until I stumbled on a reference that lead me to ISO 639's usage of
the term. Add a minimal explanation to save such confusion for others.

Change-Id: Ia1d849d93a1d94c04c8c461debdecf879e9a7db5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-24 18:54:45 +01:00
Simo Fält
13c460d0ff Add coin instructions to run Android test in emulator
Task-number: QTQAINFRA-3867
Pick-to: 6.0
Change-Id: Ie6dd9c2dfeeccd526c2133d7ac03efce5b7ed091
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-11-20 13:28:31 +00:00
Edward Welbourne
17701a95f8 QLocale: simplify currency display name lookup
We were extracting several candidate display names from CLDR for each
currency, joining them with semicolons, storing in a table, then using
only the first entry from the list - where we should probably have
used the first non-empty entry in any case.

So instead extract the first non-empty candidate name from CLDR and
store that simply, saving the need for semicolon-joining or parsing
out the first entry from the thus-joined list. This significantly
reduces the size of the currency name data table.

Change-Id: I201d0528348d5fcb9eceb5df86211b9c77de3485
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-11-17 19:55:04 +01:00
Alexandru Croitor
267bb4ec6c CMake: pro2cmake: Reformat scripts using black8 again
Change-Id: I1b024867e76baa2e443e95a5e980745b65ee1f19
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-11-12 15:25:06 +01:00
Alexandru Croitor
34437b9e14 CMake: pro2cmake: Handle AUX_QML_FILES installation
Generate copy and installation rules for AUX_QML_FILES entries.
These are usually handled by mkspecs/features/qml_module.prf.

For the purposes of unblocking the Designer team, instead of creating
AUX_QML file specic functions that would handle installation, generate
qt_copy_or_install() rules.

To ensure installation destination is correct, we need to group file
paths by base directory and specify those in the DESTINATION
parameter. Otherwise the file hierarchy would be flattened.
This is usually handled by file_copies.prf and the equivalent qmake
install mechanism. In CMake we need to handle it manually.

Also detect usage of wildcards to ensure we use globs for
installation.

Task-number: QTBUG-87818
Change-Id: I8a5db445274fb670d90cf90b38598a6b3326bc44
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-11-12 15:25:06 +01:00
Fawzi Mohamed
d8bd8308f8 pro2cmake.py: support for PAST_MAJOR_VERSIONS in qml_modules
maps qmake QML_PAST_MAJOR_VERSIONS to PAST_MAJOR_VERSIONS in cmake qml
modules, introduced in qtdeclarative qmltyperegistrar: Add
past-major-version option

Change-Id: Ifbee7c87318cc9dc7d7961db80cad518e67ecffe
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-11 20:50:58 +01:00
Alexandru Croitor
5fb956a5dd CMake: Add mapping for qtquick3d's assimp library
The original non-prefixed mapping is kept for qt3d's assimp
library usage.

Adapts to b14b14e9194708cf02df1149bd735f6ce245c3e4.

Change-Id: I1beb48854ef3088a23e1d67ff855e4b7427024bb
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-11-11 16:34:50 +01:00
Alexandru Croitor
ba0895cf69 configurejson2cmake: Follow up fix to a regression
UnboundLocalError: local variable
 'skip_special_case_preservation' referenced before assignment

Change-Id: Ic7419e0bdd04a4251182d1a2616cd57e89e62432
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-11-10 16:54:53 +01:00
Alexandru Croitor
67693b6cf8 configurejson2cmake: Allow skipping of special case handling
Useful when cleaning up configure.cmake files that might have outdated
content.

Change-Id: I3872e81b7e896de83c1f6635499316bdbe3acb16
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-11-10 14:23:09 +01:00
Alexey Edelev
76230d9879 CMake: Add handling of PLUGIN_EXTENDS for generic plugins
Modify pro2cmake converter to add extra argument to
qt_internal_add_plugin. DEFINE_IF FALSE is added to generic plugins
those had "PLUGIN_EXTENDS = - " specified in .pro files.

Fixes: QTBUG-87861
Change-Id: I9269df19a32a088f5261f50e7ffff6d29c3d605f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-09 18:47:51 +01:00
Edward Welbourne
0ebda39e06 Rename qurltlds-related files to match the header's move
The header is now in src/network/kernel/ rather than src/corelib/io/,
but the qt_attribution.json got left behind and the update program was
still in a sub-dir of util/corelib/. Renamed the latter to
util/publicSuffix/ (second-layer sub-directory was overkill, util/
isn't crowded and it was the only thing in util/corelib/; and there
was no util/network/).  This is a follow-up to
commit 4f076db3d2

Change-Id: I51c2c7892752ddc47390966044eb5650dfdfa9c2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-08 13:02:23 +01:00
Edward Welbourne
a9e4bf7eef Implement binary search in QLocale's likely sub-tag lookup
Follow through on a comment from 2012: sort the likely subtag array
(in the CLDR update script) and use bsearch to find entries in it.

This simplifies QLocaleXmlReader.likelyMap() slightly, moving the
detection of last entry to LocaleDataWriter.likelySubtags(), but
requires collecting all likely sub-tag mapping pairs (rather than just
passing them through from read to write via generators) in order to
sort them.

Change-Id: Ieb6875ccde1ddbd475ae68c0766a666ec32b7005
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-11-08 13:01:33 +01:00
Edward Welbourne
4ab6358039 Reorder locale enums alphabetically
Binary-incompatible change: change the numeric values of QLocale's
Language, Script and Country enums, as encouraged by a comment in the
generator script enumdata.py and clarify documentation around that.

In the process (since I was changing almost every line anyway),
convert the dictionary values from (mutable) lists of length two to
tuples, since they are (and should be) immutable data.

Change-Id: I26222bce45b9f5074b1d81ed70015a75ac34adcd
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-11-08 13:01:18 +01:00
Edward Welbourne
73ceb71576 Use newer names for various languages, territories and scripts
Our enumdata.py namings of countries had fallen somewhat out of sync
with CLDR's names. In the process, support including hyphenation in
the unsquashed name, along with spacing. Distinguish, in comments,
between older renamings and those first seen in Qt6.

Change-Id: I91ec444bf35222ab6a9332e389ace19cca0e4fdf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-08 13:01:12 +01:00
Edward Welbourne
ed853a66f8 Simplify QLocaleXmlWriter::enumData()
Move the repeated List suffix to the __enumTable() helper, where half
the parameter's uses were having to snip it off anyway.

Change-Id: Ia396e87e59ceeb81fc4b0890a86934dc67da10cb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-11-08 13:01:06 +01:00
Edward Welbourne
d11bf5fc24 Check our enumdata.py tables are consistent with CLDR
Compare the code->name mappings we're using to the ones CLDR's
common/main/en.xml provides; report discrepancies. Tolerate tags
missing from en.xml if they're known to the locale-inheritance
machinery.

Change-Id: Ibe96c18bf55984a35de3b3644f3586a9f30720b2
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-11-08 03:14:00 +01:00
Joerg Bornemann
e559da3c6a CMake: Fix detection of the ltcg feature
When checking the value of CMAKE_INTERPROCEDURAL_OPTIMIZATION_<CONFIG>,
then <CONFIG> must be the upper case configuration name.

Also, we must not unset __qt_ltcg_detected, because the feature
condition evaluation happens way after the feature definition, and
__qt_ltcg_detected was not available anymore there.

This commit amends 96bdcdacbc.

Fixes: QTBUG-87874
Change-Id: I2b555bd1d7fbc8973e1d9493045c27d61b0d2c1b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-06 22:03:50 +01:00
Fabian Kosmale
83982ac1c5 pro2cmake: Support QML_PAST_MAJOR_VERSIONS
Change-Id: I47504d6c032c9a6ace7440580f0081cc5f254038
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-06 10:16:30 +01:00
Alexandru Croitor
3680d3453c CMake: pro2cmake: Generate correct CONFIG_MODULE_NAME values
The CONFIG_MODULE_NAME option to qt_internal_add_module is used to
specify what the name of a Qt module's pri file should, as well as
some of the key names assigned in that file, as well as what should be
passed to QT += in qmake projects.
When it is not specified, the computed value is the lower case of the
CMake target name. E.g. for qt_internal_add_module(Core), the computed
CONFIG_MODULE_NAME is 'core'.

The qmake variable that determines the above value is the MODULE
variable.
If it is not explicitly assigned, it's computed from the .pro file
name, rather than from the TARGET variable value.

Thus there is an inconsistency in how the value is auto-computed in
CMake compared to qmake.

We had a few special cases in projects that assign a correct
CONFIG_MODULE_NAME when the auto-computed value was wrong.

Teach pro2cmake to detect these inconsistencies and pass a correct
CONFIG_MODULE_NAME value based on the .pro file name. This way
we get rid of the special cases as well.

Aka if there is no explicit MODULE assignment in the .pro file, and the
auto-computed value by CMake is different from the one computed by
qmake, explicitly write out a CONFIG_MODULE_NAME value with what qmake
would have computed.

Task-number: QTBUG-88025
Change-Id: I166b29767e87cd6b0c681fa53238098355a177f9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-10-30 17:48:57 +01:00
Alexandru Croitor
36e56263d5 CMake: Regenerate qtbase projects
In preparation for some further regeneration.

Also modify pro2cmake to add forgotten mapping for the
Qt::EglFsKmsGbmSupportPrivate module.

Change-Id: I92425c566c2b275b40eec8c652496290754ac385
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-10-30 17:48:50 +01:00
Edward Welbourne
3a1bc4bad5 Purge deprecated language and country codes from QLocale
Requires subsequent re-numbering of the enum tables to eliminate gaps,
before locale data can be regenerated. However, it will work with the
present locale data, since it merely loses the means to use some names
for which the available data was just the name and code. This implies
a transient issue of recognising some codes for which there is no
actual enum member; but relevant code will work as before, finding
nothing but the code and its name. This shall be resolved by a coming
BiC change to resort the language, country and script codes, changing
the numbering (almost) completely.

[ChangeLog][QtCore][QLocale] Various obsolete language and country
codes have been removed. Some lacked locale data, others were obsolete
aliases. All have been deprecated in 5.15.

Task-number: QTBUG-84669
Change-Id: I45fc76a5f2f6c3b0ea3c1bb61e917da984183783
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-10-29 10:44:38 +00:00
Alexandru Croitor
65fe5b2ce2 CMake: pro2cmake: Handle CONFIG+=console app_bundle in examples
Now that qt_add_executable doesn't set the WIN32_EXECUTABLE and
MACOSX_BUNDLE properties anymore, pro2cmake needs to look at the qmake
example projects and generate appropriate set_target_properties calls.

The relevant CONFIG entries to look at are windows, console,
app_bundle and cmdline.

CONFIG += windows implies 'subsystem windows' on Windows, which maps
to WIN32_EXECUTABLE == TRUE.

CONFIG += console implies 'subsystem console' on Windows, which maps
to WIN32_EXECUTABLE == FALSE. Aka the opposite of CONFIG += windows.
Whichever is the last one set, cancels out the other one.

CONFIG += app_bundle implies a macOS bundle executable, which maps
to MACOSX_BUNDLE == TRUE.

CONFIG += cmdline is the same as CONFIG += console and CONFIG -=
app_bundle, aka WIN32_EXECUTABLE and MACOSX_BUNDLE set to false.

In qmake, if no CONFIG is specified in an example project,
the default is CONFIG += windows app_bundle, aka WIN32_EXECUTABLE
and MACOSX_BUNDLE set to true.

The script uses a heuristic to try and not write the properties for
every single subscope, except for values different from the default.
This is not strictly correct, but it covers most use cases, and keeps
the generated projects a bit cleaner.

Task-number: QTBUG-87664
Task-number: QTBUG-86827
Change-Id: If05606ec3205e0fe7c1803c07e114d9fd9c3e4f7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-10-27 12:49:39 +01:00
Edward Welbourne
cb23d50f38 Update CLDR to v37, adding Nigerian Pidgin as a new language
Routine update by running scripts, ignoring clang-format's extensive
grumbles. Added notes to util/locale_database/'s README, on the need
for that, and enumdata.py, on when to add entries. As usual, several
new locales are also added, for existing languages, territories and
scripts.

[ChangeLog][QtCore][QLocale] Updated to new version of CLDR (the
Unicode Consortium's Common Locale Data Repository) v37.

Fixes: QTBUG-84669
Pick-to: 5.15
Change-Id: Ib76848bf4bd1219180faf46820077e8d8049a4e3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-10-26 15:28:59 +02:00
Joerg Bornemann
b9bdea3b07 pro2cmake: Fix singleton declaration
The singleton modifier must be written without square brackets.

Task-number: QTBUG-87684
Change-Id: I924bbf97789edd7f2b4f2b9bbca2cb99841d2906
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-19 16:38:48 +02:00
Alexandru Croitor
c3fee0d984 CMake: Rename add_qt_gui_executable to qt_add_executable
Also adjust pro2cmake to use the new qt_add_executable name
instead of add_qt_gui_executable.

No compatibility functions provided this time, so we'll need to follow
through all repos and regenerate all examples.

Two reasons for not providing compaitibility functions:
1) We don't intend add_qt_gui_executable to be public API
2) A previous case with qtquickcontrols2 and qttools pointed out that
making top-level builds work with cross-compatibility API is not
simple. So just go ahead and regenerate everything.

Task-number: QTBUG-87661
Change-Id: I2f228827b786ae03bf7e1bf3908ea02a8794ed52
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-10-19 11:51:44 +02:00
Alexandru Croitor
8ec4fd9cff CMake: pro2cmake: Handle qt3d library names
Change-Id: Iec582a3c066f64655ed533f8ef1bf0e2de0dc38c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-10-17 12:12:32 +02:00
Orgad Shaneh
8ff44b3aea pro2cmake: GitIgnore .pro2cmake_cache
Change-Id: Ia95c69860e6545d3c7cc59dc45d69b4f77cf794f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-16 14:53:02 +03:00
Orgad Shaneh
f0ab87bb43 pro2cmake: Ignore also initial comment
Change-Id: Id0b27c2a082f78c713e43c6ca846a4fff9ab7a8c
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-10-16 14:53:02 +03:00
Edward Welbourne
8b0e068847 Mark QLocale's Language, Country and Script enums as ushort
The code pervasively presumes their values can be held in a ushort, so
make sure the compiler knows we expect that to work (and doesn't
complain about narrowing when we do convert them to ushort).

Change-Id: Idde7be6cceee8a6dae333c5b1d5a0120fec32e4a
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-10-12 16:53:40 +02:00
Edward Welbourne
48ab30e02a Update util/locale_database/'s README and timezone script instructions
The script told me the wrong path to pass as first argument, so
correct that; and the README didn't mention the need to run it.
CLDR v37 makes no change to the actual generated data, though.
Tweaked wording of a comment in the script.

Task-number: QTBUG-84669
Change-Id: I56b510c666f414d9719cef650aeec6192c4fde6e
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-10-09 14:39:55 +02:00
Ulf Hermann
6443c2215e pro2cmake: Translate qmake's install_qmltypes CONFIG option
We do want to install our qmltypes files ...

Change-Id: I9769da852f92fcd9b1b8a8d093931f8c27d8a3d8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-10-08 16:49:18 +02:00
Allan Sandfeld Jensen
564b59d903 Another round of replacing 0 with nullptr
This time based on grepping to also include documentation, tests and
examples previously missed by the automatic tool.

Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-10-07 23:02:47 +02:00
Ulf Hermann
e1e61daf39 pro2cmake: Allow optional imports in qmldir
In order to funnel this through CMakeLists.txt we add an
OPTIONAL_IMPORTS entry in addition to the existing IMPORTS.

Task-number: QTBUG-87130
Change-Id: I57e882e75d17f5bc68d99ce7837425981fe6938b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-10-07 13:06:11 +00:00
Ulf Hermann
f0068e7b03 CMake: Add library mapping for QmlCompiler
This is necessary for pro2cmake.py to work on qmlcompiler.pro.

Change-Id: I356a6333d3bcc15daf6f2692a2b7ca82c9f37c85
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-05 16:03:56 +02:00
Joerg Bornemann
c09df7b57c CMake: Implement configure -reduce-exports
This option maps to FEATURE_reduce_exports. The feature is on by
default, except for MSVC. The reduce_exports configure test is not used
in the CMake build.

The <LANG>_VISIBILITY_PRESET and VISIBILITY_INLINES_HIDDEN target
properties are now explicitly initialized in the
qt_set_common_target_properties function, because we don't have access
to the feature in QtSetup.cmake where the CMAKE_<LANG>_VISIBILITY_PRESET
variables were set before.

Task-number: QTBUG-85373
Change-Id: I378453f0e0665731970016170302871e20ceb4e2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-05 10:05:20 +02:00
Alexandru Croitor
e0c62a48b8 CMake: Rename internal functions to contain qt_internal
Offer compatibility wrapper functions until we update all of the Qt
repos to use the new names.

Task-number: QTBUG-86815
Change-Id: I5826a4116f52a8509db32601ef7c200f9bd331de
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-09-23 16:59:05 +02:00
Liang Qi
39b1dea2ec xcb: add xcb-util dependency for xcb-image
xcb-image includes xcb_aux.h, which is part of xcb-util.

Fixes: QTBUG-86287
Pick-to: 5.15
Change-Id: I253308008c5baeb1d061ef19f516ae6ab6dff52c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-09-21 12:00:12 +02:00
Assam Boudjelthia
b9c85d6b0e CMake: build add flags for building QtAndroid.jar
Adds -source, -target, -Xlint:unchecked, -bootclasspath flags.

Setting default javac build source and target versions to 8.

Allow setting custom values for javac build versions via
-DQT_ANDROID_JAVAC_SOURCE, and -DQT_ANDROID_JAVAC_TARGET.

Task-number: QTBUG-86282
Change-Id: I98f4f193ac96016dc722d178594d7fd401202f68
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-09-16 20:55:16 +03:00
Joerg Bornemann
96bdcdacbc CMake: Implement configure -ltcg
This configure switch sets the CMake variable
CMAKE_INTERPROCEDURAL_OPTIMIZATION_<CONFIG> per release config to ON.

The feature 'ltcg' is enabled if any of the variables
CMAKE_INTERPROCEDURAL_OPTIMIZATION,
CMAKE_INTERPROCEDURAL_OPTIMIZATION_<CONFIG> are ON.

In order to implement the check, configurejson2cmake had to be extended
to be able to write extra CMake code before and after the feature
definition. This extra code can be added to a feature mapping below the
keys "cmakePrelude" and "cmakeEpilogue".

Task-number: QTBUG-85373
Change-Id: Ia2eb907edcf087f137977a9b090705397f83eb05
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-09-11 11:30:56 +02:00
Joerg Bornemann
069fc33e8a Remove the -no-compile-examples configure switch
If '-make examples -no-compile-examples' was specified, sources of Qt's
examples would be installed, but the examples would not be built.

This switch has always been a source for confusion and is only
interesting for distributors, who can just package the examples
directory tree.

Change-Id: I0291d70e4951d98b553a4abf217db49d05316d3a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-09-11 00:40:46 +02:00
Joerg Bornemann
74c48f0864 configurejson2cmake: Handle expressions of the form "foo != 0"
Such expressions were translated to "foo NOT = 0" which is invalid code.

Change-Id: I8b485bfe1d1f553c08df3b5d59b0f39f2dcbd5c0
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-09-10 18:05:16 +02:00
Allan Sandfeld Jensen
d3ff95dcb8 Round float->qfloat16 to even
Calibrated to match F16C and ARM-FP16 hardware conversions.

Change-Id: I3bdd4d3db3046fee4aeb24e4ce8b9bc9a06e0397
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-09-06 12:35:12 +02:00
Liang Qi
c91d1fdc10 xcb: drop Xinerama support
[ChangeLog][Important Behavior Changes][X11] Xinerama is no longer
supported.

Fixes: QTBUG-86082
Change-Id: Ieb57d9035e1659fc22bf8333247fc3573fb62992
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2020-09-04 17:28:49 +00:00
Joerg Bornemann
067fb7915a pro2cmake: Fix qmake parser's line continuation handling
The qmake parser of pro2cmake handles completely commented lines to make
assignments like this work:

    SUBDIRS = \
       foo \
    #  bar \
       bar

However, assignments like

    SUBDIRS = \
       foo \
       #bar \
       bar

were cut off at the commented line.

Fix this by allowing leading whitespace for "fully commented lines".

Change-Id: Ib5de850a02fd9b9ebb7c056c2f64f9d684334b08
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-09-02 23:44:15 +02:00
Edward Welbourne
78cf89c07d Use checked string iteration in case conversions
The Unicode table code can only be safely called on valid code-points.
So code that calls it must only pass it valid Unicode data. The string
iterator's Unchecked Unchecked methods only provide this guarantee
when the string being iterated is guaranteed to be valid UTF-16; while
client code should only use QString, QStringView and friends on valid
UTF-16 data, we have no way to be sure they have respected that.

So take the few extra cycles to actually check validity in the course
of iterating strings, when the resulting code-points are to be passed
to the Unicode table look-ups. Add tests that case mapping doesn't
access Unicode tables out of range (it'll trigger the new assertion).
Added some comments to qchar.h that helped me understand surrogates.

Change-Id: Iec2c3106bf1a875bdaa1d622f6cf94d7007e281e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-29 18:15:27 +02:00
Edward Welbourne
1fb35832df Simplify initialization of UnicodeData and PropertyFlags structs
Initialize values where they're declared, where possible.

Change-Id: Ib6bf33b27b19c76f406f78bc8a1bd9729bd8f2cd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-28 21:27:51 +02:00
Mitch Curtis
550623a8ef pro2cmake.py: support multiple versions in QT_QML_SOURCE_VERSION
Task-number: QTBUG-86174
Change-Id: I56f4a54874410a19f782ce4dda2e166789570fb9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-23 11:05:15 +02:00
Joerg Bornemann
721812c5d2 CMake: Implement configure -gdb-index
Change-Id: Iea0fb99297751b1baf830a416ea5041d0b9a3b63
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-23 11:05:01 +02:00
Joerg Bornemann
4306fc019a CMake: Fix detection of the 'debug' feature
The debug feature for the CMake build is solely determined by the value of
CMAKE_BUILD_TYPE or CMAKE_CONFIGURATION_TYPES. There is no point in
restricting the autoDetect expression to developer builds or MSVC and
macOS builds.

User-visible result: -DCMAKE_BUILD_TYPE=Debug now actually turns the
'debug' feature on, also for non-developer builds on Linux.

Change-Id: I65c92575c9483bff16beb78b60606c55aeadcece
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-23 11:04:55 +02:00
Joerg Bornemann
7e7c9ba455 CMake: Support configure tests of type 'linkerSupportsFlag'
Task-number: QTBUG-86155
Change-Id: I3764d99cd4ad1c432b499ec9ba7c4c48391fa421
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-23 11:04:46 +02:00
Joerg Bornemann
48cf015906 CMake: Implement configure -optimize-size
This configure switch controls the feature 'optimize_size'.

This isn't merely a mapping to CMAKE_BUILD_TYPE=MinSizeRel, because
we potentially want to combine -optimize-size with -force-debug-info,
which maps to CMAKE_BUILD_CONFIG=RelWithDebInfo.

Task-number: QTBUG-85373
Change-Id: I1a9343ebc54816f52e90e9d33ea3df4c99b1ec9f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-23 11:04:42 +02:00
Joerg Bornemann
729d102b1c CMake: Implement configure -optimize-debug
Task-number: QTBUG-85373
Change-Id: I3aba1fcf96e36544dd75a5e6adc5f770a9a45726
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-20 17:07:53 +02:00
Joerg Bornemann
2f1a55c0b1 CMake: Implement configure -linker [bfd,gold,lld]
Fixes: QTBUG-86155
Change-Id: I5ba2d3b52d9ca240b48904c492f7902a056c0292
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-20 17:07:49 +02:00
Joerg Bornemann
df28355981 CMake: Support configure tests of type 'compilerSupportsFlag'
Task-number: QTBUG-86155
Change-Id: Iaa5c48b6508870a0f6afdf9df66cd2e634fe19b3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-20 17:07:46 +02:00
Edward Welbourne
a111dd26b1 Document the indexing used in the Unicode tables
Make clear why we don't need to assert against out-of-bounda accesses
in the generated code, provided the code point is within its bound,
(Using one table's early entries as indices into later in the same
table at which to look up indices into another table made it a little
hard to work out what was going on, especially as nothing told me
about the early / late distinction. Record what I discovered, to save
the next person to stumble into this some confusion.)

Change-Id: I8e5771a7f3d70c1911aeae1b0cabe5c47bc7e9c7
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-20 09:02:00 +02:00
Joerg Bornemann
5f729da74a CMake: Implement configure -qreal <type>
The configure argument -qreal <type> maps to the CMake argument
-DQT_COORD_TYPE=<type>.

Fixes: QTBUG-83325
Change-Id: I94970f31ccfb241b1dd4f1d9b6cef25d6684dc05
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-19 08:28:50 +02:00
Joerg Bornemann
584d4be174 CMake: Re-implement configure/qmake's command line handling in CMake
We extend configurejson2cmake to read the "commandline"
information from configure.json. This data is then translated to CMake function
calls and written it into commandline.cmake files.

We extend QtProcessConfigureArgs.cmake to pick up those commandline.cmake
files to feed our command line handling code, which is a
re-implementation of the command line handling in qt_configure.prf.

The command line handler sets INPUT_xxx variables, similar to
configure/qmake's config.input.xxx variables. The INPUT_xxx values are
translated
- to -DFEATURE_xxx=ON/OFF arguments if the input represents a feature,
- to corresponding CMake variables if such a variable is known,
- or to -DINPUT_xxx=yyy CMake arguments.

Configure arguments that have an entry in
cmake/configure-cmake-mapping.md are actually implemented. Other
arguments are likely to need more work.

Task-number: QTBUG-85373
Change-Id: Ia96baa673fc1fb88e73ba05a1afb473aa074b37d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-17 08:08:20 +02:00
Allan Sandfeld Jensen
6f0df02d00 Replace Qt CONSTEXPR defines with constexpr
Both normal and relaxed constexpr are required by our new minimum of
C++17.

Change-Id: Ic028b88a2e7a6cb7d5925f3133b9d54859a81744
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-08-14 15:52:58 +02:00
Mitch Curtis
3a356b85e3 Add quickcontrols2impl to helper.py
It's new in Qt 6 after the type registration changes.

Task-number: QTBUG-82922
Change-Id: Id4aa22e50a8d84736688dbf2ab51e12a116177f0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-13 19:31:59 +02:00
Mitch Curtis
349f969cbc helper.py: document extra parameter
Change-Id: Ib21a682af70a6f46fc4b1c779f3d462193209cce
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-08-13 19:31:59 +02:00
Edward Welbourne
ca034e4e50 Inline two macros in the unicode tables
They were only used by one function each, in unicodetables.cpp, so
don't need to be macros.

Change-Id: I3e7f9f661568862d0a0d265bb8f657a8e0782b13
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-12 13:47:56 +02:00
Alexandru Croitor
ecc72bc63d CMake: pro2cmake: Specify library versions for 3rd party libs part 2
Embed package versions into the qt_find_package calls for various
Linux specific packages.

Task-number: QTBUG-82917
Change-Id: I5d1cb623f81932dfae4658b8a3a89eedb71ea3af
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-08-10 11:56:54 +02:00
Alexandru Croitor
3c52f8af9d CMake: pro2cmake: Specify library versions for 3rd party libraries
If certain 3rd party libraries have a version that's not suitable for
Qt, the configure summary should say so, rather than use them and fail
at build time.

With the current situation, we have to duplicate the version
information from the configure.json files in helper.py, by assigning
the version number as an extra find_package variable.

Rerunning configurejson2cmake then embeds this version info into the
qt_find_package calls in configure.cmake.

Some of the Find modules are rewritten to take the  specified version
into account when looking for the libraries.
This involves moving around the code for creating a target, after
calling find_package_handle_standard_args() so we know if a good
enough version was found.

Task-number: QTBUG-82917
Change-Id: I139748d8090e0630cda413362760034dc3483e11
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-08-10 11:56:54 +02:00
Mårten Nordheim
ad1a5bf63f QDecompressHelper: Add brotli support
Task-number: QTBUG-83269
Change-Id: If23b098ee76a4892e4c2c6ce5c635688d8d9138d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-08-06 20:56:42 +02:00
Edward Welbourne
f12ddfaecc Tidy up unicode table generation
Eliminate some needless parentheses, tidy up some spacing and
indentation and split some long lines.  Change first += after
declaration to initializer.

Change-Id: I05ff2a6337b7ed14e0a2dc9c03fc784c92b63515
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-08-05 10:02:11 +02:00
Edward Welbourne
e3e6d58cad Use %zd for size-type formatting in unicode table generator
Qt6 makes sizes qsizetype; and one of these was already sizeof()-sized.
While qsizetype might not be ssize_t, it's at least no bigger, so we
can safely use its format specifier, with a suitable cast.

Change-Id: I433f654f6b139d74b4d5358b804b44ab1f0ada15
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2020-08-04 13:28:34 +02:00
Edward Welbourne
e536fc7975 Fix deprecation warnings (s/hex/Qt::hex/gw) in unicode table generator
Removed three warnings, rather than fixing them, as Konstantin Ritt
tells me they've been redundant since Unicode 6 or so.

Change-Id: I4507e852bceb08a0252c77a8b383aceac212aad9
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2020-08-04 13:28:34 +02:00
Edward Welbourne
b69092b13e Fix compilation error in unicode table generator
Don't include a QString::number() in a sum of QByteArray and C strings.

Change-Id: I7544e835fcf5625b1fe1ee2055a48600200daafd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-08-04 13:28:34 +02:00
Tor Arne Vestbø
a00ad95137 Remove last remaining bits of QtPlatformHeaders
Task-number: QTBUG-84220
Change-Id: I951e04bfe9358a99951d1d61ff47b675584b7f81
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-08-04 07:12:32 +02:00
Linus Jahn
c19bafc60c QtCore: Use system-wide libb2 if present
This adds the option to build Qt with libb2, which is especially
recommended, if you care about the performance of the BLAKE2 hashing
algorithms. The bundled version is the pure reference C implementation
of BLAKE2, while libb2 has many additional hardware optimizations.
However, the API of both is the same, so no changes to the code were
necessary here.

Change-Id: I3563982f4e07be300291fe103c38b16a404b3ebb
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-07-31 15:05:24 +02:00
Alexandru Croitor
4ed483b0e2 CMake: pro2cmake: Fix errors reported by flake8 and mypy
Change-Id: I842c0f8d7ec1d173fa1dbd74e769e2c370e70518
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-07-31 12:55:33 +02:00
Alexandru Croitor
ca103f357c CMake: pro2cmake: Reformat files using black
Change-Id: Ic06840f9877d6b863f48a5eb97fcd6735ab9bde8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-07-31 12:55:33 +02:00
Alexandru Croitor
d65283ebd0 CMake: Teach pro2cmake to convert load(qt_app)
Changes pro2cmake to handle load(qt_app) projects and write out
qt_internal_add_app calls.

Also adds handling of macOS and Windows specific resource files for Qt
apps only.

Task-number: QTBUG-85757
Change-Id: I994d8d19ab2ae366a985cab7894b97d6a278a56f
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-07-31 12:55:32 +02:00
Eirik Aavitsland
db0dc4f1db Remove reference to removed module
The openglextensions module is dicontinued and removed in Qt 6.

Change-Id: I0b98f9b6575026828c188786aeb5c1a62de1f8a3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-07-23 10:18:13 +02:00
Edward Welbourne
d853816307 Fix handling of Suzhou numbering system
This only arises when the system locale tells us to use its zero as
our zero digit, since no CLDR locale uses it by default. Adapt an
MS-specific QLocale::system() test to use Suzhou numbering, so as to
test this.

While updating the locale-restoration code to also restore the digits
being set in that test, add restore code for the long time format,
where previously only the short time format was restored. Add a
comment to make it less likely one of those shall be missed in future.

Fixes: QTBUG-85409
Change-Id: I343324bb563ee0e455dfe77d4825bf8c3082ca30
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-07-17 12:19:01 +02:00
Edward Welbourne
bb6a73260e Support digit-grouping correctly
Read three more values from CLDR and add a byte to the bit-fields at
the end of QLocaleData, indicating the three group sizes. This adds
three new parameters to various low-level formatting functions. At the
same time, rename ThousandsGroup to GroupDigits, more faithfully
expressing what this (internal) option means.

This replaces commit 27d1391280 with a
fuller implementation that handles digit-grouping in any of the ways
that CLDR supports. The formerly "Indian" formatting now also applies
to at least some locales for Bangladesh, Bhutan and Sri Lanka.

Fixed Costa Rica currency formatting test that wrongly put a separator
after the first digit; the locale (in common with several Spanish
locales) requires at least two digits before the first separator.

[ChangeLog][QtCore][Important Behavior Changes] Some locales require
more than one digit before the first grouping separator; others use
group sizes other than three. The latter was partially supported (only
for India) at 5.15 but is now systematically supported; the former is
now also supported.

Task-number: QTBUG-24301
Fixes: QTBUG-81050
Change-Id: I4ea4e331f3254d1f34801cddf51f3c65d3815573
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-07-14 14:52:08 +02:00
Joerg Bornemann
ac14858e85 configurejson2cmake: Use a context manager for file special handling
One can now write
    with special_cased_file("base/dir", "foo.txt") as fh:
        do_something(fh)

This makes the code of processJson a bit clearer, and it allows us to
easily add more files that support the special handling comments.

Change-Id: Ia25d0c0d48df1802c5e2123d05345a88b42a2981
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-07-13 10:51:43 +02:00
Joerg Bornemann
8a0676d5f9 configurejson2cmake: Generalize special case support
The SpecialCaseHandler supported only two file names: "CMakeLists.txt"
and "configure.cmake". Generalize the code to allow for arbitrary file
names. We will use this in a subsequent commit.

Change-Id: I0adada91409a11a369fd1cf2d6ab21cc8f28ba0f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-07-13 10:51:15 +02:00
Dimitrios Apostolou
1e546595e9 Remove unused imports
As found by LGTM.com.

Change-Id: I1704f10f9bab1b11ab22824aca0cfcdcb47fef2f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-07-10 02:36:54 +02:00
Dimitrios Apostolou
3736ebf7c8 Remove duplicate dict entry
As found by LGTM.com.

Change-Id: I9d41fec8a9f80fe9cb1cae960418032f84646a99
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-07-10 02:36:40 +02:00
Dimitrios Apostolou
efdfdfa0fc Remove dead code
Found by LGTM.com.

Change-Id: I661e2287a6964b63d5b03c8913bc4b09f21ffdf1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-07-10 02:36:25 +02:00
Alexandru Croitor
b1f8ca8032 CMake: Fix various issues with the Android build
Certain resources and compiled jar files have to be copied into the
non-prefix build dir location. They were previously only installed,
which doesn't do anything in a non-prefix build.

Change pro2cmake to generate code that places the compiled java
jars into QT_BUILD_DIR, so that non-prefix builds work.

Place the module dependencies xml files into lib folder in non-prefix
builds.

Don't special case the output and install location of the Android QPA
plugin.

Task-number: QTBUG-85399
Change-Id: I4ac9d3929ea8ecc95ec99a77e621ad2121b68832
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-09 11:56:31 +02:00
Jarek Kobus
a7f9d5a7fa Use QList instead of QVector in util
Task-number: QTBUG-84469
Change-Id: I077fb5c32456d438a457c1f73852313ea2ea9ae5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-07-07 20:34:48 +02:00
Alexandru Croitor
7ad5c5346f CMake: pro2cmake: Remove dead code regarding resource retaining
qtdeclarative as of 41864db3b61d9e81a9fe4906918d2cd3d6d32a0c always
retains the resources, so there's no manual facility for retaining
left. Remove the code.

Change-Id: If79b66683897b5f430844e13c0230e41a2cf061d
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-07 11:48:46 +02:00
Alexandru Croitor
19b04f6928 CMake: pro2cmake: Fix handling of QT_SKIP_QUICKCOMPILER
If a file was part of a resource that has a non-empty base directory,
the script generated set_source_files_properties calls to the file
path without including the base dir, which means the command did
nothing.

The script should set the QT_SKIP_QUICKCOMPILER on the full file path
if a base dir is present, similar to how the alias handled.

Refactor the alias property writing code to write all properties
into the command that uses the full correct path.

Change-Id: Ic75d51ecf60eef3ada9bd6ca26882de3447896e9
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-07-07 11:48:45 +02:00
Lars Knoll
a46caf087c Simplify Q_ARRAY_LITERAL
And clean up some unused pieces of code.

Change-Id: I285b6862dc67b7130af66d3e08f652b1a56b990e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-07-06 21:30:06 +02:00
Tor Arne Vestbø
8dd6957cd7 Make QtPlatformHeaders a private module
The APIs will be reintroduced as part of the new platform interface
API where appropriate.

Clients that still depend on the platform headers can include it
via QT += platformheaders-private.

Change-Id: Ifbd836d833d19f3cf48cd4f933d7fe754c06d2d9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-07-06 11:52:14 +02:00
Joerg Bornemann
943340222e CMake: Generate qdevice.pri when cross-building
This adds the CMake equivalent to the classical -device-option key=value
configure argument:
-DQT_QMAKE_DEVICE_OPTIONS=key1=value1[;keyN=valueN]
The keys and values get dumped verbatim into qdevice.pri.

This patch also ports the machineTuple configure test. Its result is
written into qdevice.pri as value for the GCC_MACHINE_DUMP variable.

Change-Id: I29f2323fd87639fafaed99ec7446c7ee75504705
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-06-29 12:47:59 +02:00
Alexandru Croitor
7fcc9cf055 CMake: Create a Find module wrapper for OpenGL
Our .prl files embedded an absolute path to the OpenGL.tbd file. This
obviously breaks their usage when used on another machine when no SDK
exists.

To fix that we need to use a "-framework OpenGL" linker flag instead
of linking against the absolute path library.
To convince CMake to do that, we have to create a wrapping
OpenGL target which sets an appropriate INTERFACE_LINK_LIBRARIES
property.

So create a FindWrapOpenGL find module to do that on darwin platforms.
Adjust helper.py and our build system to use it.

This tangentially amends 38cd18384f
because it recreates the FindWrapOpenGL module, but for a different
purpose.

Task-number: QTBUG-85240
Task-number: QTBUG-84781
Change-Id: I3498c19157ae31db5099e6edfb9d71490187f1d3
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-06-29 12:22:49 +02:00
Joerg Bornemann
f6b7b64ed0 CMake: Adjust conversion scripts to iconv changes in qt5compat
Change-Id: I8e06a09768bd3554500d666273060d2e130965b8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-06-28 17:17:02 +02:00
Ulf Hermann
fd52a6fcb9 pro2cmake.py: Parse qmldir import statements with versions
You can write the following in a qmldir file these days:

import QtQuick auto
import QtQml 2.4

pro2cmake should understand and convert these to cmake.

Change-Id: Ica1728de0c8d7a0b2b5aa341d20e60b23dfa7fe1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-06-24 15:49:35 +00: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
Giuseppe D'Angelo
3e1d03b1ea Port Q_STATIC_ASSERT(_X) to static_assert
There is no reason for keep using our macro now that we have C++17.
The macro itself is left in for the moment being, as well as its
detection logic, because it's needed for C code (not everything
supports C11 yet).  A few more cleanups will arrive in the next few
patches.

Note that this is a mere search/replace; some places were using
double braces to work around the presence of commas in a macro, no
attempt has been done to fix those.

tst_qglobal had just some minor changes to keep testing the macro.

Change-Id: I1c1c397d9f3e63db3338842bf350c9069ea57639
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-19 19:38:23 +02:00
Alexandru Croitor
7e03bc39b8 CMake: Improve sanitizer detection
The change fixes the labels to show up correctly in the configure
summary.
It also allows enabling the sanitizer via the feature flags, e.g.
-DFEATURE_sanitize_address=ON.
Finally the qtbase sanitizer option is saved in QtBuildInternalsExtra
so that repos built after qtbase have the same sanitizer options
enabled.

Change-Id: Ic9d9e3ce3c7ebbc244ced2e6d163d1ac8ee06b12
Fixes: QTBUG-84721
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-06-15 18:41:35 +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
Eirik Aavitsland
56f40cdca6 Remove the openglextensions module
[ChangeLog][General] The QtOpenglExtensions module has been
discontinued. It provided only convenience functionality for certain
direct OpenGL usage. With the new RHI graphics API abstraction, that
is no longer a primary use case. Applications that still need to
access that API have a number of alternative options, including
QOpenGLExtraFunctions.

Fixes: QTBUG-84085
Change-Id: I272af61c69ebcec207b576d67d08b59623d485ec
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-06-10 09:35:04 +02:00
Ulf Hermann
910804a420 pro2cmake: Parse "optional plugin" from qmldir files
Task-number: QTBUG-84639
Change-Id: Iedfa2e53c686a7c7c855efc7b9deee097a15f4b7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-06-09 14:10:10 +02:00
Tor Arne Vestbø
93a04332eb Move QtAccessibilitySupport into QtGui
Task-number: QTBUG-83255
Change-Id: Ibc1b38e77c3c90030a832c41f4de65c6c38bc91d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-06-02 23:32:36 +02:00
Jannis Voelker
33fc2ff663 Adds library mappings for the Qt OPC UA module in helper.py
Change-Id: I64bee2a7c149b8e4b14b71103ebc748c32993145
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-06-02 23:12:56 +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
Laszlo Agocs
e3361c1614 CMake: Update src\gui\configure.json and the conversion script
The ANGLE removal's manual configure.cmake changes are now replaced
by updating the conversion script's special cases instead.

Change-Id: I06317fe0202b25bd9f9524da14e1bb0ccbb30cc1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-29 23:23:02 +02:00
Alexandru Croitor
c4e09cf267 CMake: pro2cmake: Check existence of QMLTYPES_INSTALL_DIR
When writing the qt6_qml_type_registration call, make sure to write
the set(QT_QML_MODULE_INSTALL_QMLTYPES TRUE) statement only if an
explicit path was provided via
QMLTYPES_INSTALL_DIR / QT_QML_MODULE_INSTALL_DIR.

This will remove the QT_QML_MODULE_INSTALL_QMLTYPES property from
many examples and tests in qtdeclarative, thus not installing the
.qmltypes file into the Qt prefix, thus polluting it.

Task-number: QTBUG-84403
Change-Id: I5c64d42915896d14f2591cbb64d73d912dbf7c7d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-05-29 17:17:18 +02:00
Volker Hilsheimer
37eb5d38aa Add SvgWidgets library
Change-Id: I243aa35a0628f80219b589a0ba943ec1a25bb972
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-05-29 16:58:43 +02:00
Tor Arne Vestbø
7172b5112e Move QtPlatformCompositorSupport into QtOpenGL
Task-number: QTBUG-83255
Change-Id: Id9ea654db8efb00b487d53aea03d7f23a7ab1a54
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-05-28 21:39:48 +02:00
Dimitrios Apostolou
52f218ee83 Change const arrays to constexpr
so that they can be used with Q_STATIC_ASSERT().
Also constify more another array.

Change-Id: I1e7208127e06abb33af9bdc46712657af5dc98fe
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-05-28 10:48:58 +02:00
Dimitrios Apostolou
fa81b3ebe2 Update paths pointing to old locations
Change-Id: I2fb14834b34827ed4e84e9f7dc0791aa810a32ce
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-05-28 10:48:58 +02:00
Dimitrios Apostolou
5b3c3ff97e Improve readability of the autogenerated arrays in qurltlds_p.h
The next time qurltlds_p.h is generated, array sizes shall be explicit.
Also added some helpful comments. And updated copyright date.

Change-Id: I2bc9a78bcc2982845fce75a413e2048b0bfd12a0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-05-28 10:48:57 +02:00
Friedemann Kleint
9c31acbf47 Move windowsuiautomation API support into QtGui
Task-number: QTBUG-83255
Change-Id: Ibface71931b6384494842ba9744d76f738c5ca85
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-05-27 22:28:41 +02:00