Commit Graph

66972 Commits (e3c8a94ef5010be74e15bc9efcbcd71ce58ee174)

Author SHA1 Message Date
Jan Grulich d0b4e8a601 QGtk3Theme: Add support for xdg-desktop-portal to get color scheme
Use xdg-desktop-portal to get color scheme used by GNOME. Recent GNOME
versions use this as primary way to switch between light and dark theme.
Make this a preferred way to get color scheme and fallback to previous
methods in case xdg-desktop-portal cannot be used. Also update app theme
on runtime when color scheme changes, not only when theme is changed.

[ChangeLog][Platform Specific Changes][Linux] Add support for
xdg-desktop-portal to get color scheme in QGtk3Theme.

Fixes: QTBUG-116197
Change-Id: Ib3ffad405bc795ed6f4de4af411efc45721662b9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
2024-04-19 11:13:31 +00:00
Volker Hilsheimer 96fcb4ef84 Replace expensive inherits with cheaper qobject_cast (2)
In the Windows 11 style, it's better to include the headers for specific
widget types at the expense of compile time, than to pay a regular
runtime cost from using expensive inherits().

Add const, fix style, and break excessively long lines related to this
change.

Pick-to: 6.7
Change-Id: I2c8c6d98267d9ff3542decda71e08e462cf9807c
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io>
2024-04-19 13:13:31 +02:00
Joerg Bornemann 02b55967d5 QMake: Fix generation of Visual Studio filter files
This amends commit a0a990863f.

We bailed out of writing the filter file if opening the file for writing
was successful. The condition must be flipped.

Change-Id: I24331c5374a25c5a1126c6f7f71d41d840e0e532
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2024-04-19 12:47:42 +02:00
Fabian Kosmale 39bbfce9b6 QStringConverterICU: Pass correct pointer to callback
Pass the pointer to the current state, not a pointer to a pointer to it.

[ChangeLog][QtCore][QStringConverter] Fixed a bug involving moved
QStringEncoder/QStringDecoder objects accessing invalid state.

Amends 122270d6be.

Done-with: Marc Mutz <marc.mutz@qt.io>
Pick-to: 6.7 6.5
Change-Id: I70d4dc00e3e0db6cad964579662bcf6d185a4c34
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-04-19 05:34:08 +00:00
Ahmad Samir 488545ca72 QFSFileEngine: de-duplicate some code
The only difference is the name of the QFileSystemEngine method each one
calls.

This makes subsequent commits simpler, since now only one function will
need to be changed.

Change-Id: I1b7d2ceeab0ad98e2ee87b3a64f100ab906f7df5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-19 03:23:17 +02:00
Thiago Macieira 11f242174b QStringBuilder: DRY: use the Concatenable typedef
Instead of repeating the full template expansion.

Task-number: QTBUG-124117
Pick-to: 6.7
Change-Id: I40526efc4e93413794c3fffd17c4f9e200733660
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-04-18 14:36:00 -07:00
Thiago Macieira 2e8c6d467f QStringBuilder: DRY: simplify the if constexpr conditionals a bit
Both sides of it were calling the same appendTo(), so we can avoid
repeating ourselves. This MAY fix a warning with VS2019.

Fixes: QTBUG-124117
Pick-to: 6.7
Change-Id: I40526efc4e93413794c3fffd17c4f9c96ee187f9
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-04-18 14:35:58 -07:00
Thiago Macieira 71e87993d6 QStringConverter/Doc: add more details about additional codecs
Fixes: QTBUG-124221
Pick-to: 6.7
Change-Id: If1bf59ecbe014b569ba1fffd17c4d113d02425eb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-04-18 14:35:49 -07:00
Thiago Macieira c25541e9ac QXmlStreamWriter: fix attempts to write bad QStrings
We weren't doing the decoding from UTF-16 to UTF-32, so weren't catching
invalid code sequences

[ChangeLog][QtCore][QXmlStreamWriter] The class now rejects writing
UTF-8 and UTF-16 invalid input (improper code unit sequences).

Task-number: QTBUG-122241
Pick-to: 6.5 6.6 6.7
Change-Id: I83dda2d36c904517b3c0fffd17b42d17c637fdc4
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-04-18 14:35:09 -07:00
Thiago Macieira 94c62e3222 QXmlStreamWriter: decode UTF-8 into code points
We were iterating over code *units* and that yielded wrong results. The
one from the bug report was simply caused by the fact that
QUtf8StringView::value_type is char, which is signed on x86, so the
expression:
  *it <= u'\x1F'
was true for all non-Latin1 content.

But in attempting to fix this, I needed to do the proper UTF-8 decoding,
as otherwise we wouldn't catch non-Latin1 sequences and such.

[ChangeLog][QtCore][QXmlStreamWriter] Fixed a bug that caused the class
to fail to write UTF-8 strings with non-US-ASCII content when passed as
a QUtf8StringView.

Fixes: QTBUG-122241
Pick-to: 6.5 6.6 6.7
Change-Id: I83dda2d36c904517b3c0fffd17b42bbf09a493d0
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-04-18 14:35:09 -07:00
Thiago Macieira 17c964c4e8 QMetaType: allow converting to/from QChar and char16_t
Converting from char16_t to QString was already possible, going through
a QChar.

Change-Id: Ie28eadac333c4bcd8c08fffd17c5a41488ea5ba6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-04-18 14:35:06 -07:00
Thiago Macieira 4e11f40c1a QMetaType: add conversion from charXX_t to QString
Change-Id: I3c79b7e08fa346988dfefffd171f9c97384af5d0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-04-18 14:35:03 -07:00
Tor Arne Vestbø a78938e0f6 rhiwindow: Set DPR on image texture to ensure DPR-agnostic drawing
Otherwise the 20x20 margins will produce different layouts depending
on the DPR, which is not what we want.

Pick-to: 6.7
Change-Id: I4153d0843ef51c8e0f60d7d5166b153d45201c95
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2024-04-18 23:15:25 +02:00
Shawn Rutledge 8d84f7643b Fix lance readme: tests/auto/other/lancelot is gone now
Amends e8f93e38de

Pick-to: 6.2 6.5 6.7
Change-Id: Icca7562e4773ed6caa542a99c2d45a5b06968b7e
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2024-04-18 13:15:52 -07:00
Tor Arne Vestbø b74369c033 cmake: Add opt-out for adding -no_warn_duplicate_libraries linker flag
The classic linker (triggered via -ld_classic) doesn't support this flag,
and we can't construct a genex that takes this into account, so add an
opt-out for Qt WebEngine.

Pick-to: 6.7
Change-Id: I62418e0ff37fe8f5bdda2fa8d01b36a8fd44542a
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-04-18 19:30:31 +00:00
Tatiana Borisova 7689127d83 QDeadlineTimer: use new comparison helper macros
Replace public friend operators operator==() and operator!=() of
QDeadlineTimer to friend method comparesEqual().
Replace public friends operator<(),<=(),>(), etc of QDeadlineTimer to
friend method compareThreeWay().

Task-number: QTBUG-120304
Change-Id: Ib855ccac9b31b54fe28b822f2985154608fefa27
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-18 20:55:50 +02:00
Christian Ehrlicher 2cd0bc729e SQL/QSqlDatabase: use categorized logger
Use the categorized logger qt.sql.qsqldatabase

Change-Id: I25216d0809ff0316371a62913b56e1f56ab37ab4
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-18 20:11:14 +02:00
Christian Ehrlicher 6bc454b247 SQL/QSqlQuery: use categorized logger
Use the categorized logger qt.sql.qsqlquery

Change-Id: Ib5c26751ef013261080207fc13b80b91c644a640
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-18 20:11:14 +02:00
Christian Ehrlicher b773a4f583 QStyleSheetStyle: Don't try to load a pixmap with an empty filename
QStyleSheetStyle::loadPixmap() might be called with an empty filename
but then it should not try to load a file with an empty filename.

Pick-to: 6.7 6.5
Fixes: QTBUG-123839
Change-Id: Ie01e9f75f025650b0802736bb589ebdc48e93696
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-04-18 18:11:14 +00:00
MohammadHossein Qanbari f371f8a64d Convert Group Box Example to snippets and screenshots
Remove the Group Box Example from the repository, eliminating the
associated example codes, screenshot, and documentation file. The
only relevant portion used in the QGroupBox class has been relocated
to the existing snippet file. Additionally, all references to this
example across other files have been removed.

Fixes: QTBUG-119980
Pick-to: 6.7 6.6
Change-Id: I66f9dd9dab1fe64f2d20424af3acd135201827d2
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-18 20:11:14 +02:00
Allan Sandfeld Jensen 2d2fae4863 Copy image offset in copyMetadata
Making it be carried more consistently.

Pick-to: 6.7
Change-Id: I8d2da1264a59febbd44bbcff798b647ec2813bb0
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2024-04-18 20:11:14 +02:00
Volker Hilsheimer 3973d6c529 Replace expensive inherits with cheaper qobject_cast (1)
The accessibility implementations require the type to be fully
defined anyway in order to call type-specific APIs, so there's no
need to use inherits(). Use qobject_cast instead.

Pick-to: 6.7
Change-Id: I5c013be57f48272a748451f4888911fe6aa6574e
Reviewed-by: Pavel Dubsky <pavel.dubsky@qt.io>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
2024-04-18 19:06:02 +02:00
Ulf Hermann 460b0f98c6 Gui: Add Q_GADGET to QPointerEvent
It's exposed in the QPointingDevice::grabChanged signal. In order to build a complete graph of metaobjects via properties and methods we need
to know about all argument and return types as metaobjecs. Such a graph
is desirable for reasoning about the consistency of the type system.

Task-number: QTBUG-101143
Change-Id: Ib8eca9490504846ae96814f7d746084adf6a29f9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-04-18 17:06:02 +00:00
Marc Mutz a564618838 HttpTestServer: pass std::function by value and move into place
Virtually all callers of this function (will) pass rvalues, so take
the std::function by value (reaping C++17 guaranteed copy elision) and
std::move() into the member variable ("perfect sink").

Like for many owning types, moves are much cheaper than copies for
std::function, because the external state is merely tranferred between
objects, and not copied.

Amends e560adef21.

Pick-to: 6.7
Change-Id: I269b54e51ba09ac595ac4e4f255209778819adad
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-18 19:06:02 +02:00
Marc Mutz 5b6c6dab63 tst_QRestAccessManager: fix signature of server handlers
HttpTestServer::Handler is declared to take the first argument by
reference to const, not by value, so use the same parameter passing
for the lambdas passed to setHandler().

Avoids copying the (rather large) argument when invoked through the
std::function wrapper, and silences clazy-function-args-by-ref.

Pick-to: 6.7
Change-Id: I726d0b98a7fcb3b1b33c5bde203035f593c39bdd
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-18 19:06:02 +02:00
Marc Mutz d4aaf61b33 tst_QRestAccessManager: leak less on failure
Move some deleteLater() calls to before the first QCOMPARE/QVERIFY
macros, so they get executed even if the macros return on failure.

This isn't an all-encompassing solution, but I lack the time to port
all this to smart pointers, and this is some improvement.

As a drive-by, port QVERIFY(opt.has_value()) to QCOMPARE(opt, nullopt).

Task-number: QTBUG-120307
Pick-to: 6.7
Change-Id: Ia5a2cabd273a779938b22badc91b109fcc545203
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-18 19:06:01 +02:00
Marc Mutz 96f78cbdd9 qrestreply_p.h: include what you need
QStringDecoder within std::optional needs QStringDecoder to be fully
defined ("in-size" (Lakos)).

QByteArray, used as a function parameter, can be forward-declard,
though ("in-name-only" (Lakos)).

This also makes the header comply with Qt's private symbol versioning,
which requires every private header to include some other private
header, or, eventually, qglobal_p.h.

Amends 4da14a67a6.

Pick-to: 6.7
Change-Id: I35fed05955f1194299162b576834c1045672bcac
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-18 19:06:01 +02:00
Tor Arne Vestbø bc014d5fc7 iOS: Don't report UIDevice.currentDevice.orientation through QScreen
As of Qt 6 (3e12951c0b, the QScreen's
orientation() property is supposed to represent the orientation
of the screen from a window management perspective, and not the
orientation of the actual device, as in Qt 5 times.

For iOS, when the orientation of the app is locked to a orientation
via the Info.plist or [UIViewController supportedInterfaceOrientations],
the UIDevice API will keep reporting the actual orientation of the device,
which is wrong for the Qt 6 definition of the API.

We currently don't have an API in QScreen to represent the always
updating physical rotation of the device. For this use-case the
supported API is QOrientationReading in Qt Sensors.

[ChangeLog][iOS] QScreen::orientation() will no longer report the
device's physical orientation when orientation has been locked
to a subset of the available orientations, but will instead
match the primary orientation.

Task-number: QTBUG-38576
Task-number: QTBUG-121781
Change-Id: I251a039a618656466cbfd1d836a5b49a6be8e736
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2024-04-18 19:06:01 +02:00
Tor Arne Vestbø c0f6d10bc2 iOS: Remove plumbing for QWindow::reportContentOrientationChange
The [UIApplication setStatusBarOrientation:animated] API has been
deprecated since iOS 8, and a no-op since iOS 13. It is no longer
possible to report the orientation of a view or view controller
independently of the orientation of the view itself.

This was problematic because we were applying additional logic
to our screen geometry mapping based on the assumption that the
API was still doing something, resulting in broken auto rotation
when calling reportContentOrientationChange().

Removing the iOS implementation for reportContentOrientationChange
makes this API a no-op on QWindow as well, as no other platforms
seem to implement it. We should perhaps consider re-thinking the
screen orientation APIs in this light.

[ChangeLog][iOS] QWindow::reportContentOrientationChange no
longer has any effect on iOS, as the APIs used to implement
this on iOS are no longer available.

Task-number: QTBUG-38576
Task-number: QTBUG-121781
Change-Id: I5b129d21c990332170599c2580e389e252140d6f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-04-18 19:06:01 +02:00
Frédéric Lefebvre 021b5e3d3f tst_QWidget::focusChainOnHide remove QApplicationPrivate::setActiveWind
2f6fe3a268 has made calls to
QApplicationPrivate::setActiveWindow() redundant.

Remove redundant calls.

Task-number: QTBUG-121488
Change-Id: I5b429dcaa47cd179785345f9f7a80648574670dd
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-18 18:06:01 +01:00
Allan Sandfeld Jensen b7b0478405 Convert "(added in)" enum warnings to [since] syntax
With the since syntax we can now mark since more standardized

Pick-to: 6.7
Change-Id: I3c53010043a40e8887f1899cde2689ee80e530ae
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io>
2024-04-18 18:40:31 +02:00
Giuseppe D'Angelo 1025ff1bf4 QLogging: enable %{backtrace} support via <stacktrace>
C++23 gave us a standardized way to gather backtraces,
so we can use it to add cross-platform support for
%{backtrace}.

Guard the feature via a compile test; at the moment,
this is enabled it on MSVC only. GCC has experimental
support (requires linking against libstdc++exp), so it
will still fail the test.

[ChangeLog][QtCore][QDebug] Support for the %{backtrace}
expansion has been extended to the platforms supporting C++23's
<stacktrace> header (such as MSVC 2022 >= 17.4).

Change-Id: I04d58a193384a61e4f8e6fef78286d4bad98a025
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-18 15:42:27 +02:00
Eskil Abrahamsen Blomfeldt cba15d99f0 Add API to provide user-defined fallback fonts
When depending on Qt's font merging for providing glyphs for certain
languages, there are currently some drawbacks. For one, you will
typically get a system font which might not fit together with the
main font of the application.

In addition, you might get some glyphs from one font and other from
another (typically for Chinese where the character sets are so large
that fonts will often only implement parts).

And finally, you may get the wrong glyphs for writing systems with
regional differences, if your application is e.g. written in Japanese
and then run on a Chinese system, you might get Chinese versions of
characters which are shared between the languages.

Without language-based font matching in Qt, there's no silver bullet
for fixing this. This patch introduces API which makes it possible for
users to provide the solution themselves, either by selecting
application-provided fonts as fallbacks for certain scripts or by
hardcoding system fonts for a specific language.

[ChangeLog][Fonts] Added API to override default fallback font
families for specific scripts.

Task-number: QTBUG-121131
Change-Id: I23ee17b7dfe1c1e481c87cc67a05a0522841b598
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2024-04-18 15:25:23 +02:00
Marc Mutz 01ee796b96 QColorVector: make the (QPointF) ctor a named one
Instead of an explicit ctor, make conversion from QPointF an
explicitly-named ctor.

This prepares the class for being converted to a pure struct,
alleviating its use in arrays without the additional QUninitialized
kludge that Coverity doesn't seem to understand.

Amends 78a7e54f8f.

As a drive-by, take the QPointF by value, fixing
clazy-function-args-by-value.

Coverity-Id: 444249
Coverity-Id: 425860
Change-Id: I925e94b21bf041a6fb03c56ef9a2da85d8285982
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-04-18 15:25:22 +02:00
Tor Arne Vestbø 447a82ebe4 iOS: Move QUIWindow implementation out of qiosscreen.mm
Task-number: QTBUG-121781
Change-Id: Iaa4388908d0d59022ec05b63696147a0d1d01ae1
Reviewed-by: Amr Elsayed <amr.elsayed@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-04-18 15:25:22 +02:00
Tor Arne Vestbø 1a0c113b2d iOS: Handle geometry of maximized windows outside of QIOSScreen
Ideally we would report the available geometry of our screen in a way
that reflects the safe area margins of a potentially full screen window,
but doing so requires that we manage UIWindows via QScreen/UIScreen,
which is not in line with modern iOS window management.

We still apply safe area margins to maximized windows, as before,
but do so when applying the maximized state in QIOSWindow::setWindowState

Task-number: QTBUG-121781
Change-Id: If7b9855aea47014f01e23dfe197b7057a1305a68
Reviewed-by: Amr Elsayed <amr.elsayed@qt.io>
Reviewed-by: Doris Verria <doris.verria@qt.io>
2024-04-18 15:25:22 +02:00
Tor Arne Vestbø eb9923c67e iOS: Support message box at startup without relying on screen's window
Task-number: QTBUG-121781
Change-Id: Iafc911dad6c668799383f423e38ab389c29688b4
Reviewed-by: Doris Verria <doris.verria@qt.io>
2024-04-18 15:25:22 +02:00
Tor Arne Vestbø e48a9aca5d iOS: Reduce dependency on screen's UIWindow in QIOSScreen::grabWindow
We still fall back to m_uiWindow for grabbing the entire screen, but
the rest of the logic is now agnostic to where the window of the view
is coming from.

Task-number: QTBUG-121781
Change-Id: If8815f62d22a1d4bbdfe6fe24ddadce2223c8623
Reviewed-by: Amr Elsayed <amr.elsayed@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2024-04-18 15:25:22 +02:00
Tor Arne Vestbø f480b59914 iOS: Track virtual keyboard gestures via focus window instead of screen
We're moving away from the screen managing a UIWindow, so let's track
the UIWindow via the focus window instead.

Task-number: QTBUG-121781
Change-Id: I943b1d501f743c51b3f1484aecbe008c6dae8cd4
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Amr Elsayed <amr.elsayed@qt.io>
2024-04-18 15:25:22 +02:00
Pavel Dubsky f9c9981524 Use QComObject with QWindowsUiaMainProvider
This change adds QComObject as base to QWindowsUiaMainProvider in order
to reuse its implementation of IUnknown.

Change-Id: I48808262364992f90f18fc881594f151eeb29a3f
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2024-04-18 15:25:21 +02:00
Tatiana Borisova 6324075a2d QItemSelectionRange: use new comparison helper macros
Replace public operators operator==(), operator!=() of
QItemSelectionRange class to friend methods comparesEqual().

Use QT_CORE_REMOVED_SINCE and removed_api.cpp to get rid of current
comparison methods and replace them with a friend.

Task-number: QTBUG-120304
Change-Id: Ideff990c942d5ee1c89a93ac2081cc5d7067b23f
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-18 14:23:15 +02:00
Ahmed El Khazari a87764789f Android: Fix crash when selecting text on a TextField
The crash is due to absence of the helper class that manages the
selection in QtInputDelegate.
As a fix, updateInputDelegate() is introduced when setView(), where the
instantiation and clearance of EditPopupMenu is made. On the other hand,
the nullity of EditPopupMenu in QTEmbeddedDelegate is handled.

Fixes: QTBUG-122740
Pick-to: 6.7
Change-Id: Iac5cded7be7530dde8c739265fc9402670714d39
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-04-18 10:31:17 +00:00
Lorn Potter d374dd6f84 wasm: fix linux touchscreen keyboard input
Fixes: QTBUG-124366
Pick-to: 6.7
Change-Id: I9bd83ecb75b94efbf12b13055e292a74e6e9edcd
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
2024-04-18 20:31:17 +10:00
Even Oscar Andersen 1319101ece wasm: Enable fileselector test
Also add test files for emscripten platform to build

Change-Id: Ief03e44a4e3f3339a65453469a7ae0a6969f2252
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2024-04-18 12:31:17 +02:00
Marc Mutz db240d99cf androiddeplyqt: fix more missing pclose() on early returns
Found by Coverity.

This code predates the move of androiddeployqt to qtbase.

Pick-to: 6.7 6.6 6.5 6.2 5.15
Coverity-Id: 378442
Change-Id: Icc24918159132c55a3817eaf19c96ea212dfa6dc
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2024-04-18 10:31:01 +01:00
Marc Mutz c64b30129d androiddeplyqt: fix missing pclose() on early return
Found by Coverity.

Amends 5bb178c479.

Pick-to: 6.7 6.6 6.5 6.2 5.15
Coverity-Id: 378357
Change-Id: I8839280ce15d8e7d9e1f4024ca796c2d8b4ed930
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2024-04-18 10:31:01 +01:00
Marc Mutz 1cfe42235c QEglFSKmsGbmScreen::framebufferForBufferObject: release() at the correct time
It's the gbm_bo_get_user_data() function that takes ownership of the
FrameBuffer object, not the caller of the function, so release() into
gbm_bo_set_user_data() not into the return. This threw Coverity off,
which complained about a leak of the return value in the caller.

Amends 2f0fa59d59, but not picking
through all the refactorings the code has since seen.

Pick-to: 6.7 6.6 6.5
Coverity-Id: 444117
Change-Id: I5f058e4a42942349193eecfd8c00ec9499ef4886
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-04-18 10:31:01 +01:00
Marc Mutz d2436f7294 QSignalSpy: make verify() methods static
... because they can be. We call them without a value object and while
they don't touch *this, ubsan complained (rightfully):

  qsignalspy.h:29:28: runtime error: member call on address 0x7ffdfaab2b20 which does not point to an object of type 'QSignalSpy'
   0x7ffdfaab2b20: note: object has invalid vptr
    00 00 00 00  00 00 00 00 00 00 00 00  00 2b 00 00 c0 60 00 00  60 14 00 00 60 60 00 00  70 14 00 00
                 ^~~~~~~~~~~~~~~~~~~~~~~
                 invalid vptr

Amends e68edd6a07.

Task-number: QTBUG-123544
Change-Id: I8e9ba3270a35777a704e68130d2f2bccb658a536
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
2024-04-18 11:31:01 +02:00
Marc Mutz 3afcfbc400 Port QVersionNumber to QSpan
The new ctor could replace all existing ones. However, keep the QList
ctors to participate in implicit sharing, but mark them as weak
overloads in order to break the ambiguity for arguments that convert
to both QList and QSpan. Also keep the initalizer_list ctor because
it's implicit, and should be.

[ChangeLog][Potentially Source-Incompatible Changes] We have begun to
port APIs to QSpan, replacing overload sets of concrete container
classes. This breaks code that relied on concrete container class
overloads and passed types that implicitly convert to such a
container, but not to QSpan. The backwards-compatible fix is to make
the conversion explicit.

[ChangeLog][QtCore][QVersionNumber] Added construction from QSpan,
replacing the QVarLengthArray constructor.

Fixes: QTBUG-121480
Change-Id: I9be173d0471872ddc449c876465c6a01abc49ff4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-18 09:31:01 +00:00
Marc Mutz 063e31209b QRestReply: micro-optimize optional<QStringDecoder> handling
Use optional::emplace() instead of assignment from an rvalue.

Saves the move constructor and destructor calls, both of which are not
trivial (due to cleanFn).

Pick-to: 6.7
Change-Id: Ief77626c77d0c8c2ce17e3b1a21496a7da969761
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2024-04-18 11:31:00 +02:00