Commit Graph

55916 Commits

Author SHA1 Message Date
Marc Mutz
61157c8354 QBuffer: fix writing more than two GiB of data
In Qt 6, QByteArray can hold more than two GiB of data on 64-bit
platforms, so QBuffer should be able to handle writes of more than two
GiB, too. But the implementation didn't check for overflow and held
sizes in int variables, so it happily reported success but wrote data
only mod INT_MAX.

Fix by carefully avoiding overflow and using size variables of proper
type.

[ChangeLog][QtCore][QBuffer] Fixed silent data truncation when writing
more than two GiB at once on 64-bit platforms.

Pick-to: 6.3 6.2
Fixes: QTBUG-102171
Change-Id: Ib666f9f7db24495b4ed64191a48b35edc410f7e9
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2022-04-04 08:17:09 +02:00
Allan Sandfeld Jensen
30873cc720 Re-fix C++20 ambiguous relational operators after adding QJsonValueConstRef
Change-Id: I573ffe2eb4a63b52a8e3982f6feb1b195913e538
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-04-03 15:29:44 +00:00
Marc Mutz
360f3de390 QtDBus: optimize handling of isDebugging
This is part of a series of patches deprecating implicit conversions
of QAtomic<T> variables to T.

Use relaxed atomic loads and stores on the 'isDebugging' variable. The
old code used the implict conversions to and from int and therefore
loadAcquire/storeRelease. Here, the int is the only value, it's not
guarding the construction of any other data, so relaxed loads and
stores suffice.

A further optimization would be to make the initial value of
isDebugging 0, to send it into the BSS instead of the TEXT/DATA
segment, but seeing as this is just compiled in for the auto-tests,
this patch leaves that particular change for another round (or never).

Pick-to: 6.3
Change-Id: Ide92f6c1a12137fcbc3ec15e146f6dcbdb6b481b
Reviewed-by: David Faure <david.faure@kdab.com>
2022-04-03 16:18:43 +02:00
Marc Mutz
e4186b2b28 QtDBus: sweep Q_DECLARE_METATYPE → QT_DECL_METATYPE_EXTERN
It's one of our best tools to improve compile times.

Can't backport to Qt 6.3 or 6.2 because this change introduces new
exported symbols.

Task-number: QTBUG-102206
Change-Id: Iae9d4017a984c845a76d0b9b088ad3e467fe1d54
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-03 16:18:43 +02:00
Marc Mutz
e191edfad0 QMetaType: don't allocate memory just to look up a key in a QHash
Use fromRawData() to create a QByteArray-as-a-view instead.

Pick-to: 6.3
Change-Id: Ic6083ec438bc089a6f11d7e4718eca72c0d51fe3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-04-03 16:18:42 +02:00
Marc Mutz
01dab0b953 QGlobalStatic: mark functions that inspect the guard noexcept
Because they are.

Pick-to: 6.3
Change-Id: I60e94ebbe6fcd624195aeaed5de76cabc61c3178
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2022-04-03 16:18:42 +02:00
Marc Mutz
b0e4d53b63 QMetaType: don't create a registry just to query its emptiness
The function-call operator of QGlobalStatic creates the payload object
unless is has already been deleted. When performing read-only
operations on the payload object, it's better to use
QGlobalStatic::exists() + the dereference operator instead, because
that prevents the creation of the payload just to find it empty.

Pick-to: 6.3
Change-Id: I367add516520d076412cbbc542ee7a3b6ea45c14
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-04-03 12:20:55 +02:00
Marc Mutz
168a02d405 QMetaType: unlock QReadLocker early
Unlock the QReadLocker after we're done with the registry, before we
perform expensive operations such as I/O and QByteArrayList::join().

Pick-to: 6.3
Change-Id: I96549c517a2b4ffe34a70ea83f8c061ff9620795
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-04-03 12:20:53 +02:00
Ivan Solovev
6f725e6ef9 Revert "Activate all tst_qgridlayout tests on Android"
This reverts commit b39d3cfe30.

Reason for revert: the test fails in dev again

Task-number: QTBUG-87404
Change-Id: Icc51e36e037e9c7e8154266def129dd8ad412775
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-04-02 16:57:32 +00:00
Christian Ehrlicher
4913aca32f Doc: fix documentation for QGraphicsItem::setAcceptedMouseButtons()
Fix the documentation to pass Qt::NoButton instead 0 to
QGraphicsItem::setAcceptedMouseButtons() since 0 is no longer accepted
by QFlags.

Change-Id: Ib98d509382e5b5407a07c74565adb7ee5afbb35f
Pick-to: 6.2 6.3
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2022-04-02 16:47:25 +00:00
Assam Boudjelthia
c5dd2c1f35 Android: skip few tst_qopenglwidget tests that crash on CI
To allow other cases to run while finding the reason. Most of these
cases fail only on CI and not locally.

Pick-to: 6.3 6.2
Task-number: QTBUG-102043
Change-Id: Ib552ab00b4232f6aabdf85acf050633251d9e71d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-04-02 15:23:58 +03:00
Assam Boudjelthia
90b928bad4 Android: minor code refactorings for QAndroidPlatformMessageDialogHelper
Change-Id: Ia42450a5c3ebc2f608bae599f03246464136ca06
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2022-04-01 21:11:35 +00:00
Assam Boudjelthia
a7801fa325 Android: hide() in the QAndroidPlatformMessageDialogHelper destructor
The native dialog window is not being hidden or destroyed when the
QAndroidPlatformMessageDialogHelper object is destroyed. This makes
sure to not leave any native dialogs open.

Pick-to: 6.2 6.3 6.3.0
Task-number: QTBUG-97482
Fixes: QTBUG-101758
Change-Id: I2e50caebd286ea6abd3e948a4873dc3c971626a4
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2022-04-01 21:11:35 +00:00
Edward Welbourne
9e1a2b4603 We do in fact support 'F' format for floating-point values
Update docs and add tests.

[ChangeLog][QtCore] Documented existing support for 'F' format when
converting floating-point numbers to strings in QLocale::toString(),
hence equally for QString's floating-point formatting. Previously it
was supported but the documentation neglected to mention it; it only
differs from 'f' for infinities and NaN.

Change-Id: Ic946c0f7b9e86fdf512daa3124bea57fc664b34b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-04-01 23:11:35 +02:00
Edward Welbourne
2e044791b8 Move some purely floating-point testing from tst_QLocale to tst_QNumeric
The testing of infinity and NaN somewhat duplicated existing tests in
tst_QNumeric and, in any case, belongs there.

Change-Id: I6b5d1ff9767daf8e4bbe0025d3efab3d74ed35de
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-04-01 23:11:35 +02:00
Edward Welbourne
3a2e3625d1 Use constants of the correct type in qnumeric NaN test
Replaces 0, 0.0, 1, 1.0 and 2.0 with zero, one and two constants of
the templated floating-point type, to avoid type-conversions which
might have meant the test only checked doubles, or similar.

Change-Id: Id9d4488f0cc7226b5b8958d2a204a76fe5ae469d
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-04-01 23:11:34 +02:00
Edward Welbourne
67a563e5c5 Clean up and modernise tst_QLocale::fpExceptions()
Use the modern "portable" _clearfp() and _controlfp(), that work
regardless of the hardware MS is running on, rather than the
x86-specific _clear87() and _control87(); and move some defines into
the #if-ery context in which they're used, rather than defining them
regardless of whether they're used.

Change-Id: I13abf2c85525b1182b99bc2c366aadd6b5fc656f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-04-01 23:11:34 +02:00
Mårten Nordheim
50a5ef9945 tst_QIODevice::unget() without network: skip only the affected part
Instead of QSKIPing the whole test, ignoring what was already tested

Change-Id: Iced928ce1bce92b447c8698a9942973cb78b6c15
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-04-01 23:03:58 +02:00
Giuseppe D'Angelo
d063b2b131 QBAV/QSV: remove a historical note
Both QByteArray and QString can contain more than 2^32 elements on 64
bits platforms, so the warning does not apply any more.

Change-Id: I4604c1fe225922a0df7e78135eeb5a1e2b84fea3
Pick-to: 6.2 6.3
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-04-01 23:03:58 +02:00
Edward Welbourne
ad7a738e6d Simplify parsing of a line to remove [...] enclosure
Use a view of the line, within the larger data buffer, to avoid some
complications.

Change-Id: Iaf79068487ac6b92fe9e415fb63f6b0e9ad0c5a2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-04-01 23:03:58 +02:00
Marc Mutz
d9531593a2 Add Q_THREAD_LOCAL_CONSTINIT to work around an MSVC bug
MSVC 19 does not allow using constinit on thread_local objects of
non-trivial type:

https://developercommunity.visualstudio.com/t/C:-constinit-for-an-optional-fails-if-/1406069

Instead of revoking Q_CONSTINIT for that compiler or removing
Q_CONSTINIT from such variables, add a new macro for this situation,
so the constinit static assertion will still be checked on other
platforms.

Amends 32692667a6.

Change-Id: Ic2247768b0d64e0c01648cffc9532fe5bd4bbd5d
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-04-01 23:03:58 +02:00
Marc Mutz
0e3ac20088 QCoreTextFontDatabase: remove 34 relocations
Same ole trick[1] as usual: Instead of an array of pointers (causing
relocations), declare an array of strings (char arrays; not causing
relocations).

[1] http://library.bagrintsev.me/CPP/dsohowto.pdf, Section 2.4.3.

As for storage requirements: We pay a few bytes per entry for extra
padding, as not all entries have length seven, but we save the
per-entry pointer variable, so sizeof(void*) bytes per entry, too, so
on 64-bit, at least, we're guaranteed to come out ahead.

Needed to replace nullptrs with empty strings here, and adjust the
sole user to check for emptiness instead of nullness.

Pick-to: 6.3 6.2
Task-number: QTBUG-100536
Change-Id: I4f07d72116eda2ebf1fdb327133f315417e2b0f0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-04-01 21:03:58 +00:00
Albert Astals Cid
c22bf34661 Remove declared but not defined function
Change-Id: I78a39f87118b3a2d4bc693c2b87a29c46e40032d
Reviewed-by: David Faure <david.faure@kdab.com>
2022-04-01 21:31:36 +02:00
Hu Jialun
eff8f9b7fa Doc: QNetworkProxyFactory: Mention libproxy in systemProxyForQuery
Documentation of QNetworkProxyFactory::systemProxyForQuery does not
include the libproxy integration, and may be misleading by hinting that
desktop environment integrations on other systems are unsupported.

Add this piece of information to the documentation to avoid
misunderstanding.

Pick-to: 6.3 6.2
Change-Id: Id3f14d4a617c25576cb1bd57a494ea77c882635d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2022-04-01 19:09:09 +00:00
Morten Johan Sørvig
e4380b90ea wasm: rename “canvas” API to “container”
We now accept using div element as the root element
for application content, instead of a canvas. Rename
API and variables accordingly, where “container” covers
both the div and canvas cases.

Change-Id: Ibc2e096bcd5ca7e08609da348c53a404a4955c94
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-04-01 18:47:47 +00:00
Sona Kurazyan
a3f7dd5260 Allow brace initialization for some of QLatin1StringView constructors
Removed "explicit" keyword from constructors taking
(const char *, qsizetype) and (const char *, const char *).

Switched to using brace initialization for creating QLatin1StringView
in QtCore.

[ChangeLog][QtCore][QLatin1StringView] The (const char *, qsizetype)
and (const char *, const char *) constructors are no longer explicit.

Change-Id: I4f6760692e4df60fe4231e86a25f6ea03cd1bf82
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-04-01 19:33:12 +01:00
Eskil Abrahamsen Blomfeldt
678548afe8 Flush font cache when we load new application fonts
If new application fonts are loaded during the lifetime of the
application, it's possible that we have already cached fallbacks
for requests for the newly loaded font families. To make sure we
redo requests for the updated database, we have to flush the cache,
just like we do when removing application fonts.

Task-number: QTBUG-100697
Task-number: QDS-1142
Change-Id: I2a6d2a7459187d69d14ef639e2b710c8d553b86e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-04-01 18:54:30 +02:00
Tor Arne Vestbø
919f514f29 macOS: Don't scroll individual rects of a region when inline scrolling
The QPlatformBackingStore::scroll() API takes a QRegion as input, and we
kept this data type in the implementation of QCALayerBackingStore::scroll
for the logic of figuring out whether we could use the existing back
buffer as source of the scroll or if we needed to pull data from the
front buffer.

We then iterated the rects of the resulting in-line region, and called
qt_scrollRectInImage for each of them. This will unfortunately not work
whenever the scroll of one of these rects ends up overwriting parts of
the back buffer that later rects of the region use as their source rect.

This could be reproduced by moving the cursor within a text document,
which would dirty a small area around the cursor, making the subsequent
scroll of the viewport result in garbled text.

This issue exists in the other platform backingstore implementations
too, but since the QWidgetRepaintManager never calls scroll() with
anything but a single rect they would not have any issues.

The problem could potentially be solved by sorting the rects before
blitting them, but now this quick fix solves the regression on macOS.

Fixes: QTBUG-102181
Pick-to: 6.2 6.3 6.3.0
Change-Id: I80f6d26117321e3c09e068cdb03eb320e244a5de
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-04-01 15:12:24 +00:00
Pasi Petäjäjärvi
1032cc54ea Revert "Blacklist: test cases blacklisted in tst_QSystemSemaphore:"
This reverts commit 797a6ca7e6.

Reason for revert: Fixed 98de89cc15

Task-number: QTBUG-101618
Change-Id: I49c59715b8880bd89cc5cd0c8b3443a834689bab
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2022-04-01 08:00:39 +00:00
Sona Kurazyan
de6a004bc5 tst_QByteArrayView:: disable failing constexpr checks for GCC
When comiling with ubsan, GCC is being too restrictive and ignores that
'static constexpr char []' can never be nullptr. It tries to evaluate
the comparison with nullptr, and fails with:

 error: ‘(((const char*)(& hello)) == 0)’ is not a constant

Disable the checks when compiling with GCC.

Fixes: QTBUG-101307
Pick-to: 6.3 6.2
Change-Id: I8322bb7cb326e06cd03b8b107c46a494c825087b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-04-01 09:51:29 +02:00
Lorn Potter
2bf20e38b0 wasm: fix android input when fast typing
This fixes two issues:
When user fast types, more than one character would get sent sometimes.
Also, occasionally, 'Process' would appear along side of the typed
character.

Change-Id: I2ea3bfcbe987703bcbf298e0a0301bed6b8fccb3
Done-with: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Pick-to: 6.3
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-04-01 08:54:02 +10:00
Tor Arne Vestbø
1ff2793122 CoreText: Resolve default font by asking for the QPlatformTheme::SystemFont
We want to go through the themeFont() code path so that we resolve all
variants of the font, and so that the descriptors we get are preserved
until we can populate them later on.

Pick-to: 6.2 6.3
Change-Id: Idbf44062078a0722bbe71c91083285f0eb9a9e09
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-03-31 21:45:47 +02:00
Tor Arne Vestbø
3b6aba6598 QFontDatabase: Use more explicit function name for clearing families
Avoids overloading on ::free() from stdlib.h

Change-Id: I71d7fa4012f189cf5640968ed43d530eff79989f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2022-03-31 21:12:54 +02:00
Tor Arne Vestbø
4bd3080163 QFontDatabase: Move writing_system_sample() into only caller
Change-Id: I225a24a73c3d0e79db5b1a33513f5582d1abf531
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2022-03-31 20:12:54 +01:00
Tor Arne Vestbø
d0ce9886f1 QFontDatabase: Remove un-needed load() function
The function didn't take any of the arguments into account, and was
just initializing the font database, which all but one of the call
sites were already doing.

Change-Id: I83cab0059014dd256ec4b453e15fc2fe4bebcbdf
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2022-03-31 20:12:54 +01:00
Tor Arne Vestbø
a08e15cda1 QFontDatabase: Centralize initialization in ensureFontDatabase()
Instead of having multiple code paths call initializeDb(), we use the
already existing ensureFontDatabase() to provide the central point of
ensuring an initialized font database.

A couple of locks for the fontDatabaseMutex was added since the
ensureFontDatabase() function documents that as a requirement for
calling the function, but these locks were presumably already needed
as the original code paths accessed the database in the same way.

Change-Id: I5e29a069c4c7f68902dbe0c6c949a168d54f5f0e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2022-03-31 20:12:54 +01:00
Tor Arne Vestbø
c256bede99 QFontDatabase: Replace privateDb Q_GLOBAL_STATIC with instance() accessor
The use of both a global static and a dedicated instance() function made
it harder to know how and where the singleton font database was managed.

As Q_GLOBAL_STATIC is no longer needed (as of C++11) for ensuring thread
safe access we can contain the QFontDatabasePrivate singleton within
the instance() accessor.

Change-Id: Ia3d83ff2d83d326504243258a44d8ae8352d290d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-03-31 20:12:54 +01:00
Tor Arne Vestbø
4a3a6ef40c QFontDatabase: Remove unused createDatabase() function
Last uses was removed in 76068d0114.

Pick-to: 6.2 6.3
Change-Id: I8e1f404d2422e0f11dc28e52ce6dafa77e148126
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-03-31 20:12:54 +01:00
Tor Arne Vestbø
496bf5a946 lance: Handle unspecified size or weight in setFont command
We have test cases that call setFont without a specified weight, in
which case we would end up parsing an empty string into a number,
giving a weight of 0. This weight would in turn result in the
thinnest font on the system, which presumably was not the intent.

We now use default sizes and weights (similar to the default QFont
constructor arguments) if we're missing those arguments to setFont.

Pick-to: 6.2 6.3 5.15
Change-Id: I5a96f08cfa1b9e4f1de5edee6bf69ddd46f0ce92
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2022-03-31 20:54:29 +02:00
Topi Reinio
5578b47092 Doc: QMap: Add ref-qualifiers to \fn signatures for toStd[Multi]Map()
Because of a bug in QDoc there was never a warning reported for the
missing qualifiers.

Pick-to: 6.3
Task-number: QTBUG-101461
Change-Id: Ibb9114bc5d29e75158d2ac254169ba2a73043f0d
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
2022-03-31 18:23:27 +01:00
Thiago Macieira
867fee2c15 Doc: QThread: clarify that start() always creates the event dispatcher
Fixes: QTBUG-101283
Pick-to: 6.2 6.3
Change-Id: Ibf4acec0f166495998f7fffd16d6e4692be24409
Reviewed-by: Keith Kyzivat <keith.kyzivat@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-03-31 08:47:17 -08:00
Morten Johan Sørvig
4ff5a571b3 wasm: Support non-canvas container elements
Support specifying that Qt should use a div element
as the root container, in which case canvas management
is moved to Qt C++ code.

This enables us to take ownership of the canvas and its
configuration. In addition, it allows creating child
elements for the Qt container (canvas element children
have a special role are as fallback elements displayed
in case the browser can’t show the canvas)

Remove support for reading Module.canvas, which was
deprecated in Qt 5.

Add support for reading Module.qtContainerElements,
which can be either a canvas element (legacy) or a
div element (preferred).

Deprecate qtCanvasElements and print warning on usage.

Change QWasmScreen to accept either a canvas or any
html element. In the latter case, create the canvas
and configure it as required by Qt.

Change-Id: I57df8fb5772b2bfbba081af3f572b8b0e7d51897
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-03-31 18:47:17 +02:00
Edward Welbourne
aa4a2bb1e1 MS QNativeFilePermissions: fix unused member and capture warnings
Two members are only used in code that's conditioned on pseudo-feature
fslibs, which was defined in qfilesystemengine_win.cpp; move that
definition to qfiledevice_p.h so that the members's existence can be
conditioned on the same #if-ery as their use. The bootstrap build was
broken by the warning.

In the code that uses them, a lambda captured this but didn't use it,
causing the non-bootstrap build to get a warning (hence error) and
fail. So remove the unnecessary capture. Also suppressed warnings on
an unused function.

This amends commit 174af05400

Pick-to: 6.3
Task-number: QTBUG-79750
Change-Id: Ib29f3200b7736bc07df68aeec4fc6f568c8f4ddb
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
2022-03-31 16:42:47 +01:00
Edward Welbourne
3febcd6286 More startOfDay() fixes, in tst_bench_QDateTime
Update a QDateTime benchmark to use QDate::startOfDay() when setting
up its lists of date-times in helper functions, and to use noon as the
moment in the day in a creation test. Also move creation of a QTime
outside the loop: we're testing speed of creation of QDateTime here,
not QTime (and were already using the most trivial QTime constructor).

Change-Id: I26bf3369aae84a802ab03791f7341e107fede87c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-03-31 17:42:47 +02:00
Tor Arne Vestbø
64dd5a8183 CoreText: Avoid populating font family aliases if family was populated
When trying to match a font request to fonts in the database we might
end up with a mismatch due to the style not being available, but the
font family itself was.

If that's the case there's no point in trying to populate font aliases.

Fixes: QTBUG-98369
Fixes: QTBUG-99216
Pick-to: 6.3 6.2 5.15
Change-Id: I8776e5b89588a13749c9c7e414c5bfac86feab58
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-03-31 17:42:47 +02:00
David Skoland
b01ee1d44c Add WASM testrunner
Add a python script that allows us to run wasm tests in CI, along with
the necessary cmake logic to install the script and execute tests
accordingly.

Change-Id: I93b95c115538c4e27b2b833405acab8162be2a8a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-03-31 16:50:25 +02:00
Qt CI Bot
c168edba21 Merge integration refs/builds/qtci/dev/1648720546 2022-03-31 14:02:01 +00:00
Orgad Shaneh
48ef124047 qmake: Suppress built-in suffixes for make
They cause make to run much slower, and qmake writes everything
explicitly, so they're not really needed.

Change-Id: Ia47674eec8309e120c8264b7b6687677a520d5b9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-03-31 17:02:01 +03:00
André de la Rocha
4114a0ea75 Windows QPA: Fix slowdown with large table/tree views with accessibility
The accessibility code for notifying focus changes related to a
table/tree view was iterating over all items to find the focused one,
which for a very large number of items could cause a major slowdown
and UI freeze. This patch avoids the issue by removing the loop and
implementing the focusChild() method in the table/tree accessibility
classes.

Fixes: QTBUG-100997
Pick-to: 6.2 6.3 5.15
Change-Id: I04c847a5e65223b7a93ab82363feb32e1ebab9f3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-03-31 09:04:09 -03:00
André de la Rocha
350a75f792 Windows QPA: Avoid sending accessibility notifications before activation
When accessibility was activated after the application startup, it would
send state update notifications for every accessible object, which for a
large number of objects could result in a flood of UI Automation
notifications and UI slowdown. This patch ignores these notifications
until QAccessible is activated, which should avoid the slowdown and
seems to cause no side effects with accessibility tools.

Fixes: QTBUG-95114
Pick-to: 6.2 6.3 5.15
Change-Id: If1495d0aa846d7810b3d297b7e156563a7e5f6e6
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2022-03-31 09:04:08 -03:00