Commit Graph

1156 Commits

Author SHA1 Message Date
Joerg Bornemann
e60c41ac0a pro2cmake: Enable AUTOUIC only if the project has FORMS
Change-Id: I1bf232fa3c389eb86707d3af04de6cf9eb09451a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-08 03:45:29 +01:00
Joerg Bornemann
1c2f6d2ace pro2cmake: Write only one find_package call for Qt packages
Task-number: QTBUG-96799
Change-Id: I1eb8ac05f360b74e5ae1217b5535a33227b5084b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-08 03:45:29 +01:00
Joerg Bornemann
f5a8d70dee pro2cmake: Add LibraryMapping.components
LibraryMapping.components is a list that holds the sub-components of a
CMake package.  Before, we held this information in
LibraryMapping.extra as find_package argument.

A subsequent patch will make use of LibraryMapping.components and
doesn't have to do find_package argument parsing.

Change-Id: Ie0d317245fb6ec1511e06b2e14c364292fced63a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-08 03:45:29 +01:00
Joerg Bornemann
b28f436cd4 pro2cmake: Make generated examples use qt_add_qml_module()
We prefer it when the CMakeLists.txt project files for examples use
qt_add_qml_module() when adding resource files, rather than
qt6_add_resource().

A bit of refactoring was needed to re-use the code that extracts
resource information from the .pro file.

The new function write_qml_module is now responsible for writing
qt_add_qml_module calls.

Task-number: QTBUG-96799
Change-Id: I74dc2d681dcf4fc848e1147b3232ce9a9e0946c9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-08 03:45:29 +01:00
Kai Köhne
71af0d7059 Re-add missing 'we mean it' header
This got lost in commit b852584556 .
Also augment util/x86simdgen/header so that the header is
automatically included when qsimd_x86_p.h is re-generated.

Change-Id: I3e59b983f78b8c1aced3757e1aa5dceb6d653d97
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-03-07 14:04:25 +01:00
Joerg Bornemann
f56c068ee0 pro2cmake: Fix indentation of INSTALL_EXAMPLESDIR assignment
Change-Id: If1f5d8b5afc76fac62fdf9836a17c4ab87ddc1b1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-03 15:56:08 +01:00
Joerg Bornemann
3d6c86ec57 pro2cmake: Fix static type errors in condition_simplifier_cache.py
Mypy reported the following:

condition_simplifier_cache.py:111: error: Argument 1 has incompatible type "*List[str]"; expected
"Optional[float]"
            file_handle = file_open_func(*file_open_args, **file_open_kwargs)
                                          ^
condition_simplifier_cache.py:111: error: Argument 2 has incompatible type "**Dict[str, object]";
expected "Union[str, Path]"
            file_handle = file_open_func(*file_open_args, **file_open_kwargs)

Fix by calling portalocker.Lock directly.

Change-Id: I538319791b1a4a1b6dffac0544d87c705e8809a7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-03 15:56:08 +01:00
Alexandru Croitor
34a4fe0166 CMake: Rename FindZSTD to FindWrapZSTD
And the target ZSTD::ZSTD to WrapZSTD::WrapZSTD.
This should allow building Qt with the
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON set.

Pick-to: 6.2 6.3
Fixes: QTBUG-100537
Change-Id: I748601e4ad6f518323bf1034d6fc1de582c815e1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-02-28 23:08:20 +01:00
Joerg Bornemann
268767e9a1 pro2cmake: Update README.md
Mention that flake8 and black can be run via Makefile targets.

Remove the outdated list of flake8 warnings.  The Makefile ignores more
warnings/errors, and it doesn't seem to be useful to duplicate this list
here.

Also remove the description of the black tool's arguments for the same
reason.

Change-Id: I941c3ab68b7a3d2477f7fbb5d28603987d0b2cab
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-02-28 15:41:22 +01:00
Joerg Bornemann
dece6f17e6 pro2cmake: Set a project version for examples
For example projects, change the generated project() call to
   project(foo VERSION 1.0 LANGUAGES CXX)

Some CMake API derives default values from the project version, and it's
generally advisable to set a project version number.

The version number is read from qmake's VERSION variable.  That's
actually a target version number, but it might be the right thing in
most cases.  Fall back to version 1.0 if VERSION is not set.

Task-number: QTBUG-96799
Change-Id: Ia0c551cf62621eb217e1dd541dcbd8945f78138e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-02-28 15:41:18 +01:00
Alexandru Croitor
2389aaf8c7 pro2cmake: Handle qmake condition operator precedence
Unfortunately qmake does not have operator precedence in conditions,
and each sub-expression is simply evaluated left to right.

So c1|c2:c3 is evaluated as (c1|c2):c3 and not c1|(c2:c3). To handle
that in pro2cmake, wrap each condition sub-expression in parentheses.

It's ugly, but there doesn't seem to be another way of handling it,
because SymPy uses Python operator precedence for condition operators,
and it's not possible to change the precendece.

Fixes: QTBUG-78929
Change-Id: I6ab767c4243e3f2d0fea1c36cd004409faba3a53
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-02-28 15:41:11 +01:00
Joerg Bornemann
6708fad936 pro2cmake: Fix test_realworld_comment_scope
Change the expected value from None to [], because that's the value of
the if branch.  It has been like that since v6.0.0 at least.

Change-Id: Iefdb22a772fc5540ad5a38566be5a7f529e00cb1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-02-28 15:40:43 +01:00
Joerg Bornemann
7b8913b1ba pro2cmake: Remove superfluous call to _simplify_flavors_in_condition
If the flavors argument is an empty list, this function becomes the
identity function.

Change-Id: I534df079578ff27d24ae15760ea12464e3961f93
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-02-28 15:40:39 +01:00
Joerg Bornemann
e33c88a36d pro2cmake: Fix test_scope_handling.py
When the android-embedded scope was removed in
7a4b586f4b, the conditions in
test_scope_handling.py were adjusted following the laws of logic.
However, the scope handling code does not follow the same laws.

Effectively revert the part of said commit in test_scope_handling.py but
use "UNKNOWN_PLATFORM" instead of "ANDROID_EMBEDDED".

Change-Id: Ic090451e2a28b50f5be5668503e216cbe3871633
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-02-28 15:40:36 +01:00
Joerg Bornemann
8a6899239a pro2cmake: Re-format sources with black
...to have a consistent baseline for further improvements.

Change-Id: Iba8e83a7a5cf5ca0cdf509f79e7d2dc2d8f42fec
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-02-28 15:40:32 +01:00
Thiago Macieira
d581778251 qedidvendortable.py: include something before using macros
Since it's a private header, qglobal_p.h makes sense.

Change-Id: Ibf4acec0f166495998f7fffd16d5d8a38ee8f1f8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2022-02-24 12:07:00 -08:00
Ievgenii Meshcheriakov
7a58ca2d3a Remove util/publicSuffix
This program was replaced by psl-make-dafsa.

Task-number: QTBUG-95889
Change-Id: If52d92734ad362364c6250473281886e1ea5545d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-02-24 19:36:26 +01:00
Thiago Macieira
b2298b7e94 qsimd_p.h: let the generator script generate the ARCH target strings
__attribute__((target("arch=xxxx"))) does not work because the compilers
(GCC at least) don't test the CPU features that they are targeting, so
we keep getting "inline failed" compiler errors.

GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90129

Upstream patch: https://github.com/opendcdiag/opendcdiag/pull/59

Change-Id: I6fcda969a9e9427198bffffd16cea09fda4406d2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-02-19 13:40:21 -08:00
Thiago Macieira
b852584556 qsimd: update the generator script from OpenDCDiag
I'd been making changes to that and improving it for the past 2 years
without bringing it back into Qt.

The list of features is mostly the same, except:
- removed TSX features
- removed features specific to Xeon Phi processors
- added CET and AVX512FP16 features
- added the bit for hybrid CPU detection

See matching update at https://github.com/opendcdiag/opendcdiag/pull/49

Change-Id: I6fcda969a9e9427198bffffd16ce860b5a38aece
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-02-18 15:46:41 -08:00
Dimitrios Apostolou
c37d0e84bc Clean up QNX platform configs and improve testrunner scripts
QNX requires its own TESTRUNNER script in order to SSH to the QEMU guest
and run the tests. Simplify it a lot and fix the way it passes arguments
so that they retain spaces and quotation.

Also wrap it with the generic TESTRUNNER script for CI, which is
qt-testrunner.py, so that tests can re-run in case of flakiness.

Delete prefix.sh as the environment variables are now properly set in
the Coin platform config files.

Avoid executing extra chmod commands to make scripts executable,
but use the right Coin instruction for that. For reference, we
use 493 for file mode which equals to 755 in octal, as Coin expects
the file mode in decimal.

Change-Id: Ife4d1caef606f48b92ba1da1cfb14ec0dea11ef2
Reviewed-by: Pasi Petäjäjärvi <pasi.petajajarvi@qt.io>
2022-02-14 12:56:06 +01:00
Jani Heikkinen
994fd04b2b Bump version to 6.4.0
Change-Id: Ie0e2133d6c9125b901364c979c60b6efd585f026
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2022-01-31 17:20:06 +02:00
Dimitrios Apostolou
b013f94086 Write XML test log files even for the flaky test re-runs
Previously the qt-testrunner script was avoiding to write XML log files
for the flaky test re-runs, since parsing them always provides limited
information about what went wrong (for example unparseable files) and
might miss issues completely (for example a crashed test might not even
write a log file), or even mislead if multiple different data points
about a single testcase end up into the database..

But currently Coin is the system that uploads test information to the
testresults database and expects to find such log files in an attempt to
send as much information as possible regarding failures.

Re-enabling these log files will allow Coin to deduce as much
information as possible about the test runs.

This is a temporary step at least, until the test-uploading logic is
separated from Coin. Then it will be easier to find the full information
about what happened with flaky or crashed tests by special logs from
qt-testrunner.py, which is the test re-running orchestrator and
therefore has more knowledge about what went wrong.

Fixes: QTQAINFRA-4754
Change-Id: I69e4469cbe6c0a6ca5b2473eaf8d034632564342
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Toni Saario <toni.saario@qt.io>
Reviewed-by: Simo Fält <simo.falt@qt.io>
2022-01-30 01:00:35 +01:00
Dimitrios Apostolou
b4d9d5c89c qt-testrunner: do not try to re-run initTestCase and others
Some function names are special for qtestlib, in the sense that they can
not be specified as a command line argument to run individually.

In such cases qt-testrunner treats the failure specially and tries once
to re-run the full test executable.

Fixes: QTBUG-89011
Change-Id: I0cc25f91c57374e5ac65ade10e2e223fe969f211
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
2022-01-30 01:00:35 +01:00
Joerg Bornemann
eced23b6a8 Don't set CMAKE_AUTORCC in pro2cmake.py
To tool generates calls to qt6_add_resources instead, and we don't want
to promote the usage of CMAKE_AUTORCC.

Task-number: QTBUG-87643
Change-Id: I58458416514949a6ffc9b93c7eb6d24bc2ed01ca
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-01-21 19:54:13 +01:00
Joerg Bornemann
dc2c590b1a pro2cmake: Fix exception with newer pyparsing module
The pyparsing module's debug action properties have been renamed.
Check the existence of the attributes before assigning.

Change-Id: I8fff652304a0af215c56f54b63d613a1f6a5207a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-01-21 19:54:13 +01:00
Dimitrios Apostolou
5180e70dbe qt-testrunner: be more clear that it was the test that crashed
Task-number: QTBUG-99970
Change-Id: Id2d01b6ab7d428356d9dfc953107014791393d35
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2022-01-18 19:43:54 +01:00
Edward Welbourne
755b0aa681 Turn a condition into a lambda to save needless evaluation
The public suffix list scanner's utf8encode()'s main loop always
worked out whether a character is a hex digit, even when it didn't
need to know. Package the computation in a lambda and only test it
when it is needed. Also assert non-empty input generates non-empty
output.

Change-Id: Iaf48aad382624e421cea9c9cdb8bba5fc47b1596
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
2022-01-18 16:23:56 +01:00
Dimitrios Apostolou
3acfd39653 qt-testrunner: disable JUnit XML test logs
It causes crashes because of interleaved execution of Quick tests.

Task-number: QTBUG-98350
Change-Id: I61e26f5da5617e06810db8eb7991f17eecdd3acb
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-01-12 16:14:18 +01:00
Dimitrios Apostolou
98f1034f96 Properly wait for the Android emulator to fully boot
It had been noticed that sometimes the Android emulator in our CI took
several minutes to fully boot. It turns out that this behavior can be
reproduced locally by removing the image files under $HOME/.android
especially the "userdata-qemu.img.qcow2" file.

Then the emulator goes through several reboots until fully booted with a
full set of packages installed. We discovered that the property that
signifies it is finished is dev.bootcomplete=1. So we now check for this
flag and remove the other heuristics we had.

We also disable the debug output to avoid hundreds lines of
logs. Instead we selectively print the values that the emulator returns,
every second until full boot is detected.

We increase the Coin timeout for the shell script, from 5min to 10min,
since it has been measured that it takes about 2.5min on a good day, and
the script itself retries several times to restart the emulator in case
of failure.

Finally we adjust the coding style a bit to be more consistent.

Pick-to: 6.3 6.2
Fixes: QTQAINFRA-4681
Change-Id: I77062dceb91477e957696c89bfacb4ebabc34c1f
Reviewed-by: Toni Saario <toni.saario@qt.io>
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-07 19:34:50 +01:00
Dimitrios Apostolou
c8e0a742fb Wait for boot to be fully complete with all packages installed
It happens that the android emulator supposedly "finishes" booting and
getprop shows bootanim=stopped and boot_completed=1. But sometimes not
all packages have been installed (`pm list packages` shows only 16
packages installed).

After around half a minute the boot animation starts spinning
(bootanim=running) again despite boot_completed=1 all the time. After
some minutes the boot animation stops again and the list of packages
contains 80 packages, among which is also the "development" package.
Only then is the device ready for `adb install` of custom packages.

This should be the last time we see the message:

Error: Could not access the Package Manager.  Is the system running?

Just for completeness, we also properly disown the emulator process and
its file descriptors, since the parent shell dies but the process stays.

Pick-to: 6.3 6.2
Fixes: QTQAINFRA-4681
Change-Id: I2b9d4bdc3dac0f10d09d4f09c83b4028ebc31f48
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
2022-01-06 17:14:58 +01:00
Dimitrios Apostolou
8bf1beb9bd Do not hide android emulator output
It might print useful messages, even though they might come mixed with
other test messages.

However we can't leave stdout/stderr as is, because Coin agent hangs at
the end of the shell script, waiting for them to close. So we just
redirect them to a file.

Pick-to: 6.3 6.2
Change-Id: I797af78786b7df31131b3c3261e1c1fc00e5d460
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
2022-01-06 14:34:15 +01:00
Dimitrios Apostolou
0aaf514042 Wait for android emulator to be up and running properly
Pick-to: 6.3 6.2
Fixes: QTQAINFRA-4681
Change-Id: Icfa75b6982964970172726379e5a2a2bb640f8bf
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
2022-01-06 14:34:09 +01:00
Dimitrios Apostolou
24572fccae Enable verbose logging in the last re-run of a failing test
Fixes: COIN-728
Change-Id: I08802e377e26e5dd7f7d1c44b5efe4280b09f957
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
2022-01-03 17:40:35 +01:00
Dimitrios Apostolou
63ffae3fa3 Introduce qt-testrunner.py
Script that wraps Qt test execution in order to iron-out flakiness.

Task-number: QTBUG-96353
Change-Id: Ie8ee780e3f4f8d086c080a7784f9f68fd1867be2
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
2022-01-03 16:32:56 +01:00
Ievgenii Meshcheriakov
4f53c703e4 QLocale: Extend support for language codes
This commit extends functionality for QLocale::codeToLanguage()
and QLocale::languageToCode() by adding an additional argument
that allows selection of the ISO 639 code-set to consider for
those operations.

The following ISO 639 codes are supported:
    * Part 1
    * Part 2 bibliographic
    * Part 2 terminological
    * Part 3

As a result of this change the codeToLanguage() overload without
the additional argument now returns a Language value if it matches
any know code. Previously a valid language was returned only if
the function argument matched the first code defined for that
language from the above list.

[ChangeLog][QtCore][QLocale] Added overloads for codeToLanguage()
and languageToCode() that support specifying which ISO 639 codes
to consider.

Fixes: QTBUG-98129
Change-Id: I4da8a89e2e68a673cf63a621359cded609873fa2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-12-09 03:45:08 +01:00
Morten Johan Sørvig
d3646d2b05 Say hello to qtwasmserver
Development web server for web applications. Supports
http and https. Sets COOP and COEP headers.

The web server script supports certificate generation using
mkcert (github.com/FiloSottile/mkcert). Briefly, mkcert
supports generating server certificates for the current
local ip address(es), using a certificate authority
which can be installed on devices where the app should
run.

The COOP and COEP headers are required to enable the
SharedArrayBuffer API, which is required for Emscripten’s
pthreads implementation.

The server serves the current directory on localhost
by default. Use the “-a” argument to bind to an additional
address, or "--all” to bind to all IPv4 addresses found on
local network interfaces. Change the directory by passing
it as a positional argument.

Task-number: QTBUG-79087
Change-Id: Id0cba649e42af53ed8106e336a77e78398bcf901
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: David Skoland <david.skoland@qt.io>
2021-12-06 16:36:09 +01:00
Ievgenii Meshcheriakov
aee0021fc8 QLocale: Add support for Kaingang and Nheengatu languages
Update the locale generation script to support Kaingang and
Nheengatu languages. These are new in CLDR v40. Regenerate
the locale data.

Task-number: QTBUG-94358
Change-Id: I5195d5161d8c4d9f17129bbcfde39dfd3fcf1cd5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-11-10 00:36:12 +01:00
Ievgenii Meshcheriakov
2c505eea01 locale_database: Add entry for 'South Sudan Standard Time'
This timezone is new in CLDR 40, Olson database calls it Africa/Juba.
The offset is UTC+2.

Reference: https://techcommunity.microsoft.com/t5/daylight-saving-time-time-zone/2021-time-zone-updates-for-republic-of-south-sudan-now-available/ba-p/2234981

Task-number: QTBUG-94358
Pick-to: 6.2
Change-Id: Ib70dbd9b472eb9cf8cb62a0eb5e241199148c077
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-11-10 00:36:11 +01:00
Ievgenii Meshcheriakov
7d7663cfc4 Use a HTTPS URL for the CLDR download link
FTP is insecure and is not supported by modern browsers anymore.

See also: https://mywiki.wooledge.org/FtpMustDie

Change-Id: Iad65d29912e79a4f3fadb9317bb5d9c5fe9b68d7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-11-05 19:32:23 +01:00
Joerg Bornemann
6ab16d52d2 configure: Remove unused facility to define variable assignments
The function qt_commandline_assignment and everything related to it is
removed from configure.  It was only used in qtbase, and all usage has
been removed.

More general variable assignments will be added in a subsequent commit.

Task-number: QTBUG-88210
Change-Id: I7cfa782e89914f2b0dc0277c46e425c8a825557e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-11-01 22:32:01 +01:00
Assam Boudjelthia
a81f24ada5 Rename deprecated ANDROID_SDK_HOME to ANDROID_SDK_ROOT
Pick-to: 6.2
Task-number: QTBUG-97002
Change-Id: I777491f542e5388e04ed4c1b7ff5d9db75f9e778
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2021-10-22 17:21:10 +02:00
Ievgenii Meshcheriakov
826fc8c9bd Update UCD to Revision 28
This corresponds to Unicode version 14.0.0.

Added the following scripts:

    * CyproMinoan
    * OldUyghur
    * Tangsa
    * Toto
    * Vithkuqi

Full support of these scripts requires harfbuzz version 3.0.0,
this version adds support for Unicode 14.0:

    https://github.com/harfbuzz/harfbuzz/releases/tag/3.0.0

With this release 10 test cases in tst_qurluts46 were fixed, one
additional test case is failing in tst_qtextboundaryfinder and
is commented out. In total 62 line break test cases and 44 word
break test cases are failing.

A comment in src/corelib/text/qt_attribution.json was updated to
include the URL of the page containing UCD version number.

Fixes: QTBUG-94359
Change-Id: Iefc9ff13f3df279f91cbdb1246d56f75b20ecb35
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-10-18 16:45:10 +00:00
Joerg Bornemann
f19668ce65 Don't use libs in /usr/local for configure tests by default on macOS
Since commit f3c7d22dd0 we do not use
libraries from /usr/local and other non-system locations on macOS.  But
our configure tests still did.  This led to discrepancies between
find_package calls in configure tests and the Qt project itself.

Mentioned commit removed /usr/local and friends from
CMAKE_SYSTEM_PREFIX_PATH.  But we can't pass this variable to the
configure tests, because CMake sets it up and overwrites our value.

Pass CMAKE_SYSTEM_PREFIX_PATH and CMAKE_SYSTEM_FRAMEWORK_PATH as
QT_CONFIGURE_TEST_CMAKE_SYSTEM_{PREFIX|FRAMEWORK}_PATH variables to
tests.

Tests with separate project files that call find_package() must add code
like this after the project() command:

if(DEFINED QT_CONFIGURE_TEST_CMAKE_SYSTEM_PREFIX_PATH)
    set(CMAKE_SYSTEM_PREFIX_PATH
        "${QT_CONFIGURE_TEST_CMAKE_SYSTEM_PREFIX_PATH}")
endif()
if(DEFINED QT_CONFIGURE_TEST_CMAKE_SYSTEM_FRAMEWORK_PATH)
    set(CMAKE_SYSTEM_FRAMEWORK_PATH
        "${QT_CONFIGURE_TEST_CMAKE_SYSTEM_FRAMEWORK_PATH}")
endif()

Adjust pro2cmake accordingly.

Task-number: QTBUG-97076
Change-Id: Iac1622768d1200e6ea63be569eef12b7eada6c76
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-10-08 23:15:31 +02:00
Ievgenii Meshcheriakov
906cb8d4ef Remove util/harfbuzz/update-harfbuzz
This is not the correct script to update harfbuzz. The correct one is
src/3rdparty/harfbuzz-ng/import_from_tarball.sh

Change-Id: Ic9ed43cae591cd6957effb10f557166c43498ad9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2021-10-05 21:53:10 +02:00
Ievgenii Meshcheriakov
394f8a9c4b Unicode: Add script to facilitate UCD update
Add a script that downloads UCD data for a given Unicode version,
unpacks it, and copies the used files to appropriate locations inside
the Qt source code.

Also update the README and use an HTTPS link for the UCD data file.
FTP links are no longer supported by some browsers.

Task-number: QTBUG-94359
Change-Id: I2aa70a588f675e411fa6b3ce5b4444a7c07ed707
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-10-05 20:38:02 +02:00
Alexandru Croitor
9665929706 pro2cmake: Generate public CMake API code for projects by default
Previously pro2cmake assumed that all .pro were internal Qt projects
like qtbase/src/corelib.pro and generated private api calls like
qt_internal_add_module().

Public CMake API calls (like qt_add_executable) were only generated if
an --is-example command line flag was passed to the script or if the
.pro file was located under the examples subfolder of a qt repo source
directory (indicated by the presence of a .qmake.conf file).

Change the logic to always generate public CMake API code by default,
unless a .cmake.conf/.qmake.conf file is encountered with a valid repo
module version inside, in which case apply the old heuristic of
checking for the ./examples subfolder.

The intention is to have a sensible default so that Qt users can use
the script to more easily migrate their qmake projects without having
to explicitly specify the --is-example flag.

Pick-to: 6.2
Task-number: QTBUG-96799
Change-Id: I38f4f1b349a5b9688cf7bc5914d4fde72e660a98
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-09-27 21:36:36 +02:00
Alexandru Croitor
124f7c681f pro2cmake: Augment searching of .qmake.conf with .cmake.conf
Adapt to fb656c036d which removes
.qmake.conf files in repos by searching for either .qmake.conf or
.cmake.conf.

The locations of those files are only used to compute relative paths
based on the directory where the conf file is.

For now, remove the warning if a conf file is not found, because we
intend to change the script to generate user project code by default,
instead of Qt internal project code and the warning looks scary.

Pick-to: 6.2
Task-number: QTBUG-96799
Change-Id: I301e93d2ce5c05a52877eb6ed9eb9cee54fc5b15
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-09-27 21:36:33 +02:00
Joerg Bornemann
a0e56294c1 Skip unnecessary commands when cross-building tools
Introduce a new macro qt_internal_return_unless_building_tools which
simply calls return() if tools are not built.  This macro is supposed to
be called after qt_internal_add_tool().

Using this macro avoids having to special-case code for when
qt_internal_add_tool() creates imported targets in cross-builds.

Adjust pro2cmake accordingly.

Task-number: QTBUG-85084
Change-Id: I9e1c455c29535dd8c318efa890ebd739c42effc1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-09-27 16:34:23 +02:00
Alexandru Croitor
0da123d67b CMake: Bump almost all cmake_minimum_required calls to 3.16
Needed for subsequent change that will check and error out if the
version is lower than 3.16. We do that to ensure all policies
introduced by CMake up to version 3.16 have their behavior set to
NEW.

Pick-to: 6.2
Task-number: QTBUG-95018
Change-Id: Ieaf82c10987dd797d86a3fd4a986a67e72de486a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-09-22 19:36:49 +02:00
Edward Welbourne
7a4b586f4b Remove conditioning on Android embedded
It is no longer handled separately from Android.
This effectively reverts commit 6d50f746fe

Change-Id: Ic2d75b8c5a09895810913311ab2fe3355d4d2983
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-09-17 17:30:14 +02:00
Ievgenii Meshcheriakov
8be862687d unicode: Fix typo s/supersting/superstring/
Thanks to Konstantin Ritt for spotting it.

Change-Id: Ia3b5c4103b315cdb690fcd8b42239f000acdbef0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-09-15 21:58:12 +02:00
Edward Welbourne
ce868ffb7c Remove trailing zero rows from qtimezoneprivate_data_p.h's tables
They are not needed. Iterations over the table track their sizes.
The size-of-table constants just needed their -1s removed.
Incidentally use std::size() rather than sizeof(array)/sizeof(element).

Change-Id: Ie20eef9f6f5786d93c10b830a87e006d3c5bcc1a
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-09-10 19:33:06 +02:00
Alexandru Croitor
8a66e3cfe5 pro2cmake: Fix reported make flake8 issues
pro2cmake.py:458:5: F841 local variable 'is_parent_path' is assigned
to but never used

Pick-to: 6.2
Change-Id: I1c61efe5cf568fa0c99b07eed28b93d3444a5fac
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2021-09-09 10:21:27 +02:00
Alexandru Croitor
21a281d962 pro2cmake: run make format to fix styling issues
Pick-to: 6.2
Change-Id: I718e34d628576bb709096c0672da3a69b71ae8df
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2021-09-09 10:21:27 +02:00
Oliver Eftevaag
8337493301 pro2cmake.py: generate examples with properties in qt_add_executable()
This patch will slightly change the output of CMakeLists.txt files that
are generated for examples.

* set_target_properties() will no longer be added to the top-level
  scope. If the WIN32 and MACOSX_BUNDLE properties should be added,
  they will instead be added to qt_add_executable().

* The version in cmake_minimum_required() will now be 3.16, rather than
  3.14.

Pick-to: 6.2
Change-Id: I79e1865dace5538d2b7ff264da02f9e28a655ae9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-09-08 15:43:16 +02:00
Ievgenii Meshcheriakov
5f3f073126 unicode: Build IDNA map superstring greedily
This slightly reduces memory required for mapping tables:

    uncompressed size: 1146 characters
    consolidated size: 904 characters
    memory usage: 47856 bytes

Task-number: QTBUG-85323
Change-Id: Ic960789e433e80acf1a4e36791533a1c55a735c8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-09-03 14:43:16 +02:00
Ievgenii Meshcheriakov
2d78b71fc6 unicode: Pack 2 QChar's into one entry for IDNA mapping
Store up to 2 QChar's for mapping values inside the mapping
table itself. This reduces the size of the superstring for
other mapping values.

results:
    uncompressed size: 1146 characters
    consolidated size: 1001 characters
    memory usage: 48050 bytes

Task-number: QTBUG-85323
Change-Id: I922a6d2037551d0532ddae1a032ec1a9890f40a7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-09-03 14:43:16 +02:00
Ievgenii Meshcheriakov
ca1eeb23fa unicode: More compact IDNA mapping tables implementation
This implementation stores mapping that are 1 QChar long
inside the mapping tables, the longer mappings are stored as
an offset and length pairs pointing into the common superstring
of all such mapping values.

Size comparison with the existing implementation follows.

old:
    max mapping length: 6
    memory usage: 103608 bytes

new:
    uncompressed size: 3250 characters
    consolidated size: 2367 characters
    memory usage: 50782 bytes

Task-number: QTBUG-85323
Change-Id: I9f2e32438dd463457e0fcd783136bb17145e27a8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-09-03 14:43:16 +02:00
Ievgenii Meshcheriakov
4e460aa3f7 tests: Add test for UTS #46 implementation using Unicode data
The new test is called tst_qurluts46. It verifies QUrl::{to,from}Ace()
functionality using the data from IdnaTestV2.txt supplied by Unicode.

The file was downloaded from
https://www.unicode.org/Public/idna/13.0.0/IdnaTestV2.txt

Task-Id: QTBUG-85371
Change-Id: I4c6a4942ef6018dafc90cb84ef73f6b2614566d7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-09-01 14:15:45 +02:00
Ievgenii Meshcheriakov
2afe1a3c19 unicode: Generate tables for IDNA/UTS #46
Update the Unicode data processing tool to generate properties
and mapping tables needed to implement UTS #46
(https://unicode.org/reports/tr46/). The implementation extends
the standard to allow usage of underscores in URLs. This is done
for compatibility with DNS-SD and SMB protocols.

The data file needed to generate the new properties was taken from
https://www.unicode.org/Public/idna/13.0.0/IdnaMappingTable.txt

Task-number: QTBUG-85323
Change-Id: I2c303bf8a08aefb18a7491fb9b55385563bfa219
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-08-26 16:55:05 +02:00
Alexandru Croitor
c13b98d9bc CMake: Bump project versions
Fixes: QTBUG-95454
Change-Id: I2467d3ae27b54424e59a7a4ab00d364eaec517d5
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2021-08-02 12:42:29 +02:00
Ievgenii Meshcheriakov
e9519d207e locale_database: Use context manager interface to update source files
Use context manager interface (with statement) to atomically update source
files. This ensures that all files are properly closed and the temporary
file is removed even in case of errors.

Task-number: QTBUG-83488
Pick-to: 6.2
Change-Id: I18cd96f1d03e467dea6212f6576a41e65f414ce1
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2021-07-20 16:51:51 +02:00
Ievgenii Meshcheriakov
8f06d3f938 locale_database: Use NamedTemporaryFile for temporary files
Using NamedTemporaryFile instead mkstemp + fdopen simplifies the code.
It also makes it easier to switch to using context managers for handling
source file modification.

Task-number: QTBUG-83488
Pick-to: 6.2
Change-Id: Ibeae840ac6dde3d0b49cd7f985cfa6cd775b7f47
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-19 22:05:54 +02:00
Ievgenii Meshcheriakov
2d0c2c9f1c locale_database: Use pathlib to manipulate paths in Python code
pathlib's API is more modern and easier to use than os.path. It
also allows to distinguish between paths and other strings in type
annotations.

Task-number: QTBUG-83488
Pick-to: 6.2
Change-Id: Ie6d9b4e35596f7f6befa4c9635f4a65ea3b20025
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-19 22:05:54 +02:00
Ievgenii Meshcheriakov
5ef5dce53b locale_database: Use argparse module to parse command line arguments
arparse is the standard way to parse command line arguments in Python.
It provides help and usage information for free and is easier to extend
than a custom argument parser.

Task-number: QTBUG-83488
Pick-to: 6.2
Change-Id: I1e4c9cd914449e083d01932bc871ef10d26f0bc2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-16 19:04:20 +02:00
Ievgenii Meshcheriakov
41458fafa0 locale_database: Use f-strings in Python code
Replace most uses of str.format() and string arithmetic by f-strings.
This results in more compact code and the code is easier to read
when using an appropriate editor.

Task-number: QTBUG-83488
Pick-to: 6.2
Change-Id: I3409f745b5d0324985cbd5690f5eda8d09b869ca
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-16 19:04:20 +02:00
Ievgenii Meshcheriakov
65a0e04072 locale_database: Add schema for intermediate locale data files
The schema is in RelaxNG Compact syntax. It can be used to validate
files produced by the cldr2qlocalexml.py script and also gives an
overview of the file format.

Change-Id: I344978f2201c5e67e236ab580a12ad33262f33cb
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-16 18:27:28 +02:00
Ievgenii Meshcheriakov
2f4868548b locale_database: Use super() to call base class methods
This is the standard way to call base class methods in Python 3 and
it is shorter than the custom one used now.

Task-number: QTBUG-83488
Pick-to: 6.2
Change-Id: Ifaff591a46e92148fbf514856109ff794a50c9f7
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-15 17:06:54 +02:00
Ievgenii Meshcheriakov
53382b7b07 locale_database: Don't use u prefix for strings in python files
This prefix is useless with Python 3.

Task-number: QTBUG-83488
Pick-to: 6.2
Change-Id: Ic008d53fe506865759e9a5003f439f7ac107b9e6
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-15 17:06:53 +02:00
Ievgenii Meshcheriakov
b02d17c5c0 Convert CLDR scripts to Python 3
The convertion is moslty done using 2to3 script with manual cleanup
afterwards.

Task-number: QTBUG-83488
Pick-to: 6.2
Change-Id: I4d33b04e7269c55a83ff2deb876a23a78a89f39d
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-15 17:06:53 +02:00
Edward Welbourne
a37c0ef55f Convert python comparison function to key function
Instead of implementing all the intricacies of a cmp for the python
sort-function, support for which is due to be dropped at Python 3 in
any case, implement a much simpler key function that achieves the same
result.

In the process, eliminate the ugly kludge of setting an attribute on a
function to, in effect, communicate with it via a global. Instead,
instantiate a class, that wraps the value previously given to the
attribute and whose instance provides the key-function.

Thanks to Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> for
pointing out that a key function is the way of the future - and
sorted() is a nicer way to sort.

Pick-to: 6.2
Change-Id: Icf1ed5597fedf420d054fbc860e3e7fc6615875c
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2021-07-14 20:59:00 +02:00
Edward Welbourne
7dec56c6a5 Make locale ordering transitive
The ordering function used to sort the locale data generated for
QLocale attempted to sort the default territory for a given language
and script before other territories, but was too tangled for it to be
obvious this is what it was doing. The result turned out to be
non-transitive. Replace with code that implements the same preference
but only applies it where the result is compatible with transitivity.

This leads to a shuffling of the order of the Serbian-language
locales, which sorts the Cyrillic ones before the Latin ones. This is
consistent with my reading of the CLDR data, which fills in Cyrillic
and Serbia for Serbian; Serbian/Cyrillic/Serbia did previously sort
before all other Serbian variants.

Thanks to Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io> for
discovering the non-transitivity.

Pick-to: 6.2
Change-Id: I0ce9f78e620e714f980f32b85b7100ed0f92ad74
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2021-07-14 20:59:00 +02:00
Ievgenii Meshcheriakov
d804d21e8f cldr.py: Avoid raising StopIteration from generators
The behavior of StopIteration in generators was changed in Python 3
(see https://www.python.org/dev/peps/pep-0479/). Not raising that
exception makes it easier to port the code to Python 3.

Task-number: QTBUG-83488
Pick-to: 6.2
Change-Id: Iac6e3f6f1e1e8ef3a1a0d89b19d2ac2d186434f5
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-09 13:42:21 +02:00
Ievgenii Meshcheriakov
2300146085 locale_database: Don't attempt to access property 'message' of IOError
IOError does not have property 'message' in Python 3. Instead of
attempting to access it, just use the string representation of
the exception object. This produces the error message possibly combined
with additional arguments in both Python 2 and Python 3.

Task-number: QTBUG-83488
Pick-to: 6.2
Change-Id: Icb198a409e7f80b832e474d8390b770fdeacc6c2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-07 19:32:52 +02:00
Ievgenii Meshcheriakov
6deb28f35a qlocalexml2cpp.py: Remove undefined name inside error processing code
Name 'stem' is undefined inside CalendarDataWriter.write(). The error
was repoted by flake8.

Task-number: QTBUG-83488
Pick-to: 6.2
Change-Id: Ib816b40d0bde2afd3112da76deee0ce39985693a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-06 20:19:22 +02:00
Ievgenii Meshcheriakov
1887c4ecc1 locale_database: Sort lists of unused tags before printing
This way the output is easier to compare between versions.

Task-number: QTBUG-83488
Pick-to: 6.2
Change-Id: If4053c574c4ad200a179b06276bd889f2cb9e1c6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-06 15:17:15 +02:00
Ievgenii Meshcheriakov
0b2646c495 locale_data: Add new line at the end of script output
Output of cldr2qlocalexml.py looks weird without the final new line.

Task-number: QTBUG-83488
Pick-to: 6.2
Change-Id: I5d675e475c57cdc8101887c39052007ba0a19857
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-06 14:21:39 +02:00
Ievgenii Meshcheriakov
f100d412b4 dateconverter.py: Remove shebang and executable attribute
This is not a script that can be run independently.

Task-number: QTBUG-83488
Pick-to: 6.2
Change-Id: I82a93b9ab37ae759b789058d48e94298ecd29b6f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-05 18:24:23 +02:00
Alexandru Croitor
bb25536a3d CMake: Fix Vulkan to be found when targeting Android
Introduce two new packages WrapVulkanHeaders and WrapVulkan similar to
the OpenSSL wrapper packages.

WrapVulkanHeaders uses FindVulkan and is marked as found if Vulkan
headers are found (that's the only part the Qt build requires).

The WrapVulkan package is currently not used, but is there for
symmetry.

The Vulkan feature is now disabled by default on QNX, because the
QNX toolchain file in the CI does not set
CMAKE_FIND_ROOT_PATH_MODE-like variables and CMake ends up finding
host Vulkan headers causing the build to break.

Pick-to: 6.2
Fixes: QTBUG-92157
Change-Id: I05309821f866456cd42e7f85bf8b76ba099df656
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-07-01 18:57:50 +02:00
Alexey Edelev
f522cfc9b9 Fix mapping of MultimediaQuick internal module
Pick-to: 6.2
Task-number: QTBUG-94613
Change-Id: I7d5954c176c0f036a27b4ab1312505b77b2c67d5
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-06-22 14:41:10 +02:00
Heikki Halmet
507499d4b6 Change Android emulator command path
Pick-to: 6.2
Pick-to: 6.1
Change-Id: I6e7df6cdf7f0a0a7efea8fb7672be0b3df096d12
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-06-14 16:01:52 +03:00
Alexey Edelev
fd5b92c2ba Fix internal module mappings of the qtdeclarative repo
Add 'Private' suffix to the internal module names in the mappings of
the qmake files for modules of the qtdeclarative repo.

Change-Id: I1592ebad0f0db553322ea766561b1b8c3fd38aea
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-06-11 15:34:38 +02:00
Alexey Edelev
693d5b8b1a Update internal module mappings
Add 'Private' suffix to the internal module names in the mappings of
the qmake files.

Change-Id: Iacc487aa5e463a522341e526bf8580be2868cf37
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-06-10 17:40:52 +02:00
Jani Heikkinen
9ef816e13a Bump version
Change-Id: I4a862360d627f1ea18a27920bb440da28ddc5b22
2021-06-10 09:32:53 +03:00
Edward Welbourne
1a49d7d1e0 Report unused enum members after CLDR data scan
We should at least know when members of QLocale's enums aren't adding
any value, and it may make sense to deprecate the unused ones.

Change-Id: Icf202f81d2a35904c13ccdc202d41985bcb3f2e6
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2021-06-07 17:14:14 +02:00
Niclas Rosenvik
7920c03ff1 Fix support for using system supplied md4c library
Add FindWrapSystemMd4c.cmake so that the old md4c target can be used
as well as the new one and set WrapSystemMd4c_FOUND.
Link to the imported target WrapSystemMd4c::WrapSystemMd4c if the
system library is used.
Add qt_find_package line to find the package in configure.cmake.
Fix the condition for enabling system-textmarkdownreader, it includes
testing for textmarkdownreader because even if the code would compile
correctly without it, it looks strange when the output says
"textmarkdownreader no" and under "using system libmd4c yes" even if
libmd4c is not used.
Use system include when system-markdownreader is enabled.
Add library mapping for libmd4c.

Change-Id: Id5d5b13d6691a8c1cdf627238887977c847c1e67
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-06-03 20:08:32 +02:00
Heikki Halmet
e75bd6e09a Add option to use different ANDROID_EMULATOR
This change add option to determine used Android emulator version using
environment variable. If variable is not set @x86emulator will be used
as default value.

Change-Id: Ifc52d07d058bf078bf915ca78683822a966b58fb
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-06-02 21:02:41 +03:00
Alexey Edelev
459529ace9 Add the 'Private' suffix to the internal module name by default
Modify pro2cmake to add the 'Private' suffix to the internal module
name by default.

Change-Id: Ia7b2fce387fad5f207a7379ac738173ff9262071
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-05-31 20:50:07 +02:00
Alexey Edelev
75fffe0067 Add the 'Private' suffix to the internal module names
Rename internal modules to adjust their names to the internal module
policy. Also modify mappings of the qmake file converters.

Change-Id: I69aee1e8136c2379608d9d22d718f8c8a5f73124
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-05-31 20:50:07 +02:00
Assam Boudjelthia
cbd226fffa CI: explicitly use -gpu swiftshader_indirect with Android emulator
Force the emulator to use software acceleration to avoid a crash.

Change-Id: I1e73b8bc6485b0854cf83f5d9faa5d5f872a90df
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2021-05-31 00:03:05 +03:00
Edward Welbourne
e51831260a Nomenclature change: s/countr/territor/g in locale scripts
Change the nomenclature used in the scripts and the QLocaleXML data
format to use "territory" and "territories" in place of "country" and
"countries". Does not change the generated source files.

Change-Id: I4b208d8d01ad2bfc70d289fa6551f7e0355df5ef
Reviewed-by: JiDe Zhang <zhangjide@uniontech.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-05-26 18:00:01 +02:00
Edward Welbourne
21e0ef3ccf Rename util/locale_database/enumdata.py's various *_list to *_map
These variables provide mappings, not lists, so name them non-deceptively.

Change-Id: Idf15e78ad73790bc86dd8b9d4f248d1c4f73993c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2021-05-26 18:00:01 +02:00
Edward Welbourne
181424d9b5 QLocaleXmlWriter.enumData(): move enumdata import to method from caller
The only reason cldr.py imported enumdata was so as to pass what it
imported to writer.enumData(); that method might as well do the import
itself.

Change-Id: Ie77dcd29058f926b8cca4deef35837f30505859f
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2021-05-26 18:00:01 +02:00
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