Commit Graph

45124 Commits

Author SHA1 Message Date
Sona Kurazyan
1812830ac3 Fix potential race condition in QtConcurrent blocking methods
QtConcurrent::blocking*() methods are using the ExceptionStore directly,
which is not thread safe. In case if there's an exception thrown from
multiple threads there may be a race condition. Added a lock to avoid
that.

Change-Id: I5de9928f91f5f43951b9bf9c4594694dc0ca0328
Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-04-03 19:46:04 +02:00
Sona Kurazyan
6a6482cb8d Add Qt Core5Compat to the library mapping
Change-Id: Iad613c75705b09f7ae043cff417b0fcf3f5dd946
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-04-03 17:45:43 +00:00
Volker Hilsheimer
ab71c9c996 Unexport QWidgetResizeHandler and remove move functionality
Address FIXME comment.

The class is not public, and only used in QtWidgets for the resizing of
docking widgets. The move functionality is unused, and has been
removed.

Change-Id: Id477f36cb7d449b06e124950fed6f5f182aa5721
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-04-03 19:01:57 +02:00
Alexandru Croitor
708d365a64 CMake: Regenerate projects after .pro files were modified
Change-Id: If6aec596bf68b209b42e0728dd6857eec8c261be
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-04-03 16:05:29 +02:00
Leena Miettinen
ff36ed8c41 Doc: Fix QLineF::IntersectionType enum name
Fixes: QTBUG-82727
Change-Id: Iaffa3b0f61debf27a9fe55775362a3f016612217
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2020-04-03 16:05:27 +02:00
Topi Reinio
3f783bfad9 Doc: Clarify equivalence of two QDate instances
Fixes: QTBUG-83212
Change-Id: I627716522a962a4c90c5833446dd62f6a18d7d86
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-04-03 16:05:27 +02:00
Alex Trotsenko
e0d80167c1 QEventDispatcherWin32: fix posted events delivering
To avoid livelocks, posted events should be delivered when all pending
messages have been processed, and the thread's message queue becomes
empty. Although the logic of the previous patch is correct, it turned
out that determining the moment when the message queue is really empty
is not so simple. It is worth noting that the GetQueueStatus function
sometimes reports unexpected results due to internal filtering and
processing. Indeed, Windows docs say that "the return value from
GetQueueStatus should be considered only a hint as to whether
GetMessage or PeekMessage should be called". Thus, we cannot rely on
GetQueueStatus in unambiguous logic inside the qt_GetMessageHook.

To solve the problem, this patch introduces a guard timer which
guarantees low priority processing for posted events in foreign loop.
The wakeUps flag reset logic has also been changed to provide clearer
synchronization of the Qt internal loop.

Fixes: QTBUG-82701
Fixes: QTBUG-83151
Change-Id: I33d5001a40d2a4879ef4eb878c09bc1c0616e289
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-04-03 14:05:27 +00:00
Thiago Macieira
9834536cfa QLibrary/Android: Correct improper merging
I had originally developed ae6f73e856 in
5.13, where this code for Android didn't exist. I didn't notice the use
of pHnd there when I merged up for the push.

Change-Id: Ibdc95e9af7bd456a94ecfffd160208dfaa596d95
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-04-03 11:05:27 -03:00
Alex Trotsenko
274e973dbe Fix flakiness in tst_QApplication::testDeleteLater
DeleteLaterWidget is a main application window of the test. So, its
show() function should be called explicitly before starting the main
event loop. Otherwise, it remains hidden for the whole time, which
causes an incorrect emission of QApplication::lastWindowClosed signal
when a dialog window is closed in the middle of the test.

Also, fix synchronization between deferred deletion and timer event.

Change-Id: Id3ce5adbcd9e5e22508825c52025eeea70202354
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-04-03 17:05:27 +03:00
Alexandru Croitor
8a0a31ed68 CMake: pro2cmake: Skip conversion of doc snippets
Most of them are hand-written.

Change-Id: Ia3d83cdc9e279420c9b4700993b428e10cf8fb22
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-04-03 16:05:26 +02:00
Alexandru Croitor
61d9428d8c CMake: Make sure that the library config.test is used for assimp
Change-Id: Ia5b2a2ffca2dda460a323fd3f564c548be84c0aa
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-04-03 16:05:22 +02:00
Alexandru Croitor
d2931a2626 CMake: Handle standalone config.tests in configure libraries section
Some library entries in configure.json have a test entry.
An example is assimp in qtquick3d.

qmake tries to find the library via the sources section, and then tries
to compile the test found in config.tests/assimp/assimp.pro while
automagically passing it the include and link flags it found for assimp.

We didn't handle that in CMake, and now we kind of do.

configurejson2cmake will now create a corresponding
qt_config_compile_test call where it will pass a list of packages and
libraries to find and link against.

pro2cmake will in turn generate new code for the standalone
config.test project. This code will iterate over packages that need to
be found (like WrapAssimp) and then link against a list of passed-in
targets.

In this way the config.test/assimp/main.cpp file can successfully
use assimp code (due to propagated include headers).

qt_config_compile_test is augmented to take a new PACKAGES argument,
with an example as follows

PACKAGES PACKAGE Foo 6 COMPONENTS Bar
         PACKAGE Baz REQUIRED

The arguments will be parsed and passed to the try_compile project,
to call find_package() on them.

We also need to pass the C/C++ standard values to the try_compile
project, as well as other try_compile specific flags, like the
toolchain, as given by qt_get_platform_try_compile_vars().

Change-Id: I4a3f76c75309c70c78e580b80114b33870b2cf79
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-04-03 16:05:19 +02:00
Volker Hilsheimer
de78425ca0 Make setRange methods in QValidator subclasses non-virtual
As per the FIXME comment. These functions are not called by Qt, so no
reason to have them virtual.

As a drive-by, remove redundant virtual keyword from overrides.

[ChangeLog][QtGui][QValidator] QIntValidator::setRange and
QDoubleValidator::setRange are no longer declared as virtual.

Change-Id: I640646fb18ed50554e384ed67ac85b3f408ea8cc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-04-03 16:05:04 +02:00
Tor Arne Vestbø
1c23d34ad4 qpa: Remove references to lighthouse
Change-Id: I37646113f626c878883cff49f4e186ec71bcfa15
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2020-04-03 15:26:29 +02:00
Nico Vertriest
713cd83200 Doc: Make Qt Test snippets compilable
Task-number: QTBUG-81498
Change-Id: I22f07cd539e5e317b6cf15eb369d59915146bd13
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-04-03 13:13:55 +00:00
Edward Welbourne
0c2d6c163f Fix deprecation warning in tst_QLocale()'s use of QProcess::start()
Change-Id: I6f5dfa2d40984f86670288bdee4d1b7b060850ac
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-04-03 15:13:23 +02:00
Qt Forward Merge Bot
7672e09770 Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2020-04-03 15:12:48 +02:00
Tor Arne Vestbø
ab4c22d47d macOS: Remove all use of deprecated Q_OS_OSX define
Change-Id: I49c285604694c93d37c9d1c7cd6d3b1509858319
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-04-03 13:44:37 +02:00
Kai Koehne
7e7c649884 CMake: Fix double inclusion of CMake plugin targets
After 99ace38d22, all plugin files are
included automatically, not only the ones ending in Plugin.cmake.

Thus the extra inclusion done by the QmlConfigExtras file should only
be done if strict mode is set.

Amends 99ace38d22
Amends 2f2dd3b0c28db210ea1f00d569f6c1626894c5f4

Task-number: QTBUG-83282
Change-Id: I416cbad6c4788d605a9a74f21062543c9c98e968
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-04-03 13:32:56 +02:00
Morten Johan Sørvig
8a9ba8b2ce wasm: add support for enabling Asyncify
./configure […] --device-option EMSCRIPTEN_ASYNCIFY=1

Set QT_HAVE_EMSCRIPTEN_ASYNCIFY as a feature flag,
enable optimizations for asyncified debug builds.

Change-Id: I81c887a411780e328aed48ec09ff6b9277c3bccf
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2020-04-03 13:32:56 +02:00
Morten Johan Sørvig
f7722394f4 wasm: remove obsolete config
On emsdk 13.9.x WASM_OBJECTS_FILES is always on,
and BINARYEN_TRAP_MODE is not needed

Change-Id: Id1da1db0278e131f95045bc0902f5cc4c22c1522
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2020-04-03 13:32:56 +02:00
Morten Johan Sørvig
4aee10b9da No-thread: Don’t assert in ~QThreadData()
The no-thread build is not maintaining the
QThreadData refcount.

Change-Id: I80ce4151b8da9391764ed3d820943dcac0d70999
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2020-04-03 13:32:56 +02:00
Qt Forward Merge Bot
86d9e36b06 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	tests/benchmarks/corelib/text/qstringlist/qstringlist.pro

Change-Id: Ie9b97bd83c2df00fd9b556b5f09d405f71970169
2020-04-03 09:01:44 +02:00
Samuli Piippo
af6f3cb317 qt_record_extra_package_dependency: check that target exists
The target may not be defined which causes error:
get_target_property() called with non-existent target "qtwaylandscanner".

Change-Id: I58a9122456ccbbbb8fc9f0adce3b7ddcc985e6a4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-04-03 08:15:55 +03:00
Edward Welbourne
cabd8f860b Ensure we use UTF-8 for the emitted QLocaleXML data file
Python helpfully uses a sensible locale when stdout is a tty but uses
the system (not the filesystem) default encoding, which may be ascii
and unable to encode some of the data we need to save. So brute force
kludge it to ensure emit.encoding is UTF-8 when writing the output
we'll read as UTF-8 anyway.

(This matches dev's commit 0ef79d94f6
for the reworked version of the script.)

Task-number: QTBUG-79902
Change-Id: I60ddc896a308c06e01fa87e8e18e112faa17d601
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-04-02 19:44:06 +01:00
Edward Welbourne
67c0e28789 Purge a stray space from calendar locale data
It was causing all lines after the first, in each calendar's
locale_data[], to be over-indented. This only changes spacing.

Change-Id: Ibfc4986548eecbfdba2902cc18f44a2af669bc6d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-04-02 19:44:01 +01:00
Edward Welbourne
3dfdc9b97a Convert the qlocale2cpp's last few %-formats to modern format() style
I've taken care of all the others in the course of other changes
already ...

Task-number: QTBUG-81344
Change-Id: I44e40a0d1c9f1e1a540a5f4cd252369fdc9b2698
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-04-02 19:43:50 +01:00
Edward Welbourne
963931550d Check all matches for each XPath when searching
Previously, if we found one element with required attributes, we would
search into it and ignore any later elements also with those required
attributes. This meant that, if the first didn't contain the child
elements we were looking for, we'd fail to find what we sought, if it
was in a later matching element (e.g. with some ignored attributes).
We would then go on to look for a match in a later file, where there
might have been a match we should have found in the earlier file.

Check all matches, rather than only the first match in each file.  Do
the search in each file "in parallel" to save reparsing the XPath.
This clears the search code of rather hard-to-follow break/else
handling in loops; and currently makes no change to the generated
data.

Change-Id: I86b010e65b9a1fc1b79e5fdd45a5aeff1ed5d5d5
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-04-02 19:43:43 +01:00
Edward Welbourne
89bd12b9ad Change QLocale to use CLDR's accounting formats for currencies
In particular, this changed the US currency formats for negative
amounts to be parenthesised versions of the positive amount forms,
rather than having a minus sign after the $ sign. Test updated.

[ChangeLog][QtCore][QLocale] Currency formats are now based on CLDR's
accounting formats, where they were previously mostly based (more or
less by accident) on standard formats. In particular, this now means
negative currency formats are specified, where available, where they
(mostly) were not previously.

Task-number: QTBUG-79902
Change-Id: Ie0c07515ece8bd518a74a6956bf97ca85e9894eb
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-04-02 20:43:34 +02:00
Edward Welbourne
81cf23c7a7 Take CLDR's distinguished attributes into account
When doing XPATH searches, child nodes that have distinguished
attributes that were not asked for should be skipped. This is part of
the LDML spec and matters when resolving locale inheritance. Scan the
LDML DTD (previously only scanned for the CLDR version) to find which
attributes of which tags are ignorable - all others are distinguished
- and take the result into account when performing XPATH searches.

The XPath we were using for currency formats wasn't excluding
currencyFormatLength elements with type="short" and patterns specific
to thousands (and larger multiples); this is fixed by taking
distinguished attributes into account. However, the XPATH also wasn't
specifying the always distinguished attribute type="standard" that
was, in practice, used for nearly all locales that weren't (wrongly)
using short-forms for thousands; so type="standard" is now made
explicit, so as to minimize the diff.

This leaves only twenty-one locales with a negative currency formats.
A later commit shall switch to using accounting by default (it falls
back via an alias to standard, in any case), thereby restoring the two
mentioned below that were using it by accident, but the present change
gives the minimal diff here.

Thousands-specific formats replaced with sensible ones:
* zh_Hant_{HK,MO} (Traditional Mandarin, Hong Kong and Macau)
* eo_001 (Esperanto)
* fr_CA (Canadian French)
* ha_* (Hausa, when not written in Arabic)
* es_{GT,MX,US} (Spanish - Guatemala, Mexico, USA)
* sw_KE (Swahili, Kenya)
* yi_001 (Yiddish)
* mfe_MU (Morisyen, Mauritius)
* lag_TZ (Langi, Tanzania)
* mgh_MZ (Makhuwa Meetto, Mozambique)
* wae_CH (Walser, Switzerland)
* kkj_CM (Kako, Cameroon)
* lkt_US (Lakota, USA)
* pa_Arab_PK (Punjabi, in Arabic script, as used in Pakistan; uses
  arabext number system, whose currency falls back to latn's, for
  which pa_Arab over-rides the thousands-format).

Format changed from an over-ridden type="accounting" to standard (so
these lost a negative-specific form) in:
* en_SI (English, Slovenia)
* es_DO (Spanish, Dominican Republic; same)

For some locales we were picking up over-rides of narrow or short list
formats, or formats for or-lists or unit-lists rather than and-lists,
in place of the standard list format, that these locales don't
over-ride, provided by a parent locale. This changed list formats for:
* en_CA, en_IN (dropped "Oxford" comma before "and")
* qu_* (Quechua; dropped "utaq", presumably meaning "and")
* ur_IN (Urdu, India; was using unit-list formats)

[ChangeLog][QtCore][QLocale] Data used for currency formats in several
locales and list patterns in some locales have changed due to now
parsing the CLDR data more faithfully.

Fixes: QTBUG-81344
Change-Id: I6b95c6c37db92df167153767c1b103becfb0ac98
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-04-02 19:43:28 +01:00
Edward Welbourne
e5eb0aa428 Take number system into account in currency format look-up
CLDR's currency formats do have number system variation, so take it
into account. (The old xpathlite code clearly intended to do this, but
failed at it due to looking for the wrong component of an XPATH to
fix.) This changes the currency formats in use for
* all Dutch locales (because nl.xml lists a currency format for arab
  before the one for latn, and they differ),
* Punjabi, Urdu - specifically pa_Guru_IN, ur_Arab_PK (both like
  Dutch, arabext before latn; which is correct for pa_Arab_PK and
  ur_Arab_IN),
* Sindi (whose over-ride of latn currency format we were using, where
  we should be using arab's format, supplied by root's default),
* Tatar (which specifies a generic currency format, which we were
  using, before one specific to latn, which we now use),
* Tongan (same as Dutch),
* Konkani (like Dutch, deva before latn) and
* several North African Arabic locales (whose default number system is
  latn, rather than arab, but previously used arab's formats).

Task-number: QTBUG-79902
Change-Id: I18d8ec16bfd3a516d1bcd2f63bc7f7f15179a3f4
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-04-02 19:43:23 +01:00
Edward Welbourne
be3dfd7a71 Rework cldr2qlocalexml.py's reading of CLDR data
Move the code out to a CldrReader class in cldr.py, expand CldrAccess
with facilities that needs, expand ldml.py to include support for more
features, finally making xpathlite.py redundant. This initial commit
aims, though, to be bug-for-bug compatible with xpathlite in its
reading of the CLDR data.

It turns out we've been using draftier data than we were aware of
(which might not be a bad thing). The xpathlite code appeared to check
for draft attributes, but these only appear on leaf nodes and most
data were fetched by finding a parent and then scanning its children
without the draft check; only am/pm data was actually being excluded
based on draft values.  (We allowed contributed, for am/pm, in
addition to approved, which is all the xpathlite code allows
otherwise.) There are also some less equivocal bugs; I'll deal with
these in later commits.

Simplified number-system data look-ups; the old get_number_in_system()
was taking care of old LDML versions' placement of the number system
attribute; this is no longer needed. (It was also being used for a
currency value to which it was not appropriate, which is now handled
separately; this is one of the bugs mentioned above.) Ditched a
fall-back to nativeZeroDigit, which no longer exists in CLDR.

Change the command-line to take the root of the CLDR data tree, rather
than its common/main/ sub-directory. Support naming the file to which
to write output, as a second command-line argument, instead of always
writing to stdout (which remains the default) and leaving whoever runs
the script to redirect stdout.

Support (internally for now, while adding TODOs to give main() more
command-line options) separating the stderr output into its more and
less interesting parts; for now, continue producing both, but suppress
the least interesting entirely.

Task-number: QTBUG-81344
Change-Id: Ie611b47403a9452b51feaeeaaa0fbc8f7e84dc71
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-04-02 19:43:18 +01:00
Edward Welbourne
c834dbc6fb Move cldr2qtimezone.py's CLDR-reading to a CldrAccess class
This begins the process of replacing xpathlite.py, adding low-level
DOM-access classes to ldml.py and the CldrAccess class to cldr.py

Moved a format comment from cldr2qtimezone.py's doc-string to the
method of CldrAccess that does the actual reading.

Task-number: QTBUG-81344
Change-Id: I46ae3f402f8207ced6d30a1de5cedaeef47b2bcf
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-04-02 19:43:13 +01:00
Edward Welbourne
9fab53a513 Rework qlocalexml2cpp.py to use writers based on Transcriber
This saves repetition of temporary-file manipulation code. In the
process, ensure that we tidy away temporary files on failure.

Moved a comment in qlocale.h to *outside* the re-written portion, to
save having to rewrite it every time. Added blank lines to separate
script data from country data in the generated output. Changed 0s in
one comment to zeros, to match another comment.

Isolated use of sys to the __main__ block.
Isolated use of enumdata to the new LocaleHeaderWriter class.
Modernised all the string-formatting I touched.

Task-number: QTBUG-81344
Change-Id: I5768e45d9a8ea23facc303b3dd8af8b3ccbf7ff2
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-04-02 19:42:56 +01:00
Edward Welbourne
5b1c33cc78 Rework cldr2qtimezone.py into more maintainable form
Broke out the updating of a source file to a ZoneIdWriter helper
class, which enables tidying away the temporary file if we fail.
Collected up the rest of the script into a main() that's now
called from a __name__ == '__main__' block.
Rationalized the imports.

Eliminated an inefficient lookup function by constructing a suitable
dict() before entering the loop that needed it.

Separated the "data you might need to update" tables from the code
that does the work, to make it easier for those adding support for new
zones to see what they're doing.

Removed the spurious $Revision$ from the output and reworded the
premable of the generated file. (It would seem CLDR no longer uses an
RCS-based version-control system.) Generated output is otherwise
unchanged.

Task-number: QTBUG-81344
Change-Id: I7d9de8357ebcb599d154de9f862e25f7ade00390
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-04-02 19:42:50 +01:00
Edward Welbourne
bb4242341b Add tools to localetools to facilitate source file recreation
For now unused; later commits shall put them to use.
Transcriber -- base, takes care of tempfile and renaming.
SourceFileEditor -- handles copying parts before and after a common delimiter.

Task-number: QTBUG-81344
Change-Id: I28cf977d0a08825fbb873fb330da6823b88ad3ed
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-04-02 19:42:45 +01:00
Edward Welbourne
c3dea1ffca Move some shared code to a localetools module
The time-zone script was importing two functions from the locale data
generation script. Move them to a separate module, to which I'll
shortly add some more shared utilities. Cleaned up some imports in the
process.

Combined qlocalexml2cpp's and xpathlit's error classes into a new
Error class in the new module and made it a bit more like a proper
python error class.

Task-number: QTBUG-81344
Change-Id: Idbe0139ba9aaa2f823b8f7216dee1d2539c18b75
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-04-02 19:42:40 +01:00
Edward Welbourne
4d9f1a87de Move qlocalexml2cpp.py's XML-reading to QLocaleXmlReader
This new class mirrors the existing QLocaleXmlWriter and places the
two side-by-side in qlocalexml.py, rather than having the writing and
reading in separate places.

Made judicious use of transformed versions of mappings to save
repeated iteration of a mapping's entries to do lookups on fist
entries of pair-values; several (id, name, code) data-sets are
sometimes indexed by id, sometimes by name.

Reworked the default_map, that the complicated compareLocaleKeys()
used in sorting locale keys, to map IDs instead of names; the function
also needed the locale_map so that it could convert IDs to names,
which we can skip by going directly with IDs.

Task-number: QTBUG-81344
Change-Id: Iff6a97f7f0755b56dda70d8a6796ec074c558910
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-04-02 19:42:34 +01:00
Edward Welbourne
a20697a394 Rework cldr2qlocalexml.py in terms of a QLocaleXmlWriter class
Delegate the output of XML to a helper class provided by qlocalexml.py
and restructure the driver script so that it can be imported without
running anything. It now has a minimal __name__ == '__main__' block
that calls a main() function. This, for the moment, requires a global
via which it shares the CLDR directory with various other functions;
that shall go away in a later commit.

Task-number: QTBUG-81344
Change-Id: Ica2d3ec09f2d38ba42fd930258cc765283f29a71
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-04-02 19:42:28 +01:00
Edward Welbourne
333d7e6de4 Clean up QTzTimeZonePrivate::systemTimeZoneId()
The special handling of ":/etc/localtime" should only apply if that's
the exact value of $TZ; the old code would have treated
"/etc/localtime" the same, due to stripping a leading ':' before
checking for it.  We can also test whether to do that stripping using
startsWith().

When reading the content of files, avoid QTextStream's trip via
QString and back to QByteArray by using the QFile's readLine()
directly, or by using readAll().

Task-number: QTBUG-75585
Change-Id: I1524529a2c34d83a9fbd00d41c11f2d994dfc49d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-04-02 20:41:09 +02:00
Samuel Thibault
54886d7f81 Enable accessibility on Linux when org.a11y.Status IsEnable is true
Otherwise accessibility would only work when Orca is set to be started
in the session preference, and it would not work when running Orca or
compiz' zoom by hand.

The existing comment said that it was always true since gnome 3.6, but at
least in Debian 8's gnome 3.14, Debian 9's gnome 3.22, and Debian 10's
3.30 it is not always true, it is Orca which sets it on startup. Compiz's
focuspoll module also does so for people with low vision using zoom with
focus tracking.

[ChangeLog][Accessibility][Linux] Enable accessibility on Linux when Orca is
started by hand

Change-Id: I36cfe1b45e442c0fcefe813e09a67a74205c3ecf
Reviewed-by: Frederik Gladhorn <gladhorn@kde.org>
2020-04-02 19:34:07 +01:00
Tor Arne Vestbø
6387138a79 Pass SDK root to the linker as -isysroot, not -Wl,-syslibroot
The former option to clang will result in more options to the linker,
such as the newly introduced -platform_version, which writes the
SDK version to the resulting binary. By using the syslibroot flag
directly we were missing the platform version, and binaries were
left without an SDK version set, resulting in failed validation
of the binary. Going with the clang driver gives us the right
behavior for free.

Fixes: QTBUG-83100
Change-Id: I98bc9ba644dae4bcc7a6a88481556bae185ce5fa
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
(cherry picked from commit 6a60192ac03d0b4ab542191065122243cebcd1ca)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-04-02 18:33:42 +02:00
Edward Welbourne
53ed635dbb Set CONFIG += benchmark in corelib's various benchmarks
This leads to "make benchmark" actually running the benchmark, which
would be nice, I think. Purged various CONFIG += release or -= debug
lines from the same configurations; those surely only configure how
the test code is compiled, which is more or less pointless; it's the
code under test whose debug/release state matters, and I don't suppose
that's affected by the build config of the test code.

In the process, reduce diversity of the ordering of lines within these
*.pro files and purge some dangling space.

Change-Id: Ia9f9f0ca4c096262de928806bdfa6ea3b9e7b9ba
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-04-02 18:33:42 +02:00
Lars Knoll
64b1af3fa0 Warn that the EDITABLE flag for property declarations is deprecated
Additionally mark QMetaProperty::isEditable as deprecated.

Change-Id: I1abe4c6f2d30c2f96380f9e5942be431dbfed38f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-04-02 15:21:46 +00:00
Volker Hilsheimer
1de427bd4e Use correct deprecation macro, and add \since to new member function
Change-Id: Ib9e88855c708f1fe2402d78c55ff08812d86e035
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-04-02 16:32:03 +02:00
Tor Arne Vestbø
7e9481f1fb Resolve QWidget window handle without depending on QtWidgets
Change-Id: If5b2f17283193d7a1718f476b72f380e9e67d0f0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-04-02 10:33:29 +02:00
Shawn Rutledge
c83ae88faf Remove QTabletEvent::PointerType::XFreeEraser
This is an artifact of pre-Qt 5 Wacom driver implementation, hasn't
been in use during the Qt 5 series, but was kept for source compatibility
with very old sources. Let's hope the usages are all gone by now.

Change-Id: I39dc36699510ea5e51cacd369470264fd8a27b37
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-04-02 10:09:50 +02:00
Alexandru Croitor
0cdb4b20d3 CMake: Remove HEADER_MODULE handling from 3rd party libs
Installing headers is not supported for 3rd party libs (we don't run
syncqt, we don't install headers for 3rd party libs to
prefix/include).

Remove the unnecessary condition.

Change-Id: I46e9af7a7ca9de0138666b0d0faffc86238672ba
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-04-02 10:00:23 +02:00
Alexandru Croitor
6fdeaea24f CMake: Don't try to add 3rd party includes to ModuleDepends files
When creating the include/QtShaderTools/QtShaderToolsDepends file
in QtPostProcess.cmake -> qt_internal_write_depends_file(),
we decide which include files to append based on link dependencies
starting with Qt::, which happens to match 3rd party targets like
Qt::BundledSpirv_Cross which doesn't expose headers in the
prefix/include dir.

Mark all bundled targets with the QT_MODULE_SKIP_DEPENDS_INCLUDE
property to exclude them from being added to Depends files.

This should fix static builds of qtquick3d which includes
<QtShaderTools/QtShaderToolsDepend> which tries to include a
non-existent <QtBundledSpirv_Cross/QtBundledSpirv_Cross>.

Change-Id: I9dcff1e2ab721a7c21fcff3fda0faf8d023d60ba
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-04-02 10:00:20 +02:00
Alexandru Croitor
84a7f0d3d7 CMake: Don't use escaped plugin type for on-disk directories
The path where we install plugins is usually
prefix/plugins/plugin_type/plugin_name

The plugin_type should not be escaped, so it should be used verbatim
(no escaping of slashes or dashes)..

So far it seems the only weird plugin types are wayland plugins which
contain dashes, like wayland-shell-integration, and the sub-ios plugin
which has a slash (platforms/darwin).

For cmake properties we use the escaped names.
This should fix tests in wayland where the wayland plugins can't be
found.

Change-Id: I93406731b8c872a82c0f247f5b7c6bdab4875455
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-04-02 09:39:41 +02:00