Commit Graph

62166 Commits

Author SHA1 Message Date
Marc Mutz
6dba28419b Q(Read|Write)Locker: mark ctors [[nodiscard]]
They're RAII classes, and RAII class' constructors should be marked
[[nodiscard]].

Pick-to: 6.6
Task-number: QTBUG-104164
Change-Id: I9b91c18e67e99bf84abdd12236a18a8c4ec39620
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-20 07:34:09 +02:00
Amir Masoud Abdol
1bf144ba78 Resolve an issue with detecting GSSAPI on macOS
Spack, like VcPkg, sets the `CMAKE_FIND_FRAMEWORK` to `LAST`, as a
result, similar to VcPkg, when Spack is used, FindGSSAPI opts for
`gssapi_krb5` which is not what we want. By dropping the `gssapi_krb5`
from the list of alternative names we can resolve this without much
tinkering with internals of these package managers.

Pick-to: 6.5 6.6
Fixes: QTBUG-114537
Change-Id: If517c409511f58e3bed78316a2030393dc249a40
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-06-20 07:34:09 +02:00
Mikolaj Boc
451c0a6b1c Make qtbase compile for WASM with Werror
There are unused variable warnings which cause the compilation to
fail when Werror is used in qpermissions_wasm.cpp

Change-Id: I2cf2035f52f0a5d570a56dcd4c82bf2ecf3006c7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-06-20 06:07:30 +02:00
Shawn Rutledge
a8a75d2c4b xcb: Don't clear touch or tablet devices due to device hierarchy event
When QXcbConnection::xi2SetupDevices() reacts to a device hierarchy
event and re-discovers an already-known slave device, it doesn't call
xi2SetupSlavePointerDevice() again. I.e. it won't attempt to add it to
m_touchDevices or m_tabletData because it was already known. So it
should not clear m_touchDevices or m_tabletData either, but only remove
the touch devices that are known to have disappeared. Tablet styli
normally come and go from proximity, so it's ok to avoid deleting the
corresponding device data.

Also fix some other failure cases after testing hotplugging more with
tests/manual/inputdevices: there should be no crashes, no duplicated
devices after plugging (although the QAIM might have a bug that makes
it look that way), no leftover instances after unplugging.

Amends 2a9d93efc6

Pick-to: 6.6 6.5 6.5.2
Fixes: QTBUG-114334
Change-Id: I30f5e532f7dd3a465d56ecdd34d893cbadbf0453
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-20 06:07:30 +02:00
Volker Hilsheimer
89566bf749 QKeySequenceEdit: don't finish when opening a context menu
Right-clicking in a QKeySequenceEdit opens the usual context menu for a
line edit, which generates a focusOut event. QKeySequenceEdit finishes
the recording when it loses focus, which includes deselecting the text.

We should not finish or deselect if the focusOut event has focusReason
FocusReasonPopup, as otherwise users cannot copy the text (keyboard
shortcuts don't work for that, obviously).

Pick-to: 6.6
Task-number: QTBUG-114624
Change-Id: I0b3c535c189151daa29cf17640493f3353e6394b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-20 02:03:21 +02:00
Liang Qi
b992aabd89 Android: use logging category for im debug
Pick-to: 6.6 6.5
Change-Id: I78e84313841f83416dee6b6b2970b402acce5060
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-06-19 10:37:32 +02:00
Thiago Macieira
d2368cde70 Long live futexes for Darwin!
Like commit 91f6460aff which added support
for Windows, this commit does the same for our final major OS.

The Darwin kernel exposes a set of __ulock_{wait,wait2,wake} APIs [1],
but these APIs are marked as private, so we cannot rely on them being
stable, nor we can use these APIs in builds of Qt intended for
the Apple App Store. By wholesale disabling the use of the APIs
in App Store compliant builds, and runtime checking availability
of the APIs when we do build them in, we should be safe, unless
the semantics of the APIs change in ways we haven't accounted for,
but that's a risk we're willing to take.

Note that libc++ uses these private APIs to implement P1135R5
(the C++20 synchronization library) [2], but that use is under
a "special permission" from the Darwin team, and meant only for
use in the Apple vendored version of libc++ shipped with their
operating systems, where they control both the kernel and the
standard library.

[1] https://github.com/apple-oss-distributions/xnu/blob/xnu-8792.81.2/bsd/sys/ulock.h
[2] https://reviews.llvm.org/D68480.

Change-Id: Ib709fc1585f647a98d54fffd16663b4965458404
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-06-18 15:45:37 -07:00
Thiago Macieira
674aa084c2 Q*ValueRef: suppress MSVC warning on deriving from non-exported base
Warning C4275 non dll-interface class 'QJsonValueConstRef' used as base for dll-interface class 'QJsonValueRef' UniRemoteAdapter C:\qt\Qt6.5.1\6.5.1\msvc2019_64\include\QtCore\qjsonvalue.h 219

Pick-to: 6.5 6.6
Fixes: QTBUG-114629
Change-Id: I443cf0c8a76243eead33fffd176930f96c43eb47
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-18 20:06:57 +00:00
Ahmad Samir
7779400ba6 Moc: fix generated code for nested enum class corner case
Fixes an issue with generated code where the name of an enclosing
namespace is identical to an enum class type, when Q_ENUM_NS is used.

Consider:
namespace a {
    Q_NAMESPACE
    namespace b {
        enum class b { Key, Key2 };
        Q_ENUM_NS(b);
    }
}

moc generated code such as:
Q_CONSTINIT const QMetaObject a:🅱️:staticMetaObject = { {
    ...
    qt_incomplete_metaTypeArray<qt_meta_stringdata_CLASSaSCOPEbENDCLASS_t,
        // enum 'TestEnum'
        QtPrivate::TypeAndForceComplete<b::b, std::true_type>,
        // Q_OBJECT / Q_GADGET
        QtPrivate::TypeAndForceComplete<void, std::true_type>
    >,
    nullptr
} };

which confused the compiler:
error: ‘b’ is not a member of ‘a:🅱️:b
   83 |         QtPrivate::TypeAndForceComplete<b::b, std::true_type>,

Fixes: QTBUG-112996
Pick-to: 6.6
Change-Id: I37aee83c32efe96cc9d6c2bd0bdb9ba80bb7b8a7
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-06-18 21:28:58 +03:00
Tor Arne Vestbø
e603661c48 QIcon::fromTheme(): Always consult "hicolor" theme last
The Freedesktop Icon Theme Specification [1] describes that,
if a theme does not specify anything for its 'Inherits' key,
"implementations are required to add the 'hicolor' theme to
the inheritance tree. An implementation may optionally add
other default themes in between the last specified theme and
the hicolor theme."

And later, when describing the lookup algorithm, that "The
lookup is done first in the current theme, and then recursively
in each of the current theme's parents, and finally in the
default theme called 'hicolor' (implementations may add more
default themes before 'hicolor', but 'hicolor' must be last)".

But it doesn't explicitly describe the behavior when a theme
does specify a list of inherited themes via the 'Inherits' key,
and this list explicitly includes 'hicolor'.

In that case, our custom fallback theme, which we inject after
the theme's explicit parents, will be prioritized after 'hicolor'.

As it's likely that the theme author added 'hicolor' to their
parent list to ensure that 'hicolor' is at some point consulted,
but didn't intent it to be priorized, and that the spec puts focus
on 'hicolor' being last, it seems reasonable that we can move the
'hicolor' theme to the end of the fallback list, and as a result
always prioritize fallbackThemeName() over 'hicolor'.

[ChangeLog][QtGui][QIcon] The 'hicolor' theme will now always be
prioritized last when looking up fallback themes, even if
explicitly declared as a theme parent in a theme.

[1] https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html

Pick-to: 6.6
Change-Id: I76538e4e7e9e395f9e5a38e704c60fb6b9688885
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-06-18 20:28:58 +02:00
Tor Arne Vestbø
addde7843f Consult QIcon::fallbackThemeName() even when theme name is empty
We still need to consult fallbackThemeName() when computing the
parent list for an individual theme, as the Freedesktop Theme Icon
spec mandates that the "hicolor" theme comes last, but we no longer
need to do explicit fallback to fallbackThemeName() if a theme is
not found.

Pick-to: 6.5 6.6
Change-Id: I6c0b5a45d8258c5b6eaa761402944a735b1606ba
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-18 20:28:58 +02:00
Tor Arne Vestbø
dde45bcefb Consult QIcon::fallbackSearchPaths() even when theme name is empty
The use of fallback icons should not depend on a theme being set.

[ChangeLog][QtGui][QIcon] QIcon::fallbackSearchPaths() will now be consulted
for fallback icons even if the current theme name is empty.

Pick-to: 6.5 6.6
Change-Id: Ia8d14062de7c53601fd9dac30f87a9e672aa2207
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-18 20:28:57 +02:00
Ahmad Samir
bb16c215e3 QProcess: add testUnixProcessParameters as a dep. for tst_qprocess
So that building only tst_qprocess also builds the required test app.

Change-Id: I19a92f9dd2f4de08302d09cad0caf55c285a6dae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-18 20:32:30 +03:00
Ahmad Samir
5eec5a674b QStringBuilder: fix typos in API docs
My fault, I had added that bit of the docs a while ago.

Pick-to: 6.6
Change-Id: I1fa2c10b0f7263e12b5b2a4d18f362c702f9d831
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-18 14:39:57 +00:00
Tor Arne Vestbø
f4dca7c512 Consult QIcon::fallbackThemeName() even for themes with explicit parents
We would previously only use the fallback theme for themes that did
not exist, or for themes that did not declare any parent theme.

We now unconditionally use the fallback theme, even for themes that
declare their own parent themes, so that a QIcon::fromTheme("foo")
that doesn't exist in the current theme, nor any of its parents,
nor in "hicolor", will still be looked up in the fallback theme.

The reason this seemed to work in the existing tests was because
our test themes inherit system themes such as crystalsvg and gnome,
and we didn't provide a hicolor theme. Any of these themes missing
would lead us into the code path where we use the fallback theme
for a missing theme, masking that fact that we had not added the
fallback theme to the list of fallbacks for the theme that had
explicit parents declared.

The logic has been moved out of the theme parsing and into an
accessor in QIconTheme, so that we're not caching the fallback
theme lookup.

[ChangeLog][QtGui][QIcon] QIcon::fallbackThemeName() will now be
used as fallback even for themes that declare a parent theme.

Pick-to: 6.5 6.6
Change-Id: Ib0ce1dfe97030f23893460ed624073a719a3ebd1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-18 10:49:14 +02:00
Tor Arne Vestbø
ae36c1dc9c Invalidate QIconLoader cache when setting fallback theme
Setting a fallback theme will affect the lookup strategy, so we need
to invalidate earlier lookups.

Pick-to: 6.5 6.6
Change-Id: I962245ddb3a20b7798d5ce831ed8a369b0ab76b4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-18 00:05:18 +02:00
Amir Masoud Abdol
059f4dc6f8 Disable TEST_separate_debug_info when building with MSVC or on Apple
As mentioned, separate debug info will always be generated when building
with `-release -force-debug-info`.

Pick-to: 6.5 6.6
Fixes: QTBUG-108015
Change-Id: I49e79177ca833007b932b58a76261c07acd52ca6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-06-17 23:21:18 +02:00
Tor Arne Vestbø
4dacaaf15a Skip clearing the QIcon cache on QIconLoader theme key change
QThemeIconEngine takes care of creating a new icon engine when
the icon theme key changes, so we don't need to invalidate the
entire QIcon cache.

Pick-to: 6.6
Change-Id: Ie3bca00a9146d1f429b2a6f8ab0b39e15834d158
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-17 22:13:36 +02:00
Amir Masoud Abdol
331f316b91 Disable TRY_RUN when cross compiling
Fixes: QTBUG-114625
Pick-to: 6.5.2 6.5 6.6
Change-Id: Idec5ea438ebf3f88d63da7d956ab52e2a0fa1821
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
2023-06-17 20:26:12 +02:00
Tor Arne Vestbø
a452e22546 Unify QIcon theme icon loading and cache invalidation
The logic for invalidating a theme QIcon when the platform theme
changed, or when the user set an explicit icon theme, was tied
to QIconLoaderEngine, so any platform theme implementing
QPlatformTheme::createIconEngine() with a custom icon engine
would not take part in this cache invalidation.

As we want users of QIcon::fromTheme to be agnostic to where the
icon is actually coming from, and have a consistent behavior for
the various QIcon APIs for setting explicit themes, the logic
for invalidating the themed icon has now been moved up one
layer, to a new QThemeIconEngine, that is responsible for
lazily creating the actual engine based on the name. The
engine proxies the actual icon loading through to the
real engine via a new QProxyIconEngine helper class.

Pick-to: 6.6
Change-Id: I474589981f751d7467e3073533cba542182f2d36
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-17 17:52:01 +02:00
Tor Arne Vestbø
14f31bf16e Add missing QApplication include in streambookmarks example
Amends 3ccf2f8308.

Pick-to: 6.5 6.6
Change-Id: Ib51777ef9af44aff7fbb813b58eb0fbb74761373
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-17 14:02:04 +02:00
Mikolaj Boc
b96a38acd2 Don't simulate main loop with JSPI
This is not needed, as main loop just works with awaited calls
thanks to JS suspender objects with JSPI enabled.

Fixes: QTBUG-114651
Change-Id: I94e187953ac8cec5c999f1b02508efecc19641f6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-06-17 00:13:21 +02:00
Joerg Bornemann
4d1525b0b8 CMake: Remove the dysfunctional -testcocoon configure option
TestCocoon is not maintained anymore, and the -testcocoon configure
option of Qt didn't do anything useful since Qt 6.0.0.

Remove the option. It's possible to create an instrumented build by
using dedicated CMake toolchain files as described in the documentation
of Squish Coco (TestCocoon's replacement).

Fixes: QTBUG-88316
Change-Id: I8a565cdd288aca9208f48138d2b663802cc0de90
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-06-16 23:39:01 +02:00
Amir Masoud Abdol
c5b0fa6082 Use QT_64BIT instead of checking CMAKE_SIZEOF_VOID_P
Pick-to: 6.6
Change-Id: I7db7b8f6c354df264a467538fffffab726ea1b61
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-06-16 21:54:36 +02:00
Tor Arne Vestbø
e9276d7497 QIconLoader: Invalidate cache even if system theme hasn't changed name
The platform theme's icon loading logic may still have changed, even
if the theme name has not, so we still need to invalidate the theme
cache.

Pick-to: 6.5 6.6
Change-Id: Id3635c235fadb007df86d93ce3beb5622d26b8bf
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-16 21:54:36 +02:00
Tor Arne Vestbø
89fe108590 Use systemFallbackThemeName in QIconLoader::updateSystemTheme()
The fallback logic in QIconLoader::updateSystemTheme() has been
updated to match QIconLoader::ensureInitialized(), by using the
systemFallbackThemeName() directly, rather than the possibly
user set QIconLoader::fallbackThemeName().

Pick-to: 6.5 6.6
Change-Id: Ib5aab62bbfb22683d3bddf87c4e798eca4a5af62
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-16 21:54:36 +02:00
Tor Arne Vestbø
883c3dc8c8 Update QIconLoader system theme unconditionally on ThemeChange
We cache the system theme name in QIconLoader, so when a theme change
comes in we need to update the system icon theme name regardless of
whether a user theme has been set.

The updated system theme name will not be reflected through the
QiconLoader::themeNamed() unless the user theme is cleared/unset.

Pick-to: 6.6 6.5
Change-Id: Id949e55e2fa12e40818ba54cf2a10ce48fe10815
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-06-16 21:54:36 +02:00
BogDan Vatra
76619eae4c Don't add prefix for BaseName
Adding the "assets:" prefix to BaseName leads to wrong names returned by
QFileInfo{"assets:/path/to/file"}.fileName().
Instead to return "file" it returns "assets:/file" which is not the
expected result.

Fixes: QTBUG-114576
Fixes: QTBUG-114219
Fixes: QTBUG-112261
Pick-to: 6.6 6.5 6.5.2
Change-Id: I574bf325300c0aedef68b1b183fa837144ad63c6
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-06-16 22:54:36 +03:00
Edward Welbourne
77d0f37536 Return TZ time-zone backend's tranCache() as a const reference
Assorted code was iterating from tranCache().cbegin() to
tranCache().cend(), and getting away with it because CoW means
tranCache()'s two distinct returns were referencing the same pimpl,
but let's make tranCache() return a const ref so that these calls are
all accessing the same object (and we get complaints if we do anything
non-const with it via this method).

Axivion-Id: qt_qtbase_dev_linux:SV1685
Pick-to: 5.15 6.2 6.5 6.6
Change-Id: If43ccf37c2b27837e5462cb4a0eeb07f0045cbfe
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-06-16 21:37:11 +02:00
Edward Welbourne
3ccf2f8308 Examples: "About &Qt" should show info about Qt, not quit
A few examples seem to have copied and pasted a help action "About
&Qt" that triggered QCoreApplication::quit. This does not look like
best practice. Use QApplication::aboutQt instead.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I1887a3c999d752a24c7c4d3cabc4a5d63b29b966
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-06-16 21:37:11 +02:00
Edward Welbourne
59d2869765 Core examples: consistent #include order
Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I014a895a8abeccc9d17b68fb67c00cea22957fed
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-06-16 21:37:11 +02:00
Alexey Edelev
28c9625d00 Fix CMP0099 impact - disallow propagating internal linker options
CMP0099 changes the way of LINK_ONLY genex works. With CMP0099 set to
OLD LINK_ONLY genex only links the exact library binary/archive without
propagating other interface options from the target. This feature was
exploited by PlatformXInternal targets to avoid propagating of their
linker options. Nowadays when CMP0099 is forced to NEW by Qt scripts,
including user-facing, we cannot rely on LINK_ONLY genex.

Introduce _qt_is_internal_target property that is set for all Qt
executables and explicitly limits the propagation of the linker
options from PlatformXInternal targets.

Pick-to: 6.5 6.6
Fixes: QTBUG-113641
Change-Id: I3a0ecddb65886e435073feb24c1b47035130ba70
Reviewed-by: Alexandru Croitor (OOO) <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-06-16 20:58:02 +02:00
Friedemann Kleint
408fbd3f2d QMessageBox: Remove include of qdebug.h
Move the implementation qRequireVersion() to prevent having
to include qdebug.h which pulls in many other headers.

Amends b5d874e36f.

Fix missing include introduced by
3a553507a1.

Pick-to: 6.6
Task-number: QTBUG-114214
Task-number: QTBUG-97601
Change-Id: Iba68ffca95061666d9458ffa5700d07c7669da5b
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-06-16 19:42:12 +02:00
Laszlo Agocs
684070bc34 rhi doc: Fix a repeating typo
Pick-to: 6.6
Change-Id: I2025d559be357a6825cdcae4cb0f0931a89864ab
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-06-16 19:42:12 +02:00
Tobias Koenig
f7792d2b6d Schannel: Add support for proper listing of ciphers
Reworked the code to list supported ciphers for Schannel
backend to provide the proper cipher names and cipher
properties.
Note: restricting the used ciphers for a TLS connection
is only supported for TLS 1.2 yet!

[ChangeLog][QtNetwork][QSslConfiguration] Add support for
listing supported ciphers with Schannel backend.

Change-Id: Idfc17335ec489315387a3e84b7a76a263be22378
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-06-16 09:27:00 +02:00
Matthias Rauter
ef7d809eaf Send LeaveEvent as reaction to WM_POINTERLEAVE to reset hover states
Currently items can get stuck in a hovered state when all fingers are
lifted from a touchscreen. This is because we don't react to the
WM_POINTERLEAVE event from Windows. With this patch we translate a
WM_POINTERLEAVE event to a LeaveEvent to remove the hover state from
QtQuick items.

Fixes: QTBUG-62912
Pick-to: 6.5 6.6
Change-Id: I8a6fb6b7ec77457854a75e20277565d1eb89bab6
Reviewed-by: Wladimir Leuschner <wladimir.leuschner@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2023-06-16 09:22:54 +02:00
Axel Spoerl
7993321e76 Update documentation of signal QDockWidget::visibilityChanged
The signal can deviate from QWidget::isVisible().

This patch clarifies the signal's documentation.
Since its name suggests that it is in sync with QWidget::isVisible(),
A TODO comment is added to consider deprication in Qt7.
It appears to be more reliable to listen to hide/show events.

Pick-to: 6.6 6.5
Fixes: QTBUG-48161
Change-Id: I43aa16c2ecb4877abd8effb7da8e07576438d6d2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2023-06-16 09:21:34 +02:00
Mårten Nordheim
8da8126bae Update public suffix list
Pick-to: 6.6 6.5.2 6.5
Task-number: QTBUG-114548
Change-Id: I5857438aeb1902cd68ceffe4e5179e7bbdf9b44b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-06-16 07:07:19 +00:00
Marc Mutz
8d39b21655 RIP QBasicMutexLocker
This was used as a work-around for Q5MutexLocker's UB downcasting
QBasicMutex to QMutex, and for some unspecified performance
improvements.

Now that Q6MutexLocker is a template, the two are almost
token-by-token identical, so we can remove this work-around and use
QMutexLocker directly.

Partially reverts aea500d5d7.

Pick-to: 6.6 6.5 6.2
Change-Id: I57ef5c53999869aa3454fbbaad884c1d18591b2a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-16 09:03:43 +02:00
Thiago Macieira
166e792269 QProcess/FreeBSD: remove the workaround allowing undefined symbols
On FreeBSD, the environ variable doesn't come from libc, but is instead
inserted during linking. See ccf74b5928
(5.6) for more information.

But instead of allowing undefined symbols in QtCore, let's use a weakref
to environ so this one symbol is allowed to be undefined. It won't be,
but the linker doesn't know.

FreeBSD appears to be the only BSD to require this. We used to apply the
same linker option to OpenBSD in Qt 5, but neither the OpenBSD or nor
the NetBSD ports trees[1][2] carry a patch for this, so I don't think
it's necessary.

[1] https://github.com/openbsd/ports/tree/master/x11/qt6/qtbase/patches
[2] https://github.com/NetBSD/pkgsrc/tree/trunk/x11/qt6-qtbase/patches

Pick-to: 6.6
Change-Id: I63b988479db546dabffcfffd17661c839014771a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-06-16 01:07:33 +00:00
Fabian Kosmale
44b5ad01f0 moc: Handle attributes after meta-method tag
We so far only handled them if they came at the very start of the method
declaration.
This patch ensures that we also handle them after the meta-method tag
(but before the actual type).
Unifying parseFunction and parseMaybeFunction to avoid the need to
munally keep them in sync is left for another day.

Fixes: QTBUG-111330
Pick-to: 6.6 6.5 6.5.2 6.2
Change-Id: Ic94edb69f04b9150aea2c8e6d004a8b9e5cf12ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-16 00:07:01 +02:00
Ilya Fedin
3025dc597f Update QIconLoader system theme names on QWSI ThemeChange
The GTK platform theme (and possibly others) emit theme change
when the named icon theme changes, but that was not propagated
to QIconLoader.

We now call QIconLoader::updateSystemTheme(), but note that
if a user theme has been set we ignore the system theme update
and will end up with a stale value, even if the user theme is
later cleared. This will be fixed in a follow up commit.

Pick-to: 6.6 6.5
Change-Id: I40b537f3618f44d396db0c7ca67e515dfcdfba44
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-06-15 21:20:53 +02:00
Colin Snover
03bbad68ce Fix typo in QCocoaWindow comment
Pick-to: 6.6 6.5
Change-Id: Idea292bc2927ff9a534f06b054c26b4ab3ef1bea
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-06-15 12:30:32 -05:00
Mikolaj Boc
a73f41d657 Add test filter argument to wasm js test runner
Change-Id: I8e0c5d7b9049fb3c3248749db8dc8c616db293f0
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
2023-06-15 18:55:32 +02:00
Mikolaj Boc
ee23941c29 Introduce qstdweb::bindForever stub for submodule update
The qstdweb::bindForever function will be introduced soon for binding
callbacks with forever lifetime. For now, since submodules have to be
adapted first, introduce a stub function to port qtmultimedia which
uses Promise::make - it will have its interface changed with
relation to bindForever.

Task-number: QTBUG-112296
Change-Id: I578e1633574e11877a8f5ec14d0f00dfd7c766bf
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2023-06-15 18:55:32 +02:00
Wladimir Leuschner
f5206b3812 Skip generation of glyphs for control characters
QFontEngine tries to generate glyphs for ASCII control characters. Those
characters have no glyphs and should therefore not be generated.

Task-number: QTBUG-113848
Change-Id: Ib15a50c642d8bc92bc007ab5522aebc5a7b2993d
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2023-06-15 14:55:07 +03:00
Amir Masoud Abdol
69d74afd43 Add TRY_RUN_FLAGS argument to customize the TRY_RUN command
Some of our tools don't have the `-h`, or `-v` flag, or it could be
that the `-v` flag also prints the entire `--help` as well, e.g.,
`androiddeployqt`. When running in Jenkins, this may lead to a message
box being shown and consequently stopping the build. By customizing the
flag per tool, and limiting the TRY_RUN to tools that support `-v` or
`--version`, we can avoid this.

Also removed TRY_RUN from `macdeployqt` which doesn't need it anyway.

Amend 41b32cd2c4

Pick-to: 6.5.2 6.5 6.6
Fixes: QTBUG-114530
Change-Id: I78e3344d2553c0050c285ae86f2310bd373c6c57
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-06-15 11:46:00 +00:00
Tor Arne Vestbø
f3c2cf47fc De-inline QIconLoader::themeName()
The method is more than a plain getter, so keep it with the other
logic of the class.

Pick-to: 6.5 6.6
Change-Id: I34aa185a51f04e3db3c1918f9723e53f33e5e9e1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2023-06-15 13:42:39 +02:00
Topi Reinio
ebc371de0d Doc: RSS listing example: Fix file quoting
The example was moved to qtnetwork but its documentation
still referred to old paths under /examples/corelib.

Add documentation dependency to qtwidgets as RSS listing
example's docs link to a number of widget classes.

Pick-to: 6.6 6.5
Change-Id: Ief1c9dc2ca38ba3da1fe3039500292147ec4cc7d
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2023-06-15 11:34:17 +00:00
Mikolaj Boc
7264f141cf Add window painting testcase to the QWasmWindow test
The test checks whether windows repaint correctly by sampling the
background after their backing stores have been flushed.

Change-Id: Ib544457074d7d477a4acdc5c331ef83e5ba471d2
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-06-15 13:34:02 +02:00