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>
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>
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>
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>
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>
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>
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>
Not always possible, but avoid the noise where we can.
Change-Id: I4a37cc3e806b1b9d696647aca7303b30e36b471b
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
Implement support for detecting Light/Dark mode on iOS. This is needed
by the QQuickIOSStyle in order to display the proper image assets
according to the theme.
A further improvement would be to react to theme changes dynamically.
Change-Id: I95e11c4a4b647614bdd78d734941d2b11546687a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The deprecation note for one of the operator* is wrong: Using
mapVector() is never the right choice given the deprecated operator*
itself is implemented by calling map(). It could be that in some cases
the results are identical so one can get away with migrating to
mapVector(), but this is incorrect in other cases and causes
regressions all over the place. Thus we should only recommend using
map() instead, never mapVector(). As shown by recent experiences, the
current docs are insufficient/wrong and caused a number of regressions
in the Qt code base as well.
Also enhance some related docs. It could be that the wording is not
always academically correct, however having some additional notes in
there help make it obvious to the reader (or at least raise some
alarms) that there are important differences between map and
mapVector.
Also improve the note for the other deprecated operator*. There is
only one way to convert to a vec4, given the existing implementation
of the operator, and that is by using 1 for w. Make this clear to the
reader.
Pick-to: 6.3 6.2
Change-Id: I1d8dbca44fdc103ab62d49bfc1d4ce37a9bc130b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
The original using is outside QT_NAMESPACE, so it is
not correctly picked up by various parts of the code.
Simply moving it inside QT_(BEGIN|END)_NAMESPACE revealed
that the namespace (and thus scope) is closed and re-opened.
in the file, so fix that too.
Change-Id: I704f164b5705b539dbdf25b7743f5e339c016600
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
We can not trust __clang_major__ and __clang_minor__ for Apple Clang,
but we still want a single Q_CC_CLANG define that can be used to check
the Clang version.
Pick-to: 6.3 6.2
Fixes: QTBUG-99020
Change-Id: I5128c1ff40d1ef1afeaab3c7fa4988a5bb170742
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
If xcrun prints warnings or errors to stderr while determining the SDK
version, they become part of the SDK version string. This then leads to
a qmake error.
Intentionally ignore stderr so that it is not treated as part of the SDK
version.
Pick-to: 5.15 6.2 6.3
Fixes: QTBUG-102066
Change-Id: I023296b430aac1407c970412c5cf1010bd81589b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Commit a35a7fcb5a introduced the usage
of insets to correctly take into account the default Android status bars
and other reserved regions.
However in practice that does not work as expected - the bottom inset
is always reported to be non-zero, even when fullscreen mode is enabled.
To fix the issue, FLAG_FULLSCREEN is explicitly checked before applying
the insets.
Fixes: QTBUG-99624
Pick-to: 6.3 6.2
Change-Id: I8b25f0b06447cd452c42ef072493e3137e25f38b
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Fix some obvious issues, QSKIP or blacklist other problems.
This does not fix all the test failures, but allows to enable most of
the test cases, so that we could catch future regressions.
Task-number: QTBUG-87668
Pick-to: 6.3 6.2
Change-Id: I1ed0b476d4ac55c658c572cfa1379fcdc6137ee8
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This function should be used in QWidget-related test cases instead of
QWidget::show() when you need to move or resize the widget and then
compare its position or geometry with the expected value.
The reason for introducing it is that on Android QWidget::show() is
showing the widget maximized by default, so its position and size
can't be changed.
Task-number: QTBUG-87668
Pick-to: 6.3 6.2
Change-Id: I8ec5c07b73968b98d924a41e5d41ddb4d7be1ced
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Do not try to properly specify a path to an external syslocale app,
because the related test can't be executed on Android anyway.
This fixes a failure in initTestCase() and allows to unblock other
test-cases.
Also skip systemLocale() test, because Android platform plugin already
creates a custom QSystemLocale instance, so a hack with MySystemLocale
does not work.
As a drive-by: simplify the #ifery in initTestCase() and remove an
unused second parameter of QSKIP() in emptyCtor_data().
Fixes: QTBUG-87414
Pick-to: 6.3 6.2
Change-Id: Iefc587062362469856fdca77f9ec9d96f5552e45
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Fix binary_for_strip project not being found when the following
conditions were met:
- building a repo other than qtbase
- qtbase sources are not available on the machine
(usually happens in CI where only the current repo sources are
available).
The issue was that QT_CMAKE_DIR would always be defined, regardless of
which repo was being built and the system would incorrectly assume
the location of the project files.
The fix is to always pick up the sources from qtbase's source dir if
they are available (this time done with an appropriate check),
otherwise use the installed files.
Note that the behavior of always using the qtbase sources if available
is not exactly the best, but it is a more general issue that affects
other code too.
In the name of consistency, make it so for the binary_for_strip
project as well, but add TODOs in code to address the situation
in a separate change.
Amends 39f657032b
Pick-to: 6.2 6.3
Fixes: QTBUG-102064
Task-number: QTBUG-88090
Task-number: QTBUG-101653
Change-Id: I0649f945e9ff0ab1f597c51bb5ab389fa665c021
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Fix bug where QScreen::geometry() returns incorrect
(unscaled) geometry.
We maintain state:
- QHighDpiScaling::m_active, which is set to true
if any screen in QGuiApplication::screens() has a
scale factor > 1, in updateHighDpiScaling()
- QScreen::m_geometry, which is assigned the scaled
screen size in QScreenPrivate::updateHighDpi()
Now the problem is that updateHighDpiScaling() requires
an up-to date screens list, and that updateHighDpi()
requires an up-to date m_active, and that currently
updateHighDpi() is called when constructing the QScreen
only.
This is all a bit unsatisfactory, but for now fix this
in the simplest way by adding a second call to
updateHighDpi() in handleScreenAdded(), after the call
to updateHighDpiScaling().
Pick-to: 6.2 6.3
Fixes-number: QTBUG-101601
Change-Id: I5f442ceb966c77d6746ee885203b67da96612587
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Still not complete. Just grepping for static and thread_local.
Task-number: QTBUG-100486
Change-Id: I90ca14e8db3a95590ecde5f89924cf6fcc9755a3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>