Commit Graph

60907 Commits

Author SHA1 Message Date
Shawn Rutledge
dc7f4f7b4e Add a manual test to show a QTreeView with QInputDevice::devices()
At least on X11 this is a real hierarchy: slave devices come and go
as children of the master devices. The goal is to verify that this tree
and the output of `xinput list` are in sync. The model calls
[begin|end]InsertRows() and [begin|end]RemoveRows() as necessary to
attempt to keep the view updated.

Task-number: QTBUG-46412
Task-number: QTBUG-98720
Task-number: QTBUG-104878
Task-number: QTBUG-112141
Change-Id: I8a2252f041cd1de777eef225d0e7f0db5c90a706
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2023-03-21 22:00:50 +01:00
Shawn Rutledge
2a9d93efc6 xcb: Delete QInputDevice instances that X11 no longer finds
QXcbConnection::xi2HandleHierarchyEvent() calls xi2SetupDevices()
whenever the event tells us that a device was added or removed; but
until now, those instances were not getting deleted until application
exit. That was a memory leak, and also tended to get us confused when a
newly-attached device happened to reuse the same device ID of something
that was there before but had been removed in the meantime. Now, we hope
that QInputDevice::devices() will be in sync with reality as X11
presents it to us.

Amends da5dea807f
6589f2ed0c etc.

Task-number: QTBUG-46412
Fixes: QTBUG-56214
Fixes: QTBUG-98720
Fixes: QTBUG-99331
Task-number: QTBUG-104878
Fixes: QTBUG-112141
Pick-to: 6.2 6.5 6.5.0
Change-Id: I573805a41a12850f94561a030071f1437c4dc37e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2023-03-21 22:00:50 +01:00
Christian Ehrlicher
37b47ebf94 Widgets/QCheckBox: change signature of stateChanged() for Qt7
Change the signature of stateChanged(int) to emit Qt::CheckState
instead. This was forgotten during Qt6 porting so we have to wait for
Qt7.

Task-number: QTBUG-104688
Change-Id: Ica2504e5b9ae68612de81524faed0f31c9b10402
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-03-21 20:33:10 +01:00
Marc Mutz
9020034b3b QSQL/ODBC: fix regression (trailing NUL)
When we fixed the callers of toSQLTCHAR() to use the result's size()
instead of the input's (which differ, if sizeof(SQLTCHAR) != 2), we
exposed callers to the append(0), which changes the size() of the
result QVLA. Callers that don't rely on NUL-termination (all?) now saw
an additional training NUL.

Fix by not NUL-terminating, and changing the only user of SQL_NTS to
use an explicit length.

Amends 4c445ef0ba and
46af1fe49f.

Done-with: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Pick-to: 6.5 6.5.0 6.4 6.2 5.15
Change-Id: I6210b77e9417f46294df94cb32ab4134af8dc4c2
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2023-03-21 18:40:50 +00:00
Marc Mutz
29b55dcb83 QCryptographicHash: constexpr ALL of QSmallByteArray
... because we can.

Pick-to: 6.5
Change-Id: I03872a69ac4625ca73b0a7f0310a2a951615b000
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-21 18:40:36 +01:00
Marc Mutz
c513d4fe31 QMessageAuthenticationCode: have setKey() call initMessageHash()
All callers of Private::setKey() follow the call with one to
initMessageHash(), so move the call into setKey(). We can't remove
initMessageHash(), because reset() still needs to call it without a
setKey().

Pick-to: 6.5
Change-Id: I1fc8cd5cda90f1595cedcc323a4cee8baa7ce6a5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-21 18:40:36 +01:00
Joerg Bornemann
bd7e304d48 CMake: Write target architecture into module info files
Store the target architecture in the module information files under the
key 'built_with.architecture'.

Task-number: QTBUG-111158
Change-Id: Ida4cde3b15103773824a8d9d78f082540b806736
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-03-21 17:11:09 +01:00
Axel Spoerl
f5c55da04b Move nullptr check to beginning of QInputDevice::operator<<
Nullptr check was performed after aquisition of the d-pointer.
That acquisition crashes if nullptr is passed to the operator, so the
actual check was never hit.

This patch moves the nullptr check to the beginning of the method.

Fixes: QTBUG-112174
Pick-to: 6.5 6.2 5.15
Change-Id: If339e2de9ce2e33e10d925e79ca06b3854a24f76
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-03-21 16:19:20 +01:00
Laszlo Agocs
d7f795626d rhi: widgets: Try sw adapter if D3D11 init fails
create() for D3D11 performs a smoke test with creating a vertex shader
to ensure the created graphics device is actually usable for Qt's
purposes. When this fails, create() returns false. Qt Quick
automatically retries with the PreferSoftwareRenderer flag which
causes picking up the WARP device ("Microsoft Basic Render Driver").

Synchronize this behavior to the QRhi-based backing store so that
widget apps using QQuickWidget (or anything running QT_WIDGETS_RHI=1)
get this same behavior out of the box.

Pick-to: 6.5 6.4
Change-Id: Idff795401dbed8ba465102d075808010d421d34e
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-03-21 16:19:19 +01:00
Dennis Oberst
11df026ea1 docs: Remove map and runfunction example
amends: fbb470b40b
amends: de5e0422ca

Pick-to: 6.5 6.5.0
Change-Id: I04d4a60f7e5f7f0d149667d0e78ca56bac23280d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-03-21 16:19:19 +01:00
Øystein Heskestad
10b4c06b49 Move rsslisting example into corelibe/serialization
The implementation of the stream-based XML parser resides in
coreslib/serialization. Moving the rsslisting example there.

Task-number: QTBUG-110647
Pick-to: 6.5
Change-Id: I862909e767301250750b6ee0d8ac7e20d6bad2b1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-03-21 14:49:09 +01:00
Øystein Heskestad
3c521e1fb4 Remove libQt6Xml dependency in rsslisting example
This example does not use libQt6Xml, remove dependency.

Task-number: QTBUG-110647
Pick-to: 6.5 6.2
Change-Id: Ida8c4df0e274cbc2e0a5f7151f18693d7e1c2401
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-03-21 14:49:09 +01:00
Øystein Heskestad
7185c8e0a4 Remove libQt6Xml dependency in streambookmarks example
This example does not use libQt6Xml, remove dependency.

Task-number: QTBUG-110647
Pick-to: 6.5 6.2
Change-Id: I40e5976121ddc97a78b540d17784b3357b87adf7
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-03-21 14:49:08 +01:00
Fabio Falsini
dffc67e6f2 Change android target SDK version to 31
Play Store now accept only app with target
SDK version set to 31 or above

Change-Id: I7f7fb677798c3f2d3ce327226ac13a69f0bab442
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2023-03-21 14:49:08 +01:00
Joerg Bornemann
29bc561de5 Doc: Fix wording in the Simple Style Plugin documentation
When talking about QMake project files we now refer to ".pro files"
instead of "profiles".

Pick-to: 6.5
Change-Id: Ia8d20a6a03b9076e97f45da272bb3f883febc796
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-03-21 14:49:08 +01:00
Thiago Macieira
205f8fbff0 CMake: remove tests for C++17 and C11 and earlier
Qt requires them and will fail to build if it isn't met, so we don't
need to check for its support. These were public CMake and qmake
features, so to keep compatibility with existing they're hardcoded now
(only done for the C++ editions and for qmake only, as that's what Qt 5
did).

Change-Id: I7f354474adce419ca6c2fffd174814724f45f90b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-03-21 06:49:08 -07:00
Laszlo Agocs
a561d52a83 Add QImage null check when QOpenGLTexture converts
...the image to RGBA8888. Just mirror the first null check that is
done for the user-provided QImage. The same should be done for the
result of convertToFormat().

Pick-to: 6.5 6.5 6.2 5.15
Fixes: QTBUG-68884
Change-Id: I77091d7a2bc6e32d2aa292dc7650c1af091fcec1
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-03-21 11:55:53 +01:00
Laszlo Agocs
c0182c7817 rhi: metal: Share semaphore code within the backend
Change-Id: I5b52cb8ccac303c4532651553101f381568eba2d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-03-21 11:55:47 +01:00
Laszlo Agocs
2305f8af9f rhi: metal: Fix offscreen frame command completion wait
Does what 711c55b632 did for
Vulkan, i.e. removes the there-is-more-than-one-swapchain
condition.

Fixes: QTBUG-109971
Pick-to: 6.5 6.4 6.2
Change-Id: If631748c50482389a3ef894823a1aaf1ebb38bee
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-03-21 10:55:39 +00:00
Dennis Oberst
8352756d27 Example: rename progressdialog to primecounter and modernize it
The previous example finished way too quickly and provided no real
value in regards to API understanding. Previously, QtConcurrent::map
was used, which was also used in other examples. We are now using
QtConcurrent::filterReduce to demonstrate other functionality.

Task-number: QTBUG-111165
Pick-to: 6.5 6.5.0
Change-Id: Ibd6eb119d0711cddfe8b211d460e9d67d6ce95c3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-03-21 11:19:42 +01:00
Antti Määttä
4a9696aa05 Trace: Make Q_TRACEPOINT public
Allows sharing tracepoints between modules so that they can share one
trace group.

Pick-to: 6.5
Change-Id: I8de6da6beef02b34700cc2ecb1fad0e72a00b7e0
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
2023-03-21 10:06:32 +02:00
Antti Määttä
aed3de3912 Move CTF tracing plugin to plugins directory
A coming change to support streaming requires networking so having it
in corelib is dubious.

Pick-to: 6.5
Change-Id: Idc25abe23b5ed07823d749294796c9f318ef1744
Reviewed-by: Hatem ElKharashy <hatem.elkharashy@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
2023-03-21 10:06:32 +02:00
Volker Hilsheimer
643b6e5b29 Silence warnings from unused variables
Use them, or replace them with existing constants.

Pick-to: 6.5
Change-Id: I808028296305e15b68aecb1f961ba6a85b8e9cc7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-21 07:46:27 +01:00
Thiago Macieira
617165af6b QProcess: reimplement systemEnvironment() using QProcessEnvironment
[ChangeLog][QtCore][QProcess] Fixed a bug that would cause
systemEnvironment() to produce corrupted entries (mojibake) on Windows
if the environment contains characters outside of the ANSI character
set.

Pick-to: 6.2 6.5
Change-Id: Idd5e1bb52be047d7b4fffffd174db6c1024318dd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-20 23:14:33 -07:00
Ahmad Samir
69d3e96e02 QLocaleData: move CharBuff typedef out of QLocaleData
It'll be used by another struct in a subsequent commit.

Change-Id: Ia94c6ae3506f9ba6cba6b71a5839bff8b3a2ab1f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-21 05:35:22 +02:00
Ahmad Samir
b46e0b0ab2 QLocaleData: replace two static helpers with if constexpr
More readable.

Change-Id: I015e5df2e67d8ca2b8eb117e2d63db8f9280a2a3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-21 05:35:22 +02:00
Edward Welbourne
092563a3d0 Skip QTimeZone::isTimeZoneIdAvailable()'s validity check on Unix
[ChangeLog][Corelib][QTimeZone] On Unix (other than macOS and
Android), the TZ-DB backend has long accepted any well-formed POSIX
zone description as a time-zone ID. This is now reflected in
QTimeZone::isTimeZoneIdAvailable(), which previously claimed not to
accept these IDs. However, avaliableTimeZoneIds() still does not
attempt to construct all possible POSIX descriptors to include in its
return.

Change-Id: I1df8df0a4acaca9e70d72f13200b4c31305732f3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-20 23:09:52 +01:00
Edward Welbourne
41c561ddde Recognize POSIX rules as valid timezone IDs for the TZ backend
The constructor, via findEntry(), does allow a POSIX rule as a valid
ID, so reflect that in the implementation of isTimeZoneIdAvailable(),
even though we can't sensibly enumerate all possible POSIX rules in
availableTimeZoneIds().

Change-Id: I7fd21d23ce8ce40c7f423b02e18d2e8df30fb952
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-20 23:09:51 +01:00
Mikolaj Boc
0cefeb2593 Replace Q_CORE_EXPORT with Q_AUTOTEST_EXPORT in qlocalfileapi_p.h
The only consumer outside of gui is the autotest target

Change-Id: I2c6b41029ed5c53a2fd5f31f542128616620ddcf
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-03-20 22:32:23 +01:00
Christian Ehrlicher
834617e1d0 QTextLayout/text cursor: use the same height as the selection
The height of the selection was adjusted for high-dpi screens by a fix
for QTBUG-98372. But the height of the cursor was forgotten. This is
only visible with a very high device pixel ratio.

Pick-to: 6.5
Change-Id: I3ae9a2df0a160b50593931828cdd69c0a8d4b5c4
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2023-03-20 20:58:08 +01:00
Dennis Oberst
d795dfaee7 Example: update wordcount example
Added a QFileDialog to let the user select a path. Before, the path
was statically assigned with "../../" , which is not optimal.
I also modified the findFiles function to check for text files in
general and not only *.cpp and *.h files. Lastly the result of the
word counting is now displayed on the console, as I think this is an
informative output from this example.

Task-number: QTBUG-111165
Pick-to: 6.5 6.5.0
Change-Id: Ie27c6acb4f79a78e3bef141edb92de08901fde71
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-20 20:58:08 +01:00
Edward Welbourne
5c2245cd66 Rework documentation of cbordump example
Focus the phrasing on what it teaches - how to use the stream reader -
more than the example application of that, displaying it.
Update docs:
* Changed name to conform to modern guidelines.
* Consistently mark \c cbodrump as code.
* Fix mentions of CborDumper and CborTagDescription to match code.
* Say how the tagDescriptions table is used.

Pick-to: 6.5
Task-number: QTBUG-111228
Change-Id: Ic12e77cf34caadc9f60527e886f94c76cb8cfeaf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-20 19:18:53 +01:00
Edward Welbourne
074d3d54d8 Use local names to make some numeric_limits references more readable
Pick-to: 6.5
Task-number: QTBUG-111228
Change-Id: I220f5c2f13c8f01278be806c8e8d6a3a1be8e986
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-20 19:18:53 +01:00
Edward Welbourne
db5279825c Corelib: s/Q_OS_MAC/Q_OS_DARWIN/wg except for doc and definition
I got tired of being told off by the inanity 'bot for faithfully
reflecting existing #if-ery in new #if-ery. Retain only the
documentation and definition of the deprecated define.

Change-Id: I47f47b76bd239a360f27ae5afe593dfad8746538
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-03-20 19:18:52 +01:00
Edward Welbourne
adedd3f81d QTimeZone: use correct Darwin define in #if-ery
In so far as we support Darwin on tvOS or iOS, it surely makes more
sense to use the same code as on macOS for them. This will also avoid
further grumbles from the inanity 'bot about the use of the old define.

As a drive-by, make the #if-ery on newBackendTimeZone() consistently
use parentheses with defined.

Change-Id: I6099adfedfc42bba057c8cbfbb38574e2e5d80d7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-03-20 19:18:52 +01:00
Edward Welbourne
9896ebf93d Testlib: fix the last few s/Q_OS_MAC/Q_OS_DARWIN/w
Change-Id: I6fe6a865aea37c6a2d153bd2c3aace5242362c88
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2023-03-20 19:18:52 +01:00
Joerg Bornemann
656729c5b6 CMake: Write Qt's namespace into module info JSON files
If Qt was configure with QT_NAMESPACE set, store that in the module
information files under 'built_with.namespace'.

Task-number: QTBUG-111158
Change-Id: I273309cb263c64f801dbb7238440336d7afa635e
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-03-20 18:48:57 +01:00
Tor Arne Vestbø
1bde203605 macOS: Disable interaction for modally blocked transient parent windows
When a window-modal window has a transient ancestor, Qt treats this
ancestor window as modally blocked by the modal window, as if it had
been a true non-transient parent of the modal window.

Unfortunately, this is not how macOS natively behaves. Window-modal
windows only block their direct parent, and AppKit will happily
send events to any other top level window. This is different from
how application modal windows work, where NSApplication will filter
many events (but not all) in [[NSApplication _modalSession:sendEvent:].

Note that NSWindow.worksWhenModal has no effect in this situation,
as that property is only considered by AppKit for application
modal session are active (and NSApp.modalWidow returns non-nil).

Instead of trying to replicate the event filtering that AppKit does,
which would be fragile, we disable some of the effects these events
could potentially have, by for example preventing modally blocked
windows from becoming key, and temporarily disabling the close
button in the title bar.

One remaining issue is that, unlike with application modal windows,
the modally blocked transient parents can still be ordered above
the modal window. Fixing this requires informing the window server
about the modally blocked state of the window, which we can't do
using public APIs. Even returning NO from [NSWindow _allowsOrdering]
is not sufficient.

Task-number: QTBUG-104905
Pick-to: 6.5
Change-Id: I7e764a354f397ae6ef61304ca5442a4e1bb7589c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-20 17:39:18 +01:00
Tor Arne Vestbø
3bedeb837e macOS: Bail out if handling cut/copy/paste action from non-Qt NSMenuItem
The typical way to set up menus on macOS, which we follow, is to create
NSMenuItems with an action selector set (copy:), but without a target.
This will result in AppKit finding a target dynamically, starting with
the first responder, walking the responder chain, and then moving on
to other NSWindows, before ending up in the NSApplication and its
delegate.

Unfortunately, we don't have a mechanism in Qt to forward generic
actions, such as the cut/copy/paste, or selectAll, so we rely on
mapping the actions back to QCocoaNSMenuItem that we can trace
back to a QPlatformMenuItem that we in turn emit activated() for.

Normally this works fine, but in the case where the Qt app is embedded
in a native UI, which has its own menu items with cut/copy/paste,
we'll get callbacks into QNSView for actions triggered by a generic
NSMenuItem.

In that case, we need to bail out, but we must do so without calling
[super forwardInvocation:invocation], as that will just try to invoke
the action on ourselves again.

It's unfortunately too late to try to redirect the action to another
responder, that might have handled the action, and it's questionable
whether that would be the behavior we'd want, as that would possibly
result in e.g. pasting text into another window than the Qt one that
currently has an active cursor in a text entry.

Fixes: QTBUG-111916
Pick-to: 6.5
Change-Id: I56318e4f7efd779cd20bf577aec8c2de04a6a142
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-20 17:39:18 +01:00
Tor Arne Vestbø
391491c8b3 macOS: Add logging category for menu machinery
The machinery is quit fragile, so any logging will help here.

Pick-to: 6.5
Change-Id: I1906c0e33b4afbf649a20bfe2aa7210b6822087e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-20 17:39:18 +01:00
Mårten Nordheim
6a66554d3b Revert "Skip socket and server tests on Ubuntu 22.04 and QEMU"
This reverts commit 9286d46ee2.

Reason for revert: Should be fixed by 5c6814fb18760f65bab0f8b9cd623ee5c874a58d

Change-Id: I3a161df445af8dcbb61138d57e931a093a319027
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-03-20 17:39:18 +01:00
Ievgenii Meshcheriakov
2834d4263a remotecontrolledcar example: Move car.xml to common directory
It is shared between car and controller executables.

Task-number: QTBUG-111366
Pick-to: 6.5
Change-Id: I5f98a09664671c55bfad68ebf88c9f0c734511fa
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-20 17:15:00 +01:00
Ievgenii Meshcheriakov
5cd7900d4f remotecontrolledcar example: Move executables into single example project
This allows building of all the example executables at once.

Task-number: QTBUG-111366
Pick-to: 6.5
Change-Id: I1fa372ec9725bfeb1f123305aa7324b7820eb593
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-20 17:14:59 +01:00
Marc Mutz
f4f49523ad tst_QMessageAuthenticationCode: avoid setKey() calls
We test setKey() in repeated_setKey() these days, so speed up the test
of the test suite ever so slightly by passing the key to the ctor
instead of an explicit setKey() call.

Pick-to: 6.5
Change-Id: Ia2378c0f59cbfa9d95a0f3665b06655332247e2c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-20 14:42:11 +01:00
Marc Mutz
a011e47f3d QMessageAuthenticatonCode: re-use QCryptographicHash's result buffer
QMessageAuthenticationCodePrivate::result always mirrored
QCryptographicHash's, so we only need one, greatly reducing
sizeof(QMessageAuthentcationCodePrivate) and avoiding unnecessary
copies.

Pick-to: 6.5
Change-Id: I56365b29bd9e096a4582b1764b6fef4c5243735b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-03-20 14:42:11 +01:00
Piotr Wierciński
c6e04356d4 Wasm: Fix displaying frameless QWasmWindow with transparent content
Currently we render shadow and default background-color even for
frameless windows with transparent content.
This behavior is not consistent comparing to other platforms.

An example of such window is InputSelectionHandle from
VirtualKeyboard module.

This commit disables shadow-box and provides transparent
background-color for QWasmWindow which are frameless.
It also provides distinction between "frame" as logic property
of window and "border" as visual decoration.

Change-Id: I902692ea561a2e88e2e6ab7faad8e3eeb536a26b
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-03-20 13:03:44 +01:00
Kai Köhne
003b084f38 Centralize copyright information for Qt
Maintain one central place - .cmake.conf - for information
about Qt's copyright.

Pick-to: 6.2 6.5
Change-Id: Ibcbce4313eba9660d459061b0ad00307e267b8f7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-03-20 13:03:44 +01:00
Kai Köhne
70bc5dcb75 Update Copyright year to 2023
Pick-to: 5.15 6.2 6.5
Change-Id: I8812bf2523ccb715407181aec6aebf2034c8ff84
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-20 12:03:44 +00:00
Marc Mutz
ed604ce101 QMessageAuthenticationCode: remove Private::method
...it's the same as messageHash.method, so we don't need to store it
twice.

Pick-to: 6.5
Change-Id: I926dbfa177c25e9bc3ebed9149da5ce8bad8cf2f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-20 09:12:37 +01:00
Marc Mutz
57a7db746a QMessageAuthenticationCode: reuse messageHash mutex
QMessageAuthenticationCode operates the embedded QCryptographicHash in
an unshared way, in which QCryptographicHashPrivate::finalizeMutex is
never used. So kick QMessageAuthenticationCodePrivate::finalizeMutex
out and use QCryptographicHashPrivate::finalizeMutex instead.

The only effect it the reduction in QMessageAuthenticationCodePrivate
size by sizeof(QBasicMutex).

Pick-to: 6.5
Change-Id: I02208eb42f8247939619f74ad3e040cb0d34b5ba
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-20 08:12:33 +00:00