Commit Graph

54853 Commits

Author SHA1 Message Date
Dimitrios Apostolou
b013f94086 Write XML test log files even for the flaky test re-runs
Previously the qt-testrunner script was avoiding to write XML log files
for the flaky test re-runs, since parsing them always provides limited
information about what went wrong (for example unparseable files) and
might miss issues completely (for example a crashed test might not even
write a log file), or even mislead if multiple different data points
about a single testcase end up into the database..

But currently Coin is the system that uploads test information to the
testresults database and expects to find such log files in an attempt to
send as much information as possible regarding failures.

Re-enabling these log files will allow Coin to deduce as much
information as possible about the test runs.

This is a temporary step at least, until the test-uploading logic is
separated from Coin. Then it will be easier to find the full information
about what happened with flaky or crashed tests by special logs from
qt-testrunner.py, which is the test re-running orchestrator and
therefore has more knowledge about what went wrong.

Fixes: QTQAINFRA-4754
Change-Id: I69e4469cbe6c0a6ca5b2473eaf8d034632564342
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Toni Saario <toni.saario@qt.io>
Reviewed-by: Simo Fält <simo.falt@qt.io>
2022-01-30 01:00:35 +01:00
Dimitrios Apostolou
b4d9d5c89c qt-testrunner: do not try to re-run initTestCase and others
Some function names are special for qtestlib, in the sense that they can
not be specified as a command line argument to run individually.

In such cases qt-testrunner treats the failure specially and tries once
to re-run the full test executable.

Fixes: QTBUG-89011
Change-Id: I0cc25f91c57374e5ac65ade10e2e223fe969f211
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
2022-01-30 01:00:35 +01:00
Marc Mutz
1ae5b3628d QCalendar: replace two overloads with one QAnyStringView function
The backend was already ported, so this is just about applying
QT_REMOVED_SINCE and updating the docs.

Change-Id: I2c78908deb9cdb3cee19ce8bc148ab3117c1ad9a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-01-30 00:03:45 +01:00
Marc Mutz
9bfc8f348d QFlatMap: add full is_transparent support [2/3]: shuffle functions
Move the do_{remove,take}() functions into the private section,
cleaning up after the previous step.

Pick-to: 6.3
Change-Id: I3325336458b34e7f376b42bfe68355d93ff4ce70
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-01-29 20:04:24 +01:00
Allan Sandfeld Jensen
7e591453be Fix finding GSSAPI
The package is called mit-krb5-gssapi on Ubuntu, and the LIBDIR variable
was missing an underscore.

Pick-to: 6.3 6.2
Change-Id: I85b5603c1161f33462aa71bbd522d40dd7489405
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-01-29 11:46:04 +00:00
Volker Hilsheimer
35e938c2d8 Remove QEXPECT_FAIL for test passing on Android
The test has been XPASS'ing recently on Android.

Reverts 67e209f59f.

Fixes: QTBUG-69216
Change-Id: Ic629cc28936e0ef27277c243717e97226bf01b1c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-01-29 10:47:08 +01:00
Thiago Macieira
ce41151215 qfloat16/F16C: rewrite the F16C conversion with overlapping
We don't have to be completely sequential. It's perfectly fine to
overlap loads and stores and this leads to simpler code.

Change-Id: I6fcda969a9e9427198bffffd16ce56ebbc948379
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-01-28 22:40:25 -08:00
Thiago Macieira
073454901d qfloat16: add missing static
Commit 0df7831d01 moved these functions
into this file, but forgot to add the marker.

Drive-by replace Q_DECL_NOEXCEPT with noexcept

Pick-to: 6.3
Change-Id: I6fcda969a9e9427198bffffd16ce5543c5fd544e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-01-28 22:40:23 -08:00
Thiago Macieira
cdb78d7993 qsimd/x86: disable the F16C, FMA, and VAES features if AVX is disabled
Those three features can't be used without the VEX prefix, which
requires that the OS has enabled saving of the AVX state on context
switches (i.e., use XSAVE).

The list is automatically maintained by the updated script in
OpenDCDiag[1]. I need to update the copy in util/x86simdgen.

[1] https://github.com/opendcdiag/opendcdiag/blob/main/framework/scripts/x86simd_generate.pl

Pick-to: 6.3
Change-Id: I6fcda969a9e9427198bffffd16ce55193a6cb069
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2022-01-28 22:40:22 -08:00
Thiago Macieira
671035035a QVersionNumber: remove the "pure" attribute from commonPrefix()
This function can allocate memory, so it's not pure.

Pick-to: 5.15 6.2 6.3
Change-Id: I6fcda969a9e9427198bffffd16ce7fcff3ae021d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-01-28 22:39:57 -08:00
Thiago Macieira
c05ee60a2f QEvent: initialize the static userEventTypeRegistry constexprly
The {} is the difference.

Pick-to: 5.15 6.2 6.3
Change-Id: I6fcda969a9e9427198bffffd16ce8dabd213393e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-01-29 04:26:09 +00:00
Marc Mutz
82147ce33a QString: optimize finding size=1 needles in QLatin1Strings
Use memchr() if the needle has size() one, and add a fast path in
findString(QLatin1String, QStringView) to circumvent the QVLA path. We
might want to extend this and use a simple C array for very short
needles and (cached?) Boyer-Moore for anything larger.

Pick-to: 6.3
Change-Id: I8364ea9f004d537be8a09cc751408d8adb902d13
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-01-29 03:43:29 +00:00
Marc Mutz
7b7c3355f2 QFlatMap: add full is_transparent support [1/3]: split functions
Extract Methods do_foo(iterator) from their respective foo(Key)
methods.

This is done in order to separate the common code from the code that
will differ in the is_transparent overloads.

Leave the function bodies where they previously appeared, for easier
reviewing.

Pick-to: 6.3
Change-Id: I49f41f9121a047df696f39daeaa0a9da6a16dddb
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-01-29 02:40:12 +01:00
Marc Mutz
f08f28548a QFlatMap: implement mutable op[] via try_emplace()
De-duplicates code.

Pick-to: 6.3
Change-Id: Id7841a0717cd66bd56d489e6d2630e9eeb284316
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-01-29 02:40:12 +01:00
Ben Fletcher
1e07787142 rhi: Fix tessellation support for OpenGL
Added shader stage mapping for tessellation stages.

Manual test rhi/tessellation now works for OpenGL.

Change-Id: I7906b21e9d6e20883f17729f077dba57aa29f4fd
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-01-28 14:31:02 -08:00
Marc Mutz
37714d255b QCalendar: replace ostream-style qWarning with printf-style one
Saves the <qdebug.h> include and expands to a lot less code.

Pick-to: 6.3 6.2
Change-Id: Ic1a0aa707e7c0d4bd54da45a7fcafbf898681b2d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-01-28 22:00:22 +01:00
Marc Mutz
d030606a5a QFlatMap: use erase() in remove()
De-duplicates code.

Pick-to: 6.3 6.2
Change-Id: I95d3d6f57c2f3716b8f3f549d1cc2a02cde9e996
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-01-28 22:00:22 +01:00
Marc Mutz
1cb192bf3d QFlatMap: replace manual const_cast<>s with std::as_const
Shorter, because it doesn't need to name the type.

As a drive-by, replace all remaining uses of the private full_map_t
alias with 'QFlatMap', the class name, which, also in templates,
refers to the class, not the class template.

Pick-to: 6.3 6.2
Change-Id: Ie3bada43d9d28a84543e8baa8a36c522dff80b9e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-01-28 22:00:21 +01:00
Thiago Macieira
7792360413 QVersionNumber: remove "pure" declaration from fromString()
GCC doesn't like that we modify the contents of passed by pointer in the
pure function. Reading the description of this attribute in the GCC
manual was ambiguous then, but I can see the GCC maintainers'
interpretation.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104243

Fixes: QTBUG-62185
Pick-to: 5.15 6.2 6.3
Change-Id: I6fcda969a9e9427198bffffd16cdf815d059d252
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-01-28 13:00:21 -08:00
Marc Mutz
55a88206f3 QCalendar: eradicate Java-style iterator
We had QT_NO_JAVA_STYLE_ITERATORS in .qmake.conf, but it was lost in
the transition from QMake to CMake, and - plop - they start trickling
in again.

Pick-to: 6.3 6.2
Change-Id: Ib92937e5fe510aba2aad92809f7a6d5fbae6f3a0
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-01-28 22:00:21 +01:00
Marc Mutz
096e8b5f65 QLocale: replace a QList with QVLA for duplicate tracking
An alternative would have been QDuplicateTracker, but the maximum
number of entries in the tracker is statically limited to six, so we
don't need a fancy hash table, linear scan is good enough.

Pick-to: 6.3
Change-Id: I8ca97d239723b51892cb13a43b1d1a6412faa561
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-01-28 22:00:21 +01:00
Ilya Fedin
d13ee2dc1a Let QXcbGlxWindow::createVisual fallback to QXcbWindow::createVisual
When flatpak refused to install org.freedesktop.Platform.GL.default for
me, I got into a situation without GL drivers and Qt applications
stopped getting transparency windows.

They fallback to use root_visual and it doesn't provide sufaces with
alpha, I tried to add fallback to QXcbWindow::createVisual just like
QXcbEglWindow::createVisual does and voila, they got transparency.

Pick-to: 6.3 6.2 5.15
Change-Id: I9f401643b3ef231048c6e9e250121c96514101f5
Reviewed-by: Liang Qi <liang.qi@qt.io>
2022-01-28 16:15:28 +01:00
Thiago Macieira
1acdb290e8 QUrl: use qsizetype & size_t in place of int & uint
Allows for URLs with more than 2 billion characters. I'm sure someone
needs this...

Change-Id: I0e5f6bec596a4a78bd3bfffd16c9991e4e6cacbf
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
2022-01-28 01:50:48 +00:00
Ivan Solovev
850a7f1238 Android A11Y: fix content update notification when object is hidden
When the object is hidden, we should not use its viewId to notify
content changed. Instead, we need to use its parent id.

Task-number: QTBUG-95764
Pick-to: 6.3 6.2 5.15
Change-Id: I608658e21c401d76459a09e4b274c60b849ace86
Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-01-28 00:22:41 +01:00
Ivan Solovev
f6ddb3e921 Android: explicitly remove accessibility focus when element is hidden
Before this patch when an element that had an Accessibility focus was
hidden (for example, a button because of Accessibility.onPressAction),
the focus was still remaining on that hidden element. So the next
doubletaps on the screen caused the Accessibility.onPressAction() of the
hidden element to be executed again and again.

To fix this, we have to explicitly send a FOCUS_CLEARED event to the
Android OS, when the object is hidden.
Another needed fix is to set the m_focusedVirtualViewId in
notifyObjectFocus() properly.

Fixes: QTBUG-93393
Pick-to: 6.3 6.2 5.15
Change-Id: I6ff8a19868b96842719924037545c4ecc91e0dad
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-01-28 00:22:41 +01:00
BogDan Vatra
c1a93b20ff [Android]: Handle the screen name, modes and refreshRate properly
Fixes: QTBUG-87136
Fixes: QTBUG-93823
Fixes: QTBUG-94959
Pick-to: 6.3 6.2 5.15
Change-Id: Id480e22611ec949b5e3ee780fc695fb502a5950c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-01-28 00:22:41 +01:00
Tatiana Borisova
e76d27d3ed Exclude tst_selftests when feature process is disabled
- It should not be built for systems without process feature.

Task-number: QTBUG-99123
Pick-to: 6.2 6.3
Change-Id: I71caa59c2168435894c7d1afcc8226e44178439f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-01-27 21:35:58 +02:00
Joerg Bornemann
75082c9f20 Remove QSharedMemory from the bootstrap library
It's not used by any bootstrapped tool anymore.

Pick-to: 6.2 6.3
Fixes: QTBUG-100074
Change-Id: I92cf441c200174e73b483cb4f08bab6c3e7d9c09
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-01-27 13:31:56 +01:00
Marc Mutz
cd3569d69a QString: optimize compare_helper
For a long time now we have fast mixed UTF-16/UTF-8 comparisons. But
no-one told this ol' relic, which still converted UTF-8 to UTF-16 for
comparison.

Fix by using QtPrivate::compareStrings(QSV, QU8SV), which, as the
central entry point, uses the fast-path.

Consequently, compare_helper can now be noexcept.

Pick-to: 6.3 6.2
Change-Id: I4cc9f07d9bc48628f1fe695e80015a9a07b79d6f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-01-27 04:25:17 +01:00
Marc Mutz
88fd9a281a QFlatMap: avoid post-(in|de)crement on iterators
Generic code needs to avoid post-increment and -decrement, because
they're less efficient than pre-increment and -decrement when
implemented in class types as opposed to scalars (extra copy
necessary).

Use the common pattern of implementing post- using pre-increment.

Pick-to: 6.3
Change-Id: Ida38df04c6c6f877453e5b3a1983457cc7f63f11
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-01-27 04:25:17 +01:00
Axel Spoerl
878aea3645 Add QTabBar test in tst_baseline_widgets
Task-number: QTBUG-99772
Pick-to: 6.3
Change-Id: I501c8e5c8e3ee1a1d3ac2a36b12f51dab90c88c3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-01-27 02:45:14 +01:00
Marc Mutz
8224fd45d0 QtCore: includemocs
This leaves moc_qnamespace.cpp in mocs_compilation.cpp.

Including moc files directly into their classes' TU tends to improve
codegen and enables extended compiler warnings, e.g. about unused
private functions or fields.

Pick-to: 6.3 6.2 5.15
Change-Id: Ifdff378c74828e12ec770cb2f453dab3a880e2a5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-01-27 01:36:04 +01:00
Marc Mutz
97b465455b QCalendar: move memory allocation out of critical section
By Amdahl's Law, provides for more scalability.

This is just for backporting. The registry should really be able to
perform lookups without allocating memory...

Pick-to: 6.3 6.2
Change-Id: Ifbb832a06991b9ee9a1fd6a43db567bb572fca4f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-01-27 01:36:04 +01:00
Alexey Edelev
4ecbebebf7 Check if 'aab' target exists when adding <target>_make_aab as dependency
The global 'aab' target has its own switch QT_NO_GLOBAL_AAB_TARGET
that prevents it from being created. We need to check if 'aab' target
exists before adding <target>_make_aab as a dependency.

Pick-to: 6.3 6.2
Change-Id: Iea569e3b6c7dfb6d0efa60dd2001fb9de161f725
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-01-26 23:57:00 +00:00
Alexandru Croitor
c8621da852 CMake: Fix host UiTools being picked up instead of target one
Pick-to: 6.2 6.3
Fixes: QTBUG-100233
Change-Id: Id4b30841ba9e499f462325f882218edf407e0a00
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-01-27 00:17:14 +01:00
Joerg Bornemann
7015eafa5c qt6_standard_project_setup: Don't enable AUTORCC
We discourage using AUTORCC, so don't make it the default for our
"standard project setup".

Pick-to: 6.3
Task-number: QTBUG-87643
Task-number: QTBUG-100209
Change-Id: I2715ec561266bfed5ea4ac7722ab1f1c8b982788
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-01-26 23:57:43 +01:00
Volker Hilsheimer
8359e44324 Offscreen: Fix implementation of QScreen::grabWindow
If id == 0, then we should grab the specified rect from the screen.

To do that, find all windows intersecting with the screen geometry, and
compose their backing store images into a screen-size pixmap.

Otherwise, find the respective backing store and grab only that.

Remove the old code respecting the desktop widget, which is no longer a
thing in Qt 6. The code was also wrongly grabbing only the first
containing - not intersecting - window's backing store into the screen
pixmap.

Enable the QScreen::grabImage test for the offscreen platform, where it
now passes.

Task-number: QTBUG-99962
Change-Id: I16eca7b082d65095a62c73624f86a4423e997a7a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-01-26 17:18:18 +01:00
Volker Hilsheimer
5d1bb2ed57 Offscreen: Implement QPlatformBackingStore::toImage
Re-applies 77895514d5419b77535de093b544aee30686cd22, which was
reverted after tests started to XPASS-fail in qtdeclarative. Those
tests are now get consistently QSKIP'ed, so reapply the change.

This makes testing of actually produced output easy in unit tests,
and makes a number of previously failing QtDeclarative tests pass.

Task-number: QTBUG-99962
Change-Id: I167b46b954dee18bdbf90c09c5e42a8c179a1fac
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-01-26 17:18:18 +01:00
Axel Spoerl
5d75e9d8b0 Add QScrollBar test in tst_baseline_widgets
Task-number: QTBUG-99882
Pick-to: 6.3
Change-Id: I9e9d3a674c205d26dd008b7de4e4ce31f470bf51
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-01-26 10:00:23 +01:00
Jungi Byun
574b625914 evdev: Prevent race condition in touch events processing
Unlike other input devices, touch devices are managed by corresponding
handler threads which are not the main thread. InputEvent that is
inherited by TouchEvent has a constant pointer member for device, but in
touch events case, handler threads may destroy the device which is
pointed by events while processing these events in main thread,
and this may cause critical potential issues such as crash. In order to
prevent this race condition, move device of QEvdevTouchScreenHandler
into main thread and delete this device later if QGuiApplication
instance exists when handler thread quits, and check event's device is
valid when processing touch events.

Change-Id: I02583238d97d768abcc544ee882160eda3178282
Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-01-26 01:01:31 +00:00
Eskil Abrahamsen Blomfeldt
2e29a427ca Windows: Change default hinting preference for high-dpi
When high-dpi is enabled, we would previously default to
QFont::PreferVerticalHinting which maps to the asymmetric
antialiasing strategy, where only horizontal antialiasing is
enabled.

The idea behind this is that it provides crisper text,
especially for smaller font sizes, but for larger font sizes
the aliasing artifacts outweigh the added sharpness.

Inspecting native Windows applications, such as the system
settings, it looks like asymmetric antialiasing is used
up to a certain font size threshold. The documentation uses
a font size of 16 as the suggested threshold.

In accordance with the documentation, we use PreferNoHinting
for font sizes above this threshold.

[ChangeLog][Windows] When high-dpi scaling is active, the
default text antialiasing has been set to symmetric for
larger fonts (pixel size higher than 16 px). The old default
can be selected manually as QFont::PreferVerticalHinting.

Fixes: QTBUG-99066
Change-Id: Ibf53556f6e2cbbe1dc5d30c6c1743a499a99a90b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2022-01-25 17:20:26 +01:00
Edward Welbourne
78eac57f3d Check for null driver() before trying to exec()
QSqlQuery::exec() took for granted that it can dereference driver(),
which should be true for all sane usage; however, it should not crash
if used misguidedly. Added regression test, based on bug report's
reproducer, which crashes without the fix.

Fixes: QTBUG-100037
Pick-to: 6.3 6.2 5.15 5.12
Change-Id: I94600bc60f89e82a1121b418144006a683921a38
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2022-01-25 16:18:35 +01:00
Friedemann Kleint
f172b964f6 threadedqopenglwidget example: Split out class Renderer
This makes the code clearer and decouples it from the
GLWidget.

As a drive-by, add a global shortcut to close.

Pick-to: 6.3 6.2
Change-Id: I3469d29bc367acc17c5f8acf9d46219259b8315b
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-01-25 15:54:05 +01:00
Giuseppe D'Angelo
2d95b75345 QByteArray: fix isUpper/isLower
577d698b8e changed QString::isUpper /
isLower behaviors to match Unicode semantics: a string is uppercase
if it's identical to its own toLower/toUpper folding. These semantics
come from Unicode so they're not up for debate.

That commit however left QByteArray untouched. Generally speaking, we
want to move away from QByteArray as "text storage" -- this has
partially happened between Qt 5 and Qt 6, where QByteArray went from
Latin-1 semantics to ASCII semantics. Still, QByteArray offers
toUpper/toLower and isUpper/isLower and all this family of functions
should be consistent in behavior.

Apply the same fix that was applied to QString.

[ChangeLog][Important Behavior Changes] The semantics of
QByteArray::isLower() and QByteArray::isUpper() have been changed. Now
lowercase (resp. uppercase) byte arrays are allowed to contain any
character; a byte array is considered lowercase (resp. uppercase) if
it's equal to its own toLower() (resp. toUpper()) folding. For instance,
the "abc123" byte array is now considered to be lowercase.
Previously, the isLower() (resp. isUpper()) functions checked whether
the byte array only contained ASCII lowercase (resp. uppercase)
characters, and was at least 1 character long. This had the side effect
that byte array containing ASCII non-letters (e.g. numbers, symbols,
etc.) were not lowercase nor uppercase.

[ChangeLog][QtCore][QByteArray] QByteArray::isLower() and
QByteArray::isUpper() now work correctly with empty byte arrays. The
semantics of these functions have been changed.

Pick-to: 6.3 6.2
Fixes: QTBUG-100107
Change-Id: Id56a42f01b2d1af5387bf0e6ccff0f824f757155
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-01-25 15:29:20 +01:00
Oliver Wolff
32caaacee3 windows arm64: Use correct Q_PROCESSOR_ARM_64 define check
Inclusion of qt_windows.h is needed to avoid  "No Target Architecture"
in winnt.h.

Change-Id: Ic67ce8a306ef52c4ce3e6eaad0b7864632610737
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-01-25 14:22:27 +01:00
Kimmo Ollila
dac76bb442 INTEGRITY: Prevent deletion of virtual functions
In release builds -olink also enables deletion of (unused) virtual
functions. In some cases this can lead to application crashes when
using loaders combined with timers. Prevent this by adding
-no_uvfd option to release build flags.

Task-number: QTBUG-99506
Pick-to: 6.3 6.2 5.15
Change-Id: I5c669e1e987f1fe912c9aca52ff82000125eed53
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2022-01-25 14:02:59 +02:00
Marc Mutz
1f118a54f8 Revert "QLatin1String: Add overloads taking QLatin1Char"
This reverts commit 1c164ec7f2,
except for the test additions.

Reason for revert: We need to optimize the implementation, not
complicate the API.

Found during the 6.3 API review.

Pick-to: 6.3
Change-Id: I91c3f65ed6d1fc438deb0e028d578a07c0005362
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-01-25 11:59:02 +00:00
Yuhang Zhao
c532a57670 Fix build with clang-cl
1. Clang-CL can't recognize "/d2FH4" and it's causing
lots of warnings when compiling. So don't apply it
when building with clang-cl.
2. The definition of "FS_INFORMATION_CLASS" need to
be visible to clang as well. Don't know why it was
excluded originally.

Pick-to: 6.3
Change-Id: I7b6e14999eea0ba1f0d73962ff03a35548f88a5a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-01-25 14:09:31 +08:00
Thiago Macieira
5e2ce03510 QEventDispatcherWin32: use SetCoalescableTimer for (Very)Coarse timers
The tolerance can be set per timer, unlike on Linux.

Fixes: QTBUG-98316
Change-Id: I5e52dc5b093c43a3b678fffd16b788a30bcb9574
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-01-24 19:28:48 -08:00
Marc Mutz
be0dc7fbb8 QMake: replace a Q_ASSERT() with a Q_UNREACHABLE()
In release mode, the Q_ASSERT() is a no-op, and Clang rightfully
pointed out that, in that case, the bool ok variable will be used
uninitialized.

Fix by using Q_UNREACHABLE(), which has an effect in both debug and
release builds.

Pick-to: 6.3 6.2 5.15
Change-Id: I33480aabe1c5233d1caddf9404f475ca9fcb8eaf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-01-25 03:48:46 +01:00