Commit Graph

59071 Commits

Author SHA1 Message Date
Santhosh Kumar
3ee7a9f85c Let styles indicate that they support dark mode
Add a style hint that allows styles to indicate that they support
dark mode. The macOS and Fusion styles support dark mode, the other
styles, in particular the Windows Vista style, do not.

Task-number: QTBUG-72028
Change-Id: I02cac2e19a21898663f50f09a4ef419a613a73ec
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-11-26 15:07:07 +01:00
Volker Hilsheimer
e75c1a00e3 QObject: stronger warning about isSignalConnected and threads
Document explicitly that it is not allowed to call isSignalConnected
from (dis)connectNotify overrides, and add the respective warning from
the disconnectNotify documentation also to the connectNotify
documentation (with some light editing).

Pick-to: 6.4 6.2
Fixes: QTBUG-106025
Change-Id: I41e8a9d3e6ce697cb2943d55a7c853eeec9c1dbe
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-11-26 15:06:56 +01:00
Mårten Nordheim
01dfa222fd QWindowsMimeConverter: Fix forward-declaration of foreign structs
It was inside the Qt namespace so it would try to use it as such.

Change-Id: I8c8960e5f4758e945bef95b52247211e8f86efad
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-11-26 15:06:47 +01:00
Anton Kudryavtsev
6a027a8677 QStandardItemPrivate: remove const from return type in itemData
While touching code, port iterator-based loop to range-based for.

Change-Id: I108ab4fa1e56c50f424a58984873906d37923d3d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-11-26 13:47:50 +03:00
Mikolaj Boc
72bff530f9 Fix the assert in QWasmClipboard::writeToClipboardApi
The assert condition should be negated.

Change-Id: I901b61012ffaf893744dfb9f762b009f267b629d
Reviewed-by: David Skoland <david.skoland@qt.io>
2022-11-26 11:23:13 +01:00
Mikolaj Boc
fa27a59ec3 Use the browser compositor for drawing windows on WASM
Make the browser compositor draw the window non-client area (using css
+ html). Get rid of OpenGL usage in non-OpenGL windows and use canvas
2d context instead to blit the texture (QImage).

Also, as part of the change, remove the deprecated canvas element support
in QScreen.

Fixes: QTBUG-107116
Fixes: QTBUG-107219
Change-Id: I65f0d91831c806315685ca681ac0e416673f5cd5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: David Skoland <david.skoland@qt.io>
2022-11-26 11:23:13 +01:00
Amir Masoud Abdol
c675c1c56d Fix a mistake in the documentation of qt_internal_read_repo_dependencies
If I understood the function correctly, then the example was not quite
right.

Change-Id: I6b6a4845c5ded2a058050dfbecf5db158d32d12a
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-11-26 11:23:13 +01:00
Axel Spoerl
1576f82721 Add simple palette to tst_QWidget
When a widget's palette has different active / inactive colors,
multiple paint events can occur. This makes tst_QWidget functions fail
when they expect a spcific amount of paint events and the platform
theme provides a palette with active / inactive differences.

This patch adds a function to populate test widgets with a simple
palette, to prevent multiple paint events.

Pick-to: 6.4
Change-Id: If9b2faedcc5ca87ba24991cedd5e4ac927b02644
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-11-26 08:07:39 +01:00
Ilya Fedin
58f885bb3c IBus: Use portal in snap
Snap supports the IBus portal for two years, but Qt applications
don't take its advantage in snap without setting IBUS_USE_PORTAL

Change-Id: I26a044d657c4b7040a21a8510116c0c7af7aaa52
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-11-26 08:57:56 +04:00
Aleix Pol
479072791b dbus: Include some debug messages when failing to connect
When using dbus, there's a number of cases where resolution happens at
runtime. It's useful to see dbus complain when connects don't work,
because otherwise the system doesn't work but we don't know what is
happening.
Added this to debug such an issue, already helped me address other cases
that had gone unnoticed elsewhere, so this is something that benefits
from being in QtDBus.

Change-Id: I5eefb94fcf775182edf1ad0c24e8a6692f84b15f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-11-26 01:45:43 +01:00
Timur Pocheptsov
4332cb3134 qnsview_drag: only ignore key modifier while dragging 'within the application'
We return a mask containing several supported DND operations and if modifiers
were ignored, an external application can select a 'wrong' operation (not the
one we wanted when pressing a modifier). Saying that, the old logic of ignoring
still applies if we are dragging 'within the application'.

Fixes: QTBUG-99471
Change-Id: I67c9a656960e95d6d2298f4b3bdd2052faedb263
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-11-25 14:40:36 +01:00
Samuel Mira
bb629a2e29 Android: Fix incorrect dimensions - part 2
The previous fix worked for lower API levels but failed to
work properly on some devices (Devices with > 29 API levels). This
patch fixes that issue.

Task-number: QTBUG-107604
Task-number: QTBUG-107923
Pick-to: 6.2 6.4 5.15
Change-Id: I8fd3601225026ea5c370a8a1a1aab317558432b5
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
2022-11-25 15:35:17 +02:00
Liang Qi
5da38b4489 tests: Add project files of highdpi both for qmake and cmake
Pick-to: 6.4 6.2
Change-Id: I5525536674a64ccd14106dc6727b5578c0ab7f16
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-11-25 14:33:35 +01:00
Nicolas Fella
a528b1eb02 Fix typo in documentation for QVariant::nameToType
Pick-to: 6.4 6.2
Change-Id: I69742b9e597012329de5f5f742d4972ea7575775
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-11-25 13:28:48 +00:00
Edward Welbourne
e36457c043 Fix out-of-bounds assert in winIso639LangName()
QByteArray doesn't allow accessing, with operator[], the '\0' byte it
stores at index size(). Previously we accessed it indirectly by
dereferencing a pointer offset from its data() instead of indexing; my
recent change converted the return of an endptr to the return of its
index, so used operator[].

This is a follow-up to commit 6c435e5dd4

Change-Id: I9faf9dfa3dcc8df1e841e5538e452afef9ba610c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-11-25 14:28:48 +01:00
Volker Hilsheimer
ef379f95c7 QPalette: always increase serial number when modifying
After 109e088c7c, cache keys were unique
for palettes with different private or data instances, but the key did
not change when a palette without any shared copies was modified, as
that does not create new private data structures.

To fix this, always increase the counter for the private data structure,
also when not detaching from shared copies.

Augment test case with scenario that broke.

Pick-to: 6.4
Fixes: QTBUG-108709
Change-Id: I606abfb8b1a03e515e46b10dc840a631eb31d496
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: JiDe Zhang <zhangjide@uniontech.com>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-11-25 14:28:48 +01:00
Rami Potinkara
01780d753e Update Gradle to 7.5.1 and Android Gradle Plug-in (AGP) to 7.3.1
Gradle 7.5.1 and AGP 7.3.1 versions are the latest at the moment.

Fixes: QTBUG-105510
Change-Id: Ie2229e8929a82d60836a5fe7b3a879459995f63e
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-11-25 12:11:47 +02:00
Ulf Hermann
6aa02bdeaf QLocale: Have qstrntod() return end of parsed string also on underflow
Underflows should be treated the same as overflows.

Fixes: QTBUG-108628
Change-Id: I23aa7bbe1d103778cefca08bd3e584e72f306583
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-11-25 10:55:39 +01:00
Phan Quang Minh
95b4cfb1af ibus: check object validity before honoring inputMethodAccepted()
`inputMethodAccepted()` always return false if there is no current focus
object. This means QIBusPlatformInputContext will fail to send the
necessary `FocusOut` request to the input context, causing IBus to not
send the appropriate content type information to the panel service when
the application regains focus and issue a `FocusIn` request.

This results in issues like
https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5346, which can
happen when a Qt application is in foreground as the IBus daemon fails
to propagate the content type information to GNOME Shell, which acts as
the panel service on GNOME systems.

Fix this by checking for the validity of `object` before honoring the
result of `inputMethodAccepted()`.

Pick-to: 5.15 6.2 6.4
Change-Id: I6b79ffc7c5f03ffc05527c29e52a0859f3594bfa
Reviewed-by: Liang Qi <liang.qi@qt.io>
2022-11-25 09:55:39 +00:00
Vladimir Belyavsky
5cf72ee6ab macdeployqt: Fix QtMultimedia plugins deployment
It was not updated accordingly after QtMultimedia redesign in Qt 6.
This wasn't a real problem because multimedia plugins were
eliminated in principle. But it was true only until Qt 6.4, where
plugins system for multimedia backends has been reintroduced.

Fixes: QTBUG-108742
Fixes: QTBUG-107057
Pick-to: 6.4
Change-Id: I31be5fc20e5bdf8050c04a30492e80d96eb437fb
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
2022-11-25 06:49:00 +00:00
WANG Xuerui
0ab51dcc3c forkfd/linux: add support for LoongArch
This architecture is not CLONE_BACKWARDS in any way.

Matching OpenDCDiag PR: https://github.com/opendcdiag/opendcdiag/pull/169

Pick-to: 6.4 6.2 5.15
Change-Id: Ibceccfd20d270b30302a936885d12e4c55cdd833
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-11-25 06:46:46 +00:00
Yuhang Zhao
acf3f063ef Proper clearing of WinRT factory cache in QWindowsTheme
I've checked the whole qtbase code base, this is the only
one that's left from the previous commit.

Amends commit ffb9dee1b0

Task-number: QTBUG-103611
Pick-to: 6.4 6.2
Change-Id: I76a9130654819d1336c27dac350f5ad56915ad81
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-11-25 12:12:54 +08:00
Lorn Potter
c2e6e9d02c wasm: fix build of wasm accessibility
Some platforms need extra help finding includes

Change-Id: I4f18b183cea780067dd9269e07dfb7db75606406
Reviewed-by: David Skoland <david.skoland@qt.io>
2022-11-25 12:42:58 +10:00
Eirik Aavitsland
fb35c54b1e Finish the undeprecation of the QColor(string) constructors
Fixes: QTBUG-108743
Pick-to: 6.4
Change-Id: I826ae98a542516a5cf9a4e556d5e8830f9c47a86
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-11-25 00:29:54 +00:00
Axel Spoerl
f7089e691e Handle multiple paint events in tst_QWidgetRepaintManager
The helper function TestWidget::waitForPainted returned after the test
widget had consumed the first paint event. In case of multiple paint
events, QRegion paintedRegions did not match the entire region that
was supposed to be painted. The test function children() failed/flaked
due to that.

This patch extends the helper function. After consumption of the first
paint event, it processes events until the painted regions no longer
change.

Pick-to: 6.4
Fixes: QTBUG-108764
Change-Id: I54e14bb07725dd1f602cc93085da13836e3b7494
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-11-25 00:05:48 +01:00
Friedemann Kleint
4a6ce541c5 Documentation: Fix information on how to iterate over lists
Remove the outdated code used for QStringList and point
QStringList and QList to the containers page.

Pick-to: 6.4 6.2
Task-number: QTBUG-108687
Change-Id: I6fae6410ca759f91da85832ddb9f24e8a0ce202b
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-11-24 19:12:20 +01:00
Friedemann Kleint
39d86e05e1 Documentation: Expand documentation on how to iterate Qt containers
Introduce a section on iteration and add range-based for and index.

Pick-to: 6.4 6.2
Task-number: QTBUG-108687
Change-Id: Icb1ff55049361769f7c0b042d42f70148dd07c2e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-11-24 19:12:15 +01:00
Friedemann Kleint
56c8033d3e Documentation: Modernize the Qt container doc snippets
Use auto and initializer lists. Avoid repeated instantiations
of end().

Pick-to: 6.4 6.2
Task-number: QTBUG-108687
Change-Id: I8482638cda63e21feaa7ca21370e7947dfb4b606
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-11-24 19:12:09 +01:00
David Skoland
ef7d17ed15 wasm: Enable asyncify for tests
Since a good number of tests use exec and friends, we want to use
asyncify for them. Asyncify is still possible to enable universally
with device options.

Change-Id: I0916f55328c98f2ba179cda3757eeee9d27f3e47
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-11-24 18:49:40 +01:00
David Skoland
770c849a31 wasm: Enable batch tests by default on wasm
Batched tests is the default supported test mode of wasm and should
be enabled without explicitly passing a command line argument.

Change-Id: I79424384e4e8ca6f670de1cb056f4713740a584f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-11-24 18:49:39 +01:00
Tor Arne Vestbø
1ccb0bd3ef Add permission backend for WASM
The only permissions we support so far are camera, microphone,
and location. The permission API works even for browsers that
don't provide the Web Permission API, as we plumb the individual
permission requests for media and geolocation back to our API.

Change-Id: I7f5fc2266afee9ada78f2015614a8224e28afa59
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-11-24 18:48:47 +01:00
Mikolaj Boc
b4ef0031c6 Set up a manual test for qt loader
Skeleton tests included. Run the test with run.sh.

Fixes: QTBUG-107744
Change-Id: Ic2734e24025f8edc0f8e710d981367aa321f9066
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-11-24 18:47:49 +01:00
Edward Welbourne
6c435e5dd4 Restore end-of-parse reporting to qstrntod()
Rework QSimpleParsedNumber to store a qsizetype whose sign serves as
ok flag (positive is ok, zero and negative are not) and magnitude is
the number of characters used. This replaces an endptr that was set to
null to indicate !ok, but that deprived us of end-of-parse
information, which is needed for number-parsing. In particular, JS's
parsing of numbers accepts overflow (where qstrntod() flags it as
invalid) as infinity; so qstrntod() does need to say how long the
overflowing (but JS-valid, none the less) number-text was.

Modify all callers of functions using this (recently-introduced) type
and add tests that fail without this fix.

Fixes: QTBUG-108628
Change-Id: I416cd213e1fb8101b1af5a6d43615b970a5db9b4
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-11-24 10:06:53 +01:00
Alexey Edelev
a036bd1746 Disable ASAN leaks check for cmake tests
CMake tests have own workflow and way they run. Most of binaries
produced by these tests are either no-op or check if build was
successful. It doesn't make much sense to check these binaries for
memory leaks, so disabling ASAN leak check.

Fixes: QTBUG-108817
Change-Id: I95984e1049d6bfd691ff854e15bdf98c71c921db
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
2022-11-24 09:06:51 +00:00
Axel Spoerl
5f330d9fed Blacklist tst_QOpenGLWidget on Ubuntu, RHEL and OpenSuSE
tst_QOpenGLWidget fails on Linux when other windows on the desktop grab
focus. That can happen on CI VMs.

This patch blacklists the test on Linux as a temporary solution

Task-number: COIN-966
Change-Id: Ibdd7e626f92d2da692bd7c44741e0ca4c9dbd1a8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-11-24 09:06:50 +00:00
Axel Spoerl
583fb6c7c5 Blacklist tst_gestures on OpenSuSE
tst_gestures flakes in MacOS arm and Linux when delivering a gesture to
a screen. The problem cannot be narrowed down to specific test
functions. When two test functions with gesture delivery to a screen
are called, the second fails.

This patch temporarily blacklists OpenSuSE for tst_gestures.

Task-number: QTBUG-104496
Task-number: QTBUG-106244
Change-Id: I3bc3c9b82567478784a84006d27f5cbed39d9c9a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-11-24 09:06:47 +00:00
Marc Mutz
d783363f60 QFlatMap: make nested mock_object SCARY
Swap the definition of the nested mock_object out of the QFlatMap body
into a namespace scope and replace it with a template alias.

This way, there's _one_ mock_object<U> for every U, not one for every
QFlatMap<K, V, Comp, KeyC, ValueC>::mock_object<U> ("SCARY").

Should reduce compile times, but I didn't measure.

Change-Id: I37f7413a49d0424e06ef4e78d65dea5962599e79
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-11-19 20:02:59 +00:00
Marc Mutz
f1c41382af qNN headers: only promise what we can keep
In general, we can't make the qNN types behave exactly like their
C++NN std counter-parts, because their exact semantics and
implementation may depend on C++NN language features, while qNN are
back-ports to C++ standards older than NN.

Adjust the warning message accordingly.

Thanks to Eddy for noticing.

Pick-to: 6.4
Change-Id: I8533214549f2140a99e2216e3bcd979263fe100c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-11-19 21:02:30 +01:00
Vladimir Belyavsky
991c056438 QTextLayout: fix maximumWidth() for a text containing line separator
This is improved version of previous fix
013c346a8d that was reverted because it
broke some tests for Quick Text. The problem was that it did not work
correctly in the case the text was wrapped to a fixed width.
To deal with this we'll accumulate current line full width (as if it
hadn't been wrapped) in layout data (layoutData->currentMaxWidth).
Then when the next line is explicitly wrapped by line or paragraph
separator, this accumulated width will be used to adjust layout's
maximum width.

Change-Id: Iad7119d9808e1db15fe1fbc5db049c3db928529f
Fixes: QTBUG-89557
Fixes: QTBUG-104986
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-11-19 18:03:32 +03:00
Marc Mutz
b2ed29b8d9 qcompilerdetection.h: include <version>
...and update the documentation for how we detect post-C++11 features,
as proposed on the mailing-list:
  https://lists.qt-project.org/pipermail/development/2022-November/043248.html

According to https://en.cppreference.com/w/cpp/compiler_support,
<version> is available from
- libstdc++ from GCC 9
- libc++ from LLVM 7
- MSVC 19.22 = VS 2019 16.2
- AppleClang 10 = Xcode 10.0 beta (10L176w), 10.0 (10A255), 10.1 (10B61)

It is _not_ available on
- GHS 22.1.4
- GCC 8.3.0 (as used by QNX 7.1, but the default is libc++)

Pick-to: 6.4
Task-number: QTBUG-108228
Change-Id: I61e0727573d1b4559228e3f5bd58d73e86a9256e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-11-19 09:01:44 +00:00
Timothée Keller
3a967deebd Update windeployqt plugins
Added scxmldatamodel to plugin mappings

Task-number: QTBUG-100700
Pick-to: 6.4
Change-Id: I58af7c0e47d3d9b7fc4d733610dcee8a7cb17228
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-11-19 04:34:36 +01:00
Thiago Macieira
410f777106 QHostAddress: unexport QIPv6Address
Only affect MSVC anyway. For all the others, since everything is inline,
there's nothing to import or export.

Change-Id: Id8e48e8f498c4a029619fffd17288befde9b5f83
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-11-18 13:02:36 -08:00
Tor Arne Vestbø
83b31a3d99 Modernize QMessageBox documentation and example
Change-Id: Iebcdf53646f1a42c327414edf21ac93a7d1c0a56
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2022-11-18 19:25:20 +01:00
Tor Arne Vestbø
cbe7cead44 Add note to blacklist documentation about how keywords relate
Fix up deprecated macOS keyword while we're at it.

Change-Id: I6f6ba21bde161d3dd3ac6c243f1b5f7c16ef3228
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2022-11-18 19:25:20 +01:00
Tor Arne Vestbø
554ba2c39b macOS: Don't send posted events via runloop observer
The logic was added in b0016ea9a6b225757e3ee06b50e8f7d05463ddf7,
but the test-case in the bug report works fine without this logic.
As sending events from a runloop observer is dubious, and causes
problems since it's not tied to the quite complex machinery of
the general event processing, it's better to remove it.

The original issue is already tested by sendEventsOnProcessEvents
in tst_QCore/GuiApplication.

Task-number: QTBUG-4521
Change-Id: I857519a09a13a72b7434727c0229606403be7ed3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-11-18 19:25:20 +01:00
Axel Spoerl
5809c6fffd Add name() getter in QPlatformTheme
This patch adds a getter for the current platform theme's name.
It is populated by QPlatformThemeFactory::create() if a plugin has been
loaded successfully.

Change-Id: I2c891c46e7dfcc262c35e32e345ae3dc2623e3a5
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-11-18 18:44:31 +01:00
Mikolaj Boc
626ec74359 Migrate to using the constructor of QtLoader
Wasm shell used to call the function QtLoader instead of constructing
a new QtLoader. Change this.

Also change the doc to recommend using the constructor.

Change-Id: I57c52eab389aa82449c7db3f4c646ffb234df778
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-11-18 18:02:21 +01:00
Marc Mutz
0786405857 tst_QMap: remove unused std::as_const clone
Amends d273076b44.

Pick-to: 6.4 6.2
Change-Id: Icfff438223ed10756f15e25ea52cccdf93dd47a2
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2022-11-18 18:02:21 +01:00
Liang Qi
a823366f77 Add QPlatformTheme::MouseCursorTheme and MouseCursorSize
Also implement in QGenericUnixTheme/QKdeTheme/QGnomeTheme/QGtk3Theme.

On Wayland, there is wl_cursor_theme_load() and etc in wayland-cursor.h.

On X11/xcb, cursor theme and size are common, either in XCURSOR_THEME
and XCURSOR_SIZE envs, or in gsettings for gtk/gnome world.

On Windows, cursor theme is part of theme file, see SetWindowTheme in
https://learn.microsoft.com/en-gb/windows/win32/api/uxtheme/nf-uxtheme-setwindowtheme .
For system settings, for example on Windows 10, Mouse Settings,
Additional mouse options, Pointers Tab, Scheme.

On macOS, it looks like cursor theme is deprecated.

Change-Id: I5821377d966c281fb8330da1f5baa7f0ddf86a9f
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-11-18 16:19:34 +01:00
Dennis Oberst
f678893f8a Update bundled zlib to version 1.2.13
zlib 1.2.13 has been available since October 13, 2022.
Also fixes CVE-2022-37434.

[ChangeLog][Third-Party Code] zlib was updated to version 1.2.13.

Fixes: QTBUG-108130
Pick-to: 6.4 6.2 5.15
Change-Id: Iaa2a9486f1cbbcd6a23d48df632e01bc05b414d5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-11-18 13:14:23 +01:00