Commit Graph

59550 Commits

Author SHA1 Message Date
Bartlomiej Moskal
02f1e72d5a Android: Set EnterKeyNext as default type for QLineEdit
Behavior of EnterKey for virtual keyboard need to be changed for
QLineEdit. Before this commit, ImeOption was set to IME_ACTION_DONE.
Because of that, setting any text in QLineEdit automatically accept
QDialogs. That was annoying, when more than one QLineEdit need to be
set.

[ChangeLog][Widgets][Android] EnterKey type is now changed from
EnterKeyDefault to EnterKeyNext for virtual keyboard in QLineEdit. It is
done only if the focus can be moved to widget below.

Fixes: QTBUG-61652
Change-Id: I98a7686f9f675fccf0112b8d27d48ad8fd7a887f
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2022-12-21 04:11:58 +01:00
Assam Boudjelthia
4b892b1034 Android: fix jni function name from standardIcon to setStandardIcon
The issue came from 53b413f1c5.

Change-Id: Idb77a66dbd8649bdece213298b1e1676b22cc8ba
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-21 02:28:56 +02:00
Assam Boudjelthia
31a0d99fa5 Android: fix deprecations for getDrawable() on QtMessageDialogHelper
Pick-to: 6.5 6.4 6.2 5.15
Change-Id: Icd359663af11f44b4bcf0cd4e4f1f7f5a51242e4
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2022-12-21 02:28:56 +02:00
Assam Boudjelthia
40b42ac517 Android: Fix deprecations AlertDialog.setButton()
https://developer.android.com/reference/android/app/
AlertDialog#setButton(java.lang.CharSequence,
%20android.content.DialogInterface.OnClickListener)

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I470acba581b7226b2d4a56754cf6372baa167eb4
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2022-12-21 02:28:56 +02:00
Mikolaj Boc
32666691c2 Move the window through the title bar element itself
The compositor is redundant in the process of moving the window.
Have the title bar react to move all by itself.

Additionally, a clearer structure in the window was introduced.
The non-client area has been extracted into a separate class, as
was the icon store and free DOM functions used across files.

Since it was now easy, made the window maximize/restore on double click
on the title element.

Fixes: QTBUG-107626
Pick-to: 6.5
Change-Id: Iba7f207e46806ae7162656965892ae5a48ac5ebe
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-12-21 00:20:01 +01:00
Yuhang Zhao
09141ebad7 Cleanup QGtk3Theme
1. Remove unused include.
2. Replace unnecessary null checks with asserts.
3. Remove dead code after the cleanup.

Change-Id: Ia3c01ae8a1fb491d513071c09f8095c93e35c292
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2022-12-21 06:38:09 +08:00
Yuhang Zhao
528f28f380 QStyleHints: code tidies
1. Use Q_D and Q_Q instead of d_func() and q_func().
2. Use early return.
3. Remove unnecessary semicon.
4. Add one new line to separate two unrelated functions.

Change-Id: Ie6171c857f00ca171e97723a0d517d2295bbbbd1
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2022-12-20 20:53:02 +00:00
Volker Hilsheimer
f21c4500a6 Android input context: don't connect to non-existing signal
Not all focus objects have a cursorPositionChanged signal, so don't
connect unless there is one. The code should perhaps not show the
software keyboard at all unless the focus object responds to the input
method query with cursor positions, but that's for a different patch.

Pick-to: 6.5
Change-Id: I0e01da42e96eb579d260b9158f005ad3215d0c26
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-20 19:35:20 +01:00
David Skoland
4b1229e523 Set WASM platform default to synchronous window event handling
Based on existing code, it appears that it's always
preferred in wasm to use synchronous delivery
(<QWindowSystemInterface::SynchronousDelivery>),
however, we can simply define this as the default mode
of operation, which will make these unnecessary.

Change-Id: Ia4c78593333e314f91efb266268917317794e2f5
Pick-to: 6.5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-12-20 18:13:47 +00:00
Doris Verria
af0f13b460 iOS File Dialog: Allow picking files if name filter is '*' (all files)
Name filters may be not empty and include all files ('*'). We should
not add any file type limitations in this case. Ammends commit
ce20b81070

Pick-to: 6.5
Change-Id: I3983e576a0ada4b7b40837c5c797359114b1ae02
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-20 16:21:01 +01:00
Ahmad Samir
8f0c366087 QStringConverter: don't shadow variables
Change-Id: I3c209585de2a7599f1cd4e58c1d3b3501425b903
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-20 15:16:31 +02:00
Marc Mutz
78db5cb643 tst_QByteArray/tst_QString: use new QtMiscUtils::toAsciiUpper()
... in lieu of <cctype>'s toupper(), which is locale-dependent, and
out-of-line.

The code doesn't run into the toupper(i) issue in the Türkiye locale,
because we don't run tests in that locale and because 'i' is not a
valid format specifier, but don't let the next reader of the code
guess when the use of toAsciiUpper() provides unambiguous guidance.

Task-number: QTBUG-109235
Pick-to: 6.5
Change-Id: I8988f5190441e1ae5cb57370952cda70ca6bb658
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-12-20 14:16:31 +01:00
Bartlomiej Moskal
eda4049a01 Android: Fix for low contrast status bar
After we start to use THEME: Theme_DeviceDefault_DayNight, status bar
icons have low contrasts on some devices.

That is why we need to set APPEARANCE_LIGHT_STATUS_BARS[0] in case when
Status bar color is too bright.

[0]https://developer.android.com/reference/android/view/WindowInsetsController#APPEARANCE_LIGHT_STATUS_BARS

Fixes: QTBUG-108365
Pick-to: 6.5 6.4 6.2
Change-Id: I38a31cfb0a3a1b912b86ed1b302c567e14a7ffcc
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-12-20 13:42:31 +01:00
Assam Boudjelthia
c1fa5d602c Android: handle rename() operation with content uris
Allow renaming content uris if the destination is provided
as a direct fileName (i.e. not full content scheme path),
and if the destination has the same trailing path (or parent)
which means a rename in the same folder structure.

Pick-to: 6.5 6.4 6.2
Task-number: QTBUG-98974
Change-Id: Ibc4973366807dd5284c19912ab04ff90f2a573cb
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2022-12-20 12:42:31 +00:00
Xavier BESSON
30efb24d45 CMake: Expose generated resource files to IDEs
Add generated qrc files to source of the target so they will be
displayed (and reachable by Follow Symbol in QtCreator) under
the '<Build Directory>/.rcc' node in the Project Tree of QtCreator.

Fixes: QTCREATORBUG-28604
Change-Id: I0c56e168de03027ec2981cfa0bceb8f10a8d71b2
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-12-20 08:29:43 +00:00
Ahmad Samir
348911a4e7 RCCFileInfo: use QString prepend optimization
Instead of using QStringBuilder (which always allocates a new QString to
hold the result of the concatenation), reuse the existing QString, and
use prepend which will typically have allocated extra space, reducing
the chances it will reallocate.

Change-Id: Ic4ef775246db58e56152a6ede1a75f7621950dd9
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-19 20:37:05 +00:00
Axel Spoerl
ff83fc7590 Map toolbar drag delta from native pixels
The delta (drag distance) for dragging a tool button with in a tool
bar was calculated by subtracting the global mouse press position from
the drag event's global position.

This has lead to a miscalculation when dragging the button across
screens with different resolutions. The new relative position within
the tool bar became negative, which eventually has lead to resizing of
other tool buttons in the same tool bar.

This patch calculates the delta based on native pixels, which ensures
a correct value in all cases. It falls back to the existing calculation
if no window handle can be established from the tool bar.

Fixes: QTBUG-103720
Pick-to: 6.5
Change-Id: I09168b597f6c43a119041d00f5b07e1895fdf4b3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-12-19 21:16:38 +01:00
Christian Ehrlicher
13053d455e SQL: remove unneeded CMake commands - these plugins were removed in Qt6
Change-Id: I6880b514a92a01b9a8a8d84fc814aa38c95b09ef
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2022-12-19 20:32:18 +01:00
Christian Ehrlicher
64ed1cab2d SQL/OCI: replace deprecated QDateTime() ctor
Change-Id: I0d36f036a9814e85f4606644e0fd8801e76ffccf
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2022-12-19 20:32:18 +01:00
Marc Mutz
451dbca16c QString: use new QUtf8StringView overloads
... to prepend/append/insert QByteArray and const char*, instead of
the old inline QString::fromUtf8(), which litters the call sites with
temporary QString objects.

Can't use qToUtf8StringViewIgnoringNull() for QByteArray parameters to
avoid the extra isNull() check, because some QString tests depend on
whether we append/prepend/insert null or empty.

Pick-to: 6.5
Fixes: QTBUG-109092
Change-Id: Ibf7b99aad844d0c2219ccc1c30f6666c5dfc7758
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-19 19:05:46 +01:00
Ville Voutilainen
413798cc01 Skip tst_qconcurrentrun completely if running under an emulator
Task-number: QTBUG-106906
Pick-to: 6.5 6.4
Change-Id: I1836f5be42528c71470c2cd6509f7125feb47691
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-19 15:31:10 +00:00
Ville Voutilainen
f7559904d0 Autoclose a FILE* if we open it
Task-number: QTBUG-105736
Change-Id: I2bc10b54b77436cad914ec21fd85678c54de4305
Pick-to: 6.5 6.4 6.2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-12-19 15:31:10 +00:00
Assam Boudjelthia
f77668ffec Return the QFileInfo::baseName/QDir::dirName() from fileEngine impl
Get those values from the file engine instead, this is relevant
especially on Android for content uris.

Pick-to: 6.5 6.4 6.2
Task-number: QTBUG-98974
Change-Id: I65fe4c59e5f1feed0dcf14cc8988b4a40d9d979e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-19 11:17:00 +00:00
Leena Miettinen
d77b5fbcf1 Doc: Add link to Tools Examples from the Qt Widgets module front page
The example docs were difficult to find.

Pick-to: 6.4 6.5
Change-Id: Id7003b140275e722dad2c41767eabc24fef728e5
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2022-12-19 09:19:53 +01:00
Nicholas Bennett
2e3793a91b Docs: Fix broken link to "Adding OpenSSL to Android" page
Fixed the link.

Pick-to: 6.2 6.4
Change-Id: I015ca7d2052255b96cf2053b81c47d658bab677e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2022-12-19 09:29:40 +02:00
Marc Mutz
b8c2a0c18a QtMiscUtils: add missing toAsciiUpper(), use it in moc
... to make moc code locale-independent.

The C toupper function is locale-dependent. Given the right locale
(Türkiye, e.g.), toupper('i') is either

- İ (LATIN CAPITAL LETTER I WITH DOT ABOVE; if representable) or
- i (unchanged; if it isn't)

Both results are wrong for the present use-case.

Fix by adding QtMiscTools::toAsciiUpper(), complementing existing
toAsciiLower(), and using that. It's private API, but moc.h, despite
the name, is not a public header.

Pick-to: 6.5 6.4 6.2 5.15
Task-number: QTBUG-109235
Change-Id: Iaf071ba2113b672aa0aed3da6a4e1d47fb659365
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-18 12:45:30 +01:00
Ulf Hermann
5a0dcda171 CMake: Allow contents of resources to be replaced by empty files
This makes it possible to process QML files using qmlcachegen, and
retain the file nodes in the resource file system, but remove their
actual content from the binary. To do so, you need to mark your files
with the QT_DISCARD_FILE_CONTENTS source file property.

Fixes: QTBUG-87676
Fixes: QTBUG-103481
Fixes: QTBUG-102024
Fixes: QTBUG-102785
Change-Id: I93d5a2bfca1739ff1e0f74c8082eb8aa451b9815
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-12-17 20:43:51 +01:00
Yuhang Zhao
3034d698eb Windows QPA: remove long-time dead code
It has been commented out since at least 5.3 (the earliest version
hosted on the GitHub mirror), so it seems this code is not used
by anyone for more than 10 years. We can safely remove them.

Change-Id: Ia475ce5a5fdd6db48f415b3647677a35c79bfc5d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-12-17 20:34:31 +08:00
Marc Mutz
ba52b29d33 QLatin1/String/View: don't decay the arg() arguments
This turns const char[] arrays into const char* pointers and
therefore prevents the implicit conversion of string literals
to QString in QT_RESTRICTED_CAST_FROM_ASCII.

Fix by avoiding the decay.

Also simplify the template magic.

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I88164a1866ac71b41d9cd1564f3a5e83d2d42aaa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-17 07:18:07 +00:00
Juha Vuolle
67d7d8746c Fix minor permission doc typo
Pick-to: 6.5
Change-Id: I4af4f2859940bd121cdd0a42eab52f94f3cbc673
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-17 00:38:23 +02:00
Axel Spoerl
5edb71c6d4 Fix QWidget::restoreGeometry when restored geometry is off screen
If a widget's geometry is restored to a screen, which is smaller than
the one it was saved from,
- the widget could appear (partly) off screen
- the widget's title bar and resize handles could be inaccessible

This patch refactors and documents checkRestoredGeometry.
In a first step, the restored geometry's size is checked against
a given screen size. It is corrected if necessary.
In a second step, the restored geometry is moved inside the screen,
if necessary.
It makes the function a static member of QWidgetPrivate in order to
expose it for auto testing and adds a respective test function to
tst_QWidget.

Fixes: QTBUG-77385
Fixes: QTBUG-4397
Task-number: QTBUG-69104
Pick-to: 6.5 6.4
Change-Id: I7172e27bfef86d82cd51de70b40de42e8895bae6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-16 22:58:11 +01:00
Marc Mutz
4ccb10dc91 QXmlStreamWriter: fix a thinko in doWriteToDevice(QSV)
Check for state.remainingChars to signal an encoding error only after
the last chunk has been processed. Splitting surrogates at chunk
boundaries is normal operation, not an error. Only if this happens at
the end of the whole input should we raise an error.

Amends fa2153bd10.

Pick-to: 6.5
Change-Id: Id92e37becaed25bbc11e0c22dedc4d41fb23f92a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-12-16 22:58:11 +01:00
Marc Mutz
26c190f57e QTest::WatchDog: fix missing timeout resets on test function change
Since e0cad1aab5, the code suffered
from an ABA problem where the TestFunctionStart expectation is set
in testFinished(), but by the time WatchDog::run() gets around to
examining the state when returning from condition_variable::wait()
in waitFor(), the next beginTest() has already set the expectation
back to TestFunctionEnd.

There are several known solutions for ABA problems. Embedding a
generation count into the expectation state seemed to be the most
straight-forward fix, and can be done without DWCAS support, because
the state is just 2 bits, leaving the other 30 or 62 bits for the
generation counter, so do that.

[ChangeLog][QTestLib] Fixed a bug which caused
QTEST_FUNCTION_TIMEOUT to be applied to the whole test execution,
as opposed to each test function.

Fixes: QTBUG-109466
Pick-to: 6.5 6.4 6.2 5.15
Change-Id: If71ade932330407b85d204d45c74350c651325fe
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-12-16 22:58:10 +01:00
Marc Mutz
17a7e5cfdd QTest::WatchDog: Extract Method setExpectation()
Keeps the code DRY and enables a follow-up commit to fix QTBUG-109466.

Task-number: QTBUG-109466
Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I2b904ea7b38286b07049524ba63c2c5028e680bb
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-16 22:58:10 +01:00
Marc Mutz
6b5419f435 Extend tst_qxmlstream::readBack() to all Unicode characters
... not just those in the BMP.

The use of char32_t makes the isValid helper function easier to
read. Its passing to write() is enabled by the recent port to
QAnyStringView, which has a char32_t ctor.

Split into per-plane executions of the test function to avoid
running into timeouts on asan builds down the road.

As a drive-by, replace use of QPair with a proper struct, and
make the intervals symmetrically inclusive the bounds.

Pick-to: 6.5
Change-Id: I2c6858d7e6a88f448eac1b1e124d7d7b82828d4c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-12-16 22:58:10 +01:00
Mikolaj Boc
8f04c50cff Fix event dispatching on WASM
1) Check only for the events that the dispatcher is able to process,
otherwise it enters an endless loop
2) Take care to run the correct wake up callback with
Asyncify.handleSleep

Fixes: QTBUG-109066
Change-Id: I10d29d18962c3e438e56712e1f43ecadedb6205c
Pick-to: 6.5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-12-16 19:51:11 +00:00
Andy Shaw
eac9f39517 SQLite: Update SQLite to v3.40.0
[ChangeLog][QtSQL][SQLite] Updated SQLite to v3.40.0

Pick-to: 5.15 6.2 6.4 6.5
Change-Id: I7beb0bc9c1256f273d6011567c5ef3975ada5060
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2022-12-16 18:29:10 +00:00
Tor Arne Vestbø
dd49793bc3 iOS: Don't assume screens will not be connected before QIOSIntegration
When an external screen is connected to an iPad, and the application is
starting up on that screen, we will get a connection notification about
that screen as part of the initial bootstrap of UIApplicationMain,
before we call the user's main().

Since we initialize and add all available screen on QIOSIntegration
creation, we can just ignore the early connection notification.

This avoids a crash, but the window will not show anything on the
external screen, which is a separate issue.

Pick-to: 6.5 6.4 6.2
Fixes: QTBUG-106701
Change-Id: I9e0a9736bf602277316bd004e0d01c640feaf319
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-16 19:29:10 +01:00
Thiago Macieira
686c02224c QUuid: add the ability to specify the byte order for 128-bit IDs
Some more modern protocols like Bluetooth LE transmit data in little
endian. QtBluetooth will benefit from this.

Change-Id: Id8e48e8f498c4a029619fffd1728c94ddd444537
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-12-16 19:29:10 +01:00
Thiago Macieira
0f932b9a5d QUuid: add a trivial structure to support exactly 128 bits
This is inspired by QBluetoothUuid's quint128, but with a better
name. It also matches systemd's sd_id128.

Change-Id: Id8e48e8f498c4a029619fffd172893dc1545adda
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-12-16 19:29:09 +01:00
Thiago Macieira
c3c5d2cab0 QUuid: use NSDMI to initialize the members
Change-Id: Id8e48e8f498c4a029619fffd172893c31bb0aba1
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-12-16 10:29:09 -08:00
David Skoland
047c0f0060 wasm: Always use basic password-store=basic in tests
This makes sure the browser only uses a basic password store and
doesn't try to do anything fancy with the OS pass store, since it
causes an issue on opensuse (kwallet isn't set up in CI).

Change-Id: Ib48a15f4834fa9bb26cf8cf3fff9bb4d0fd0238a
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-12-16 19:29:09 +01:00
Laszlo Agocs
4d36a83b6d rhi: vk: Fix up some legacy queue (family) index inconsistencies
Relevant mainly if we want to consistently expose these as the
theoretically correct uint32_t/quint32 from Qt Quick's
QSGRendererInterface. (not that int is not sufficient for
indexing the typical 3-4 families and 2-16 queues per family)

Some checks are not actually needed since the family index
must always be valid after create().

Pick-to: 6.5
Task-number: QTBUG-108895
Change-Id: I474ccea51a81e7a096281604ff79b7db4cdd2484
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-12-16 17:49:28 +00:00
David Edmundson
c7425aa295 dbus: Fix path to moc file in generated qdbusxml2cpp
qdbusxml2cpp takes a filename to use for generated output. It may be in
the form 'name.cpp' or just 'name'.

For the moc file we need to convert this from a path to a name of a file
in the same relative folder. It's not uncommon for this name to contain
dots as sometimes a dbus interface name is used directly.  For the cases
where a suffix is not provided the whole name should be used.

Pick-to: 6.5
Change-Id: I3bf4ae8b2b9121184c2786009e8b5abcc5e3e410
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-12-16 17:21:57 +00:00
Marc Mutz
7d0f08094a tst_qxmlstream: swap WHEN and THEN in readBack()
WHEN writing an invalid character, THEN we expect the writer to report
an error.

The old code had it the wrong way around. It checked that WHEN the
writer reports an error, THEN the character was invalid.

The formulations are equivalent, but the latter is mixing up cause and
effect, making it less clear what's being checked (QXmlStreamWriter,
not isValidSingleTextChar()), so swap.

Pick-to: 6.5 6.4 6.2
Change-Id: I703de9ddde98d9913977a913f671472930735900
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
2022-12-16 18:21:57 +01:00
Marc Mutz
7fa6670fa4 tst_qmlstream: re-use QBuffer instance in readBack()
This improves the runtime of this particular test function by
almost 17% on my machine.

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: Icd77cdda92374b92121988c99e56787d405fa2d9
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-16 18:21:57 +01:00
Timothée Keller
f8a9047c9c Windeployqt: add missing module and plugin
Added the QtOpcUa module, as well as the relevant opcua plugin

Fixes: QTBUG-109336
Pick-to: 6.4
Change-Id: I5edd886e6224de14cd2b68727655c64514ef5158
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-12-16 18:21:57 +01:00
Joerg Bornemann
8f2d5a5649 CMake: Enforce QT_RESOURCE_ALIAS for absolute paths in resources
For Qt resources, enforce QT_RESOURCE_ALIAS for source files that are
specified with absolute paths.

Users can add generated files to resources, e.g. in
qt6_target_qml_sources or qt6_add_qml_module. The file paths of those
generated files are typically absolute paths.

The function __qt_get_relative_resource_path_for_file is used to
construct file paths in the build directory. For the files in question,
this function returned an absolute file path. This led to very long
subdirectories within the build directory and even invalid paths on
Windows.

We cannot guess how the user intends to address the file via the
resource system and require now that QT_RESOURCE_ALIAS is set on such
files.

[ChangeLog][CMake] In Qt resources, files that are specified as
absolute paths must have the property QT_RESOURCE_ALIAS set.

Task-number: QTBUG-108150
Change-Id: Ida092c3d103a243caffc869b4bb887d4b5ce70ab
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-16 18:21:57 +01:00
Shawn Rutledge
b3750e815f Add eglfs touch logging in qt.qpa.input.events
We have this logging category on xcb and ios already.

Task-number: QTBUG-103620
Pick-to: 6.5
Change-Id: I70153c4ea9d62316d0e05550559010d85e2f9d85
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-12-16 17:21:57 +00:00
Thomas Senyk
6160635c9d Remove QEglFSCursor's inheritance of QOpenGLFunctions
As QOpenGLContext can be destroyed
it's a bad idea to store QOpenGLFunctions
(which are QOpenGLContext bound)

This change remove the inheritance and replaces it with
querying the functions per call.

Pick-to: 6.5 6.4 6.2
Change-Id: I2f3104b62f395f3e65337a15d0a0835383b66e16
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-12-16 18:21:57 +01:00