Commit Graph

59339 Commits

Author SHA1 Message Date
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
Mikolaj Boc
b53dcb4e67 Treat the accessible non-editable combobox as ButtonMenu on macOS
Following the system design, we should treat the non-editable combobox
as a ButtonMenu. All of the similar elements in macOS's UI are called
ButtonMenu with the screen reader.

This fixes the case when ctrl+option+space does not invoke the popup
menu with options.

Fixes: QTBUG-106162
Change-Id: I0b439c56d72d1fe5b32a60eb7c001f863c00adc1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-16 18:21:57 +01:00
Ville Voutilainen
c672f148db Skip QProcess tests when run under ASan
These tests exhibit weird crashes when run under ASan, but sometimes
they fail sometimes they don't. Pending more insight, just skip this
test under that configuration.

Fixes: QTBUG-109329
Change-Id: I49d940de419f7166aab0da0b8c2b44297c4b6d74
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-16 19:21:56 +02:00
Thiago Macieira
5bdf03798d XCB: use qOffsetStringArray
This is the last string array I can see in qtbase sources for libraries
(there are more in tests and qmake, which don't matter much).

Pick-to: 6.4 6.5
Change-Id: I69ecc04064514f939896fffd1731046cebdfe3c9
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-16 14:21:56 -03:00
Marc Mutz
8602a224b6 QT_INLINE_SINCE: never inline for static Qt builds
Static Qt builds are not covered by BC guarantees, but since all
'libraries' are linked into a single executable, we face in all users
of the library the same ODR violation that we faced within the
implementation DLL: we can't define the same symbol as inline in some
TUs and out-of-line in others.

In the past, we decided to always inline in static builds, but that
breaks users which, by Hyrum's Law, have come to depend on the
non-existent BC guarantees for static Qt builds.

By switching to never inline¹ in static builds, we restore BC for such
users. The performance issues should be minimal, since LTO will anyway
inline whatever it wants, independent on how it was declared.

¹ except when the deprecation point has passed over the Qt version the
  API was inlined (-disable-deprecated-up-to configure switch).

[ChangeLog][QtCore] Restored binary compatibility for static Qt
builds broken by the QT_INLINE_SINCE mechanism. Qt still does not
guarantee BC for static build configurations otherwise.

Fixes: QTBUG-109449
Pick-to: 6.5 6.4
Change-Id: Ie3fa62621b74dc5e9dac301b9882c0e3c3999eaf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-16 17:21:56 +00:00
Laszlo Agocs
8e5806b680 rhi: metal: Use scale from the layer we already have
...so that we do not need to call devicePixelRatio() again, which means
one less UI Thread Checker warning in Xcode.

Pick-to: 6.5
Task-number: QTBUG-97518
Change-Id: I01d54ea113788cd0b141e124a47940f5cd3efabb
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-16 14:16:02 +01:00
Jan Grulich
0657b0734e Add QCryptographicHash::supportsAlgorithm() to check supported algorithm
Adds QCH::supportsAlgorithm() method which returns whether the selected
algorithm is supported and we guarantee to get a result when generating
hashes. OpenSSL will be responsible for providing us this information.
Returns TRUE if OpenSSL is not used as a provider.

[ChangeLog][QtCore][QCryptographicHash] Add supportsAlgorithm() method
that can be used to query OpenSSL and check whether the selected
algorithm is supported.

Pick-to: 6.5
Change-Id: I0d94e02b8c70beb79520150fab6c32bdd1da3fca
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-12-16 14:10:46 +01:00
Axel Spoerl
2c9b7a986d Fix checkbox and radiobutton background in QGtk3Theme
The background color for radio buttons and checkboxes was not
correctly read from the current GTK3 theme in light mode.
This has lead to identical colors for indicators and background of
radio buttons and checkboxes for certain GTK themes (e.g. Breeze).

This patch sets the GTK default foreground color to the base color of
palettes for checkboxes and radio buttons.

Fixes: QTBUG-109454
Pick-to: 6.5
Change-Id: Ic227029f2d366aa826e7bf1c3870428e3b638638
Reviewed-by: Jonas Kvinge <jonas@jkvinge.net>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-12-16 13:41:09 +01:00
Kai Köhne
2acd007859 CMake: Fix AUTOMOC warning in QtGui
Fixes warning
  AutoMoc: C:/dev/qt/dev/src/qtbase/src/gui/kernel/qplatformwindow_p.h(0:1): note: No relevant classes found. No output generated.
on Windows

Pick-to: 6.5
Change-Id: Ib3ebec15dca419386f75a91c576930a65bc30d80
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-16 11:40:14 +01:00
Yuhang Zhao
e86a5f5f8b GTK3 theme: simplify code
There's no need to first convert to QString and then convert back to
QByteArray.

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: Idedcf3143f44c640a9259f16e364dfe76ecf4c0d
Reviewed-by: Liang Qi <liang.qi@qt.io>
2022-12-16 03:37:56 +00:00
Yuhang Zhao
4e52a4c7e3 Cleanup QWizard Windows implementation
Since DWM composition is now always enabled and can't be disabled,
The code for VistaBasic style is now dead code in reality, just remove
them.

Change-Id: Iab2ba9b11ed573b240814ab5e26dec656de42ed2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-16 11:37:45 +08:00
Peter Varga
97b32fa0b6 Fix clang-cl compiler warnings
- known but unsupported action 'shared' for '#pragma section'
  [-Wignored-pragmas]
- #include resolved using non-portable Microsoft search rules
  [-Wmicrosoft-include]
- variable is used uninitialized whenever switch default is taken
  [-Wsometimes-uninitialized]

Change-Id: I466352ff97a2bcf07e706c045568e581dd08a94e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-15 23:16:04 +01:00