Commit Graph

55882 Commits

Author SHA1 Message Date
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
André de la Rocha
bcd0a32203 Windows QPA: Avoid slowdown with UI Automation name change notification
A previous fix for QTBUG-70621, which allowed changes in the state of a
Quick combo box control to be detected by accessibility clients has
reportedly caused significant slowdowns under some difficult to reproduce
circumstances, probably associated with a large number of accessible
objects. This patch restricts the name change notification to combo
boxes, which seem to be the only kind of control requiring them for
accessibility, instead of sending it for all control types.

Fixes: QTBUG-97103
Pick-to: 6.2 6.3 5.15
Change-Id: I18c0067478df5a80f7365195d3559b3f04faa815
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2022-03-31 09:04:08 -03:00
André de la Rocha
37b702dc12 Windows: Fix accessibility tests
Accessibility tests were not being built on Windows as they were
depending on a WindowsUIAutomationSupport internal module that no
longer exists, as the UI Automation support classes are now in QtGui.
The patch also fixes a test that was calculating widget geometry
incorrectly on high DPI screens.

Pick-to: 6.2 6.3
Change-Id: Iefed0f6d147853484dfab4b16838b9088fd32dcf
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-03-31 09:04:08 -03:00
Ivan Solovev
aa451b13b0 Android: enable tst_QScreen::grabWindow
Two things are done here:
- use showNormal() instead of show() to get an expected widget size.
- skip the test if HighDPI scaling is enabled with non-integer scaling
  factor, because there can be rounding errors.

Fixes: QTBUG-87390
Pick-to: 6.3 6.2
Change-Id: I653a17bac2142838b03a328e1629582384b6c7b3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-03-31 11:48:54 +01:00
Tatiana Borisova
64fc50e309 CMake uses Desktop tslib for INTEGRITY configuration by mistake
IGY doesn't provide tslib backend. QT_FEATURE_tslib should be OFF.

Task-number: QTBUG-102121
Pick-to: 6.2 6.3
Change-Id: Id6417b92864312f6437c773a472aff8517b6e5dc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-31 13:48:54 +03:00
Mårten Nordheim
8367be8ede QNetworkInformation: Deprecate vague load functions
And replace them with more descriptive versions

Change-Id: I3d5256072a5bbe0919a08b800877aa9b6a305a0b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-03-31 11:54:42 +02:00
André Klitzing
a0a2bf2d95 Update bundled zlib to version 1.2.12
The remaining diff to clean 1.2.12 is archived in the qtpatches.diff file.
Also this fixes CVE-2018-25032.

[ChangeLog][Third-Party Code] zlib was updated to version 1.2.12.

Change-Id: Ifab5d57acdc90ace61f2fd22c6dbb7ec6b4ad319
Pick-to: 6.2 6.3 6.3.0 5.15
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-03-31 08:43:56 +02:00
Alexey Edelev
2eb7a92aa3 Android: Throw an error if project uses versioned shared library
Android internally cannot handle versioned shared libraries.
There is no explicit rule for that, but indirect signs point to this.
This adds an explicit error to androiddeployqt to give the clear
understanding of the error nature to user. Error is also thrown if
versioned library was used when linking Qt libraries.

E.g. when linking Qt with liba.so it might be symlink to liba.so.1.0
This means that liba.so.1.0 Qt will require liba.so.1.0 at runtime.
But since Android doesn't handle versioned shared libraries,
liba.so.1.0 will never be packaged correctly. Most build systems
support generating of versionless shared libraries, and this should
be used when building 3rdparty libraries for Android.

Task-number: QTBUG-101346
Change-Id: Ic49d1a0d7d3a4c5c0dc308a570e98e8a0a223053
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-30 22:55:59 +02:00
Edward Welbourne
657cc31b8a QSettings: use auto rather than naming iterator types
Not always possible, but avoid the noise where we can.

Change-Id: I4a37cc3e806b1b9d696647aca7303b30e36b471b
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-03-30 21:37:24 +02:00
Edward Welbourne
4fa60c1736 QSettings: s/int/qsizetype/ on the internals
Can't change the public API, but we can at least change the internals
to use the right type, ready for when we do. Also changed some C-style
casts to function-style, even when the type remains int; renamed an
inner loop variable to avoid shadowing an outer; and changed a use of
count() to size().

Change-Id: Id52ce0a2f0177bf1d6dfbd45a592a45afcddf9b4
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-03-30 21:37:24 +02:00
Edward Welbourne
605c747321 QSettingsPrivate: fold from/to parameters into the view they bound
Two methods of the private class used to take a QByteArray with from
and to indices into it, for where to start and stop a scan. Now that
they take a QByteArrayView, those parameters can be used by the caller
to shorten the view to the desired portion.

Change-Id: Id1586afb87a9e8a189b69e485278375ff504fb7b
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-03-30 21:37:24 +02:00
Edward Welbourne
08d20ee850 Use QByteArrayView more in QConfFileSettingsPrivate's methods
Avoid allocating QBA methods when the QBAV methods can do just as
well, especially where the QBA was already being QBAV-wrapped to avoid
such allocations.

Change-Id: I180c2316362685ffda613bab2c761e72c4483fce
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-03-30 21:37:24 +02:00
Edward Welbourne
b4d003c77f Prefer sliced()/first()/chopped() to mid() and arithmetic
The newer methods bypass checking and make it clearer what's
happening. They're also available on QBAV, unlike mid().

Change-Id: Ie0375888b889e393b91814ba80529d1a7227eb7f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-03-30 21:37:24 +02:00
Alexandru Croitor
8e4ef10c38 coin: Add CI_PATH_SEP env var with value of host OS path separator
Can be useful in the future for path construction, to avoid adding
two different instructions where the only difference is the path
style.

Pick-to: 6.2 6.3
Change-Id: Id67b287a2d9f67889dcc5c4fc7781d9ef60a56be
Reviewed-by: Toni Saario <toni.saario@qt.io>
2022-03-30 21:03:47 +02:00
Assam Boudjelthia
d1d96a3cdd Android: skip crashing tests tst_QOpenglWidget::clearAndResizeAndGrab()
Skip the crashing case temporarily to allow other tests to run
while finding a fix.

Pick-to: 6.2 6.3
Task-number: QTBUG-100470
Task-number: QTBUG-102043
Change-Id: I8b16f95e5c66b95cc9959494b5317d39d58194e6
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-03-30 21:55:21 +03:00
Tor Arne Vestbø
3188615db6 iOS: Handle changes in user font preferences by invalidating font database
The user may tweak the appearance of text rendering on iOS to aid a11y,
by making the text larger or smaller, or bold. This feature, known as
Dynamic Type, will be reflected in the preferred content size category
of the application.

When we detect changes in this preferred content size category we respond
by invalidating the font database, which will trigger the application
to re-evaluate the sizes and weights of the theme fonts.

Unfortunately we do not currently pick up or propagate the scaled font
metrics when an explicit point or pixel size has been set on a QFont,
but this problem exists regardless of whether we dynamically handle
changes to dynamic types or only pick them up after an application
restart.

Change-Id: I8c722d0bfb4b76eade47ebfb6512e6676a910d6a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-03-30 19:55:21 +01:00
Tor Arne Vestbø
d84018616a macOS: Handle changes in the available fonts by invalidating font database
The user may use the Font Book application to add or remove fonts,
which affects the fonts that are available to Qt applications.

As the cross platform QFontDatabase implementation currently doesn't
support granular management (removal) of fonts, we need to invalidate
the entire font database.

Since the theme fonts on macOS (and iOS) are managed by the font
database we also need to invalidate the theme fonts, and report this
back to the application.

Change-Id: I1f6a7900f76e0b6a1f059bd43638a04bc0808e20
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-03-30 19:55:21 +01:00
Tor Arne Vestbø
c7280b3362 CoreText: Populate all variants of theme/system fonts
We populate the various QPlatformTheme::Fonts by asking the system for
the preferred font for each use-case, but that just gives us a single
font descriptor with a single style and weight. If the user then tweaks
the font by e.g. making it bold or italic, our font database will not
have any knowledge of these variants, and will fall back to another
font.

To fix this we ask CoreText for all variants of each of the theme fonts,
so that each of the theme font families are fully populated.

The preferred way to do this on macOS 10.15/iOS 13 and above is by using
the font's UI design trait. This avoids asking CoreText for private
fonts by family name directly, which is not supported and may result
in giving us Times or another fallback font instead.

Pick-to: 6.2 6.3
Change-Id: I4aa21624df62ac09a92d7ae0bc2cdde4f6ad6e5f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-03-30 19:55:21 +01:00
Tor Arne Vestbø
a068f2d7c9 CoreText: Add note about why we defer population of theme font descriptors
Pick-to: 6.2 6.3
Change-Id: I7018a92467c6db1b9d04b88e50113ba9c9d1a3b7
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-03-30 19:55:21 +01:00
Tor Arne Vestbø
741a4987b8 CoreText: Reuse descriptorForFamily helper function in populateFamily
Pick-to: 6.2 6.3
Change-Id: I2c1098309fc994fb7a131564679299a2e850870a
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-03-30 19:55:20 +01:00
Tor Arne Vestbø
1ab928c7f6 CoreText: Make population of theme fonts explicit
Pick-to: 6.2 6.3
Change-Id: I95e6b535e8ec98ca13c9a58f1e4ae4358ed9f028
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-03-30 19:55:20 +01:00
Pasi Petäjäjärvi
8e08286d45 tst_QNetworkInterface: Update network test server handling
Adds docker support and makes it no longer skip the whole test
if there is no docker or network server.

Pick-to: 6.2 6.3
Change-Id: Ie98496df338a804d5c9842cce372e3410fdf9990
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-03-30 17:33:08 +00:00
Pasi Petäjäjärvi
82188607e3 CI: Add docker support for qnetworkaccessmanager_and_qprogressdialog test
Currently test relies solely for external test server. This makes it
not possible to run test successfully with environment where docker is
used.

Pick-to: 6.2 6.3
Change-Id: I51f4f48a80c1be8dd24359fe24d9cbfd471d2195
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-03-30 19:33:08 +02:00
Yuhang Zhao
c8ca0e7070 Fix build with clang-cl
qtbase\src\corelib\global\qglobal.cpp(3510,21): error: call to member function 'endsWith' is ambiguous

Change-Id: I2b20077584a33ca5f40efdf397b5913afd6e7fae
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-03-31 01:05:59 +08:00
Ivan Solovev
ad9f748db5 Android: skip tst_QNetworkProxyFactory::genericSystemProxy
Android uses its own implementation of QNetworkProxyFactory, so the
test of a generic implementation will never be working there. The
"http_proxy" environment variable is simply ignored in Android's
implementation.

Fixes: QTBUG-87385
Pick-to: 6.3 6.2
Change-Id: I3c24e3481b70872d332310aa86c68adad9c2b7e6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-03-30 19:05:59 +02:00
Ivan Solovev
7c9b4f86b6 Android: activate tst_QPluginLoader
- Use QT_ANDROID_EXTRA_LIBS to correctly deploy libraries on Android.
- Update the test code to use application libraries directory
  on Android.

This allows to enable the test for Android in CMakeLists.txt

Task-number: QTBUG-87438
Pick-to: 6.3 6.2
Change-Id: Ib74da036472320736888052b63a45ca50431de48
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-03-30 19:05:59 +02:00
Ivan Solovev
ed6fe5abc8 Android: activate tst_QLibrary
On Android we demand the libraries to always start with "lib" and
end with ".so" extension. Also Android does not support versioned
libraries.

This patch updates CMakeLists.txt to fulfill these requirements,
and also omits some unsupported test cases.

This allows to enable this test for Android in CMakeLists.txt

Task-number: QTBUG-87438
Pick-to: 6.3 6.2
Change-Id: Iec30acdefe00c471acc7139cd255b3389e31d22b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-03-30 19:05:59 +02:00
Tasuku Suzuki
5cbb93adc7 configure: Add mold to help
Pick-to: 6.2 6.3
Task-number: QTBUG-99270
Change-Id: I08ee2b328a1dba2bf0172e5a03ddb32925401d3b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-31 01:22:02 +09:00
Pasi Petäjäjärvi
ece174c50f CI: Increase QNX qemu startup timeout
For some reason starting of qemu randomly fails in the given timeout.
Set it to reasonably large amount so that we can rule out issues with
qemu itself. Also increase script timeout less than what coin gives
for the script to run se we should see if script bails out and is not
stuck.

Pick-to: 6.2 6.3
Change-Id: I37c7ec636f154955c6472d5e9d0fa92bb5bb457f
Reviewed-by: Toni Saario <toni.saario@qt.io>
2022-03-30 08:42:52 +00:00
Tor Arne Vestbø
344e0e7141 Revert "Avoid populating font family aliases if family matched"
This reverts commit 69d525a6fa.

The change introduced behavior changes on Windows, where family
aliases are used to build a full set of styles for a family.

Change-Id: I64ca1cf5febf0a6277cbe0a0041ccdb76da72196
Pick-to: 6.3 6.2 5.15
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-03-29 23:26:37 +00:00
Samuli Piippo
9a74d94ff5 Coin: use CMAKE_STAGING_PREFIX for cross-compilations
Re-apply 9a9b253b68 to use
CMAKE_STAGING_PREFIX in cross-compilation builds.

Amends b7986a8f6e9df3727f433a0df0ba56a3355153d0.

Fixes: QTBUG-102108
Pick-to: 6.3
Change-Id: I8875da2df1427f02be68dd737168d76a8dc4ed2a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-03-29 21:12:13 +00:00
Edward Welbourne
0bdc7322d9 Tidy up QTapTestLogger::addIncident()'s regex parsing
It had some repetition that could be refactored out, some long lines
and a bool it worked out the hard way, when it had previously
determined the answer in passing without recording it.

Change-Id: I9e53ed087dfbe8067686b27b6cf9ac32040fbf19
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-29 22:21:58 +02:00
Edward Welbourne
784f5d76b9 TAP test logger: report B?XFAIL (mostly) as a message
Previously, only the first B?XFAIL would be reported, all others would
be discarded. Furthermore, if a B?XFAIL had happened, B?PASS was also
not reported, since the B?XFAIL served as test line. However, if the
B?XFAIL was followed by a SKIP, B?XPASS or B?FAIL, these were reported
as normal, producing exactly the kind of duplicated test line that the
skipping of B?PASS was meant to supply.

So change B?XFAIL to be reported among the messages, but retain the
TODO annotation of the first on the test line of a subsequent B?PASS,
if nothing more drastic happens in the mean time. So now more than one
B?XFAIL can be reported, the test is still marked as a TODO and we
don't get duplicate test lines for a subsequent non-passing result.

This replaces the bool m_wasExpectedFail member with a QTestCharBuffer
m_firstExpectedFail that records the first XFAIL's TODO line (so its
isEmpty() fully replaces m_wasExpectedFail).

Previously, the at/file/line information for a B?XFail would be
supplied as top-level keys in the YAML block for a "Pass" reported as
not ok due to the XFail, as this location information is now part of
the B?XFail's message in the extensions/messages block. Duplicating
the first B?XFail's location at top level would add complexity and is
arguably misleading, as the test result is really a pass (after
ignoring known issues), and the location of the pass is indeterminate
(nominally the end of the test function, but actually also after the
cleanup() call for this test, when relevant), which is why a Pass has
no location information.

Task-number: QTBUG-96844
Change-Id: Ib3f24f56266ff49bf3bc9759ac8263ac69a62130
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-03-29 22:21:58 +02:00
Edward Welbourne
ac38401d31 Move TAP's messages block to after the primary report details
In the process, split it from its comments block and don't bother with
a YAML block if it would only have contained comments.

Task-number: QTBUG-96844
Change-Id: I08c20f796252bb270ba9caa4c055cdcc0843a88b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-03-29 22:21:58 +02:00
Edward Welbourne
299186602a Add a test and remove a work-around for a fixed bug
The ASN.1 parser for a date-time had to check the date-time string was
all digits to catch the case of a sign in the month field, which used
to be accepted when it should not be. That bug has now been fixed, so
remove the work-around and add a second date-time test-case, renaming
(and modernising) the existing one for consistency.

Task-number: QTBUG-84349
Change-Id: I649c5129312b6865af08b22ba6893cb4e29243f8
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2022-03-29 22:21:57 +02:00