Commit Graph

43008 Commits

Author SHA1 Message Date
Jean-Michaël Celerier
3f9862db95 Add missing endif() in a CMake file
Change-Id: I545a91dafd26d0fc88c3b205aec9805629b9371e
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-04-05 22:44:16 +02:00
Morten Johan Sørvig
f9137c8c6e Wasm: don’t deadlock on parallel image conversions
A special restriction of threads on WebAssembly is
that you should not block the main thread, also not
to wait for worker threads.

For example, blocking the main thread may prevent the
browser from starting a new web worker to service the
pthread the main thread is waiting for.

We may be able create an abstraction to support use
cases like this (most likely using emscripten asyncify),
but for disable use of threads to avoid deadlocking.

Change-Id: I35edd5e1bb465e2549fa7cc4288b47dcd2e4244b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-04-05 22:20:55 +02:00
Sona Kurazyan
4ee7adf59d Try to stabilize flaky test cases of tst_qsequentialanimationgroup
Use QTRY_COMPARE in the flaky tests instead of waiting.

Change-Id: Ic18fc5fde3fa47f3b3ef21e6acd876bd6990981d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
(cherry picked from commit 0ae6803d39)
2020-04-05 16:31:51 +00:00
Volker Hilsheimer
8ed14a3c48 Stabilize QScroller test
Show and activate the widget, otherwise we can't rely on geometry
and gesture event delivery. Use QTRY_ macros in a few more places.

As a drive-by, fix coding style.

Change-Id: If3a13732ae6b07a137fec89e78b7e6b39e066bed
Fixes: QTBUG-82947
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-04-03 20:53:41 +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
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
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
Oliver Wolff
1430b2944b ANGLE: d3d11: Do not register windows message hooks for d3d11 windows
These message hooks are used to handle ALT+ENTER to enter/exit fullscreen
mode and PRINTSCREEN to take screenshots. Qt is implementing these
functionalities itself so we do not have to register these hooks.

If too many of these hooks are registered, callbacks are no longer called
and Qt's message queue is no longer handling messages. By saving these
hooks we can make sure that more Qt windows at the same time are possible
without getting unresponsive due to too many hooks being registered.

Change-Id: I5354f91f08cbfeda5e8dc3ad7f824fbd5b3b2932
Reviewed-by: Dominik Holland <dominik.holland@qt.io>
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-04-02 08:58:03 +02:00
Shawn Rutledge
f515ca5dcd Fix QTabletEvent manual tests
- QPainterPath needs an explicit include now
- QTabletEvent::device() is deprecated

Change-Id: I2d1086847ee2cf5ed63e345c7c2d6eb43897f0e4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-04-01 22:57:55 +02:00
Volker Hilsheimer
5c1bc5c8a4 QLineEdit: clarify the impact of using validators
Values that are validated as Intermediate are possible to enter, but
returnPressed and editingFinished signals are not emitted.

Fixes: QTBUG-82915
Change-Id: I3e194cd6ee93b3402090117b67044cf3663a232e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-04-01 21:37:48 +02:00
Friedemann Kleint
00d9f68c41 Speed up tst_QApplication::testDeleteLaterProcessEvents2()
Quit the event loop once the object is destroyed.

Change-Id: I6df1cfe867daacb6af56eb84646be91d98a2f545
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-03-31 21:50:37 +02:00
Friedemann Kleint
ae653fc08b tst_QApplication::testDeleteLaterProcessEvents(): Split the test
The test can trigger timeouts in COIN, split into subtests.

Change-Id: I1fa5d52422275f89b2858d90c5979632aa7058e2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-03-31 21:50:32 +02:00
Liang Qi
7ed097b31f Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2020-03-31 16:24:30 +02:00
Friedemann Kleint
82a39f12fa QCommonStyle::pixelMetric(): Silence warnings about deprecated enum values
Add the Qt 6 code paths and enclose in warnings exclusions.

Change-Id: I321296ef220fb788f04979ffff42a8a5f226dfdb
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-03-31 16:08:53 +02:00
Liang Qi
947e1f45c7 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	tests/auto/widgets/itemviews/qabstractitemview/tst_qabstractitemview.cpp

Change-Id: Ifaa56153f5f0d687a6b4d94f84fcfa1e1751afd2
2020-03-31 12:30:18 +02:00
Volker Hilsheimer
d934fd7f54 Send MouseMove events without buttons if the press closed the popup
With nested popup widgets, pressing a mouse button on the lower
popup will close the active popup. MouseMove events that are generated
before the button is released again should not have that button
included, as it is likely to result in incorrect state handling in
the widget. This change removes all buttons from the MouseMove event,
which is the second best option.

This is mostly consistent with the behavior when closing a popup and
no other popup remains. The widget underneath will get MouseMove
events without the respective button included.

This change doesn't include a fix for the final release event, which
should ideally also not be delivered to the remaining popup, as it
never got a corresponding press event. Qt has already reset the states
in which it stores which widget received the press event at the time
the release is generated, such as qt_button_down and qt_popup_down.
So we can't separate a release grabbed by a newly opened popup (which
we want) from a release to the popup that became active after closing
(which we don't want).
However, widgets can more easily work around this issue, and the risk
of breaking things by changing the code further becomes too high.

Change-Id: I603bbdbc7e7355952d96ab77c5e2d2f1e6f94987
Fixes: QTBUG-82538
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2020-03-30 20:06:20 +01:00
Allan Sandfeld Jensen
8f88a3962a Fix 1 pixel wide images
Images are rounded up to 4 bytes per line minimum, so one pixel wide
images might not shrink when resizing.

Fixes: QTBUG-83179
Change-Id: If72c94409e4c899c5ad05b2867f5f53a94d0580f
Reviewed-by: Christian Kamm <mail@ckamm.de>
2020-03-30 20:55:11 +02:00