Bump the minimum supported Android API from 23 to 28 i.e.
Android Oreo 9. This is done to focus more and more on
recent versions.
Fixes: QTBUG-125023
Task-number: QTBUG-124890
Change-Id: I4d510b771f413e5711dd44de454211e019c63db6
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
We weren't handling it at all, emscripten already supports it.
Fixes: QTBUG-125222
Pick-to: 6.7
Change-Id: I761eed2c8c034604cd02ba436db68cec4fdeb784
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Move the constexpr fromArray() check from fromArray() to constExpr()
and there add the protection necessary to work around
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71962, copied from
tst_QByteArrayView.
As a drive-by, add the test for constexpr construction from a char16_t
array, which was missing here (probably because of the GCC bug) while
the corresponding test was already in tst_QByteArrayView.
Amends 107ff4c1d6b5da2cb11c65b2bd9106817f7fdb02(!).
(iow: 6.0, and no, I don't know why it became a problem only now)
Pick-to: 6.7 6.5 6.2
Change-Id: Id9d2a08175709f8bf85b3b192e7aa49783b9e715
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Move the constexpr fromArray() check from fromArray() to constExpr()
where there is already the protection necessary to work around
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71962.
Amends bbe7570ddcc6fcce707a355b76d2d0024c44ea38(!).
(iow: 6.0, and no, I don't know why it became a problem only now)
Pick-to: 6.7 6.5 6.2
Change-Id: Id9d2a08175709f8bf85b3b192e7aa49783b9e714
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Because of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71962, and
because marking constExpr() as __attribute__((no_sanitize_undefined))
doesn't fix a thing, we opted to disable the triggering parts of
constExpr() from all GCC builds.
This is, of course, unfortunate, since it meaningfully reduces
compile-time coverage in the general case for a rather obscure build
type most won't ever use.
While GCC doesn't give us a predefined macro to check for in the .cpp
file, the cmake build system knows whether we use ubsan, so just
define a macro of our own.
As a drive-by, simplify GCC detection by using Q_CC_GCC_ONLY.
Amends de6a004bc5.
Pick-to: 6.7 6.5 6.2
Task-number: QTBUG-101307
Change-Id: I4be5bd103b9d2386b2ac9fd22e0c34f9c63fee04
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Replace public friend operators operator==(), operator!=(),
operator<(), etc of QUuid and GUID with friend methods
comparesEqual() / compareThreeWay().
Use Q_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE, because
the (in)equality operators are constexpr.
And then we use helper macros, because the other relational
operators are not constexpr. Cannot make relational operators
constexpr, because it requires to make variant() and isNull() methods
constexpr and QT_CORE_INLINE_SINCE. But the experiments
show that it does not work with adding constexpr to
QT_CORE_INLINE_SINCE.
Put relational operators under !QT_CORE_REMOVED_SINCE(6, 8) to prevent
an ambiguity. On Windows the metatype for QUuid is created
in removed_api.cpp. That leads to an ambiguity, and as a result
the compiler fails to create the equals methods of QMetaTypeInterface.
This, in turn, leads to the failed comparisons.
The usage of !QT_CORE_REMOVED_SINCE(6, 8) solves the problem.
Task-number: QTBUG-120304
Change-Id: I640bdeb8f1f7306ba06b9e4193d008cf2bb6dbfb
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This bridges the 2 currently existing attribute types for
the newly added QAccessibleAttributesInterface to UIA.
As described in the AT-SPI bridge implementation already,
QAccessible::Attribute::Level semantically matches
the "aria-level" ARIA attribute, and is mapped to
a "level" property for the UIA_AriaPropertiesPropertyId
as described in the Core Accessibility API Mappings
specification for both, headings [1] and non-headings [2].
Map all attributes set in QAccessible::Attribute::Custom
to that property as well, keeping key and value as they
are.
As described in the UIA Element Properties Identifiers
doc [3] for UIA_AriaPropertiesPropertyId:
> AriaProperties is a collection of Name/Value pairs with
> delimiters of = (equals) and ; (semicolon), for example,
> "checked=true;disabled=false".
In addition, if the level attribute is set for an object
of role heading, report the corresponding
StyleId_Heading for UIA_StyleIdAttributeId, as also
described in the Core Accessibility API Mappings spec [1].
For MingW, add UIA_StyleIdAttributeId and
StyleId_Heading<NUMBER> defines
to qwindowsuiautomation.h, as the MingW headers
apparently don't have them yet (see log of
failed MingW builds without those defines: [4] [5]).
[1] https://www.w3.org/TR/core-aam-1.2/#ariaLevelHeading
[2] https://www.w3.org/TR/core-aam-1.2/#ariaLevel
[3] https://learn.microsoft.com/en-us/windows/win32/winauto/uiauto-automation-element-propids
[4] 051e46739b/build_1716364832/log.txt.gz
[5] b8e6241678/build_1716370445/log.txt.gz
Fixes: QTBUG-119057
Change-Id: I00b15e95c35c0f31ba34161bc061a3085fc28682
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Focus abstraction in 58d5d4b7c2 was
supposed to be behavior-neutral. QWidgetPrivate::reparentFocusChildren
used QObject::findChildren() to find children inside and outside the
current focus chain. If the re-parented widget had only direct children
and the focus chain was equal to creation-order, the result was
identical to previous behavior.
When the re-parented widget had grandchildren, the behavior differred.
While not being detected by existing tests, it caused a regression.
Re-implement the previous logic: Iterate through the focus chain,
instead of relying on QObject::findChildren() returning a complete and
well-ordered list.
Modify tst_QWidget::focusChainOnReparent() in order to cover the
regression.
This amends 58d5d4b7c2.
Fixes: QTBUG-125257
Change-Id: Iff4f1d0d9b6117c50c8980dfb6eebfc6f6d4a710
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Even if dark mode has been requested by the application explicitly,
a style, like the Vista style, might polish the palette to be light.
In that case, the frame should be light as well.
Amends 95d4e6baba.
Task-number: QTBUG-124490
Change-Id: I7ddb0a80a5f043e98cf184537bffe75e917c3d38
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The new approach allows to imply the macro definitions for every Qt
submodule and user project without the need of setting it explicitly
from CMake. This also prevent users from introducing the
incompatibility between Qt modules due to defining
the QT_DISABLE_DEPRECATED_UP_TO version lower than qtbase was built
with.
Task-number: QTBUG-124765
Change-Id: I7ba481f62cb9073ae0343c400ffc26f239f080f1
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This will be used by the SBOM generation code to retrieve the
directory where the framework file is installed.
Change-Id: I882344f1fa3c5a77e3cce85d2044aa0e682bed40
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
There was refactoring in 8c41125118 to
handle custom postfixes, which caused a regression in the postfix not
being set for macOS frameworks.
Specifically we set CMAKE_FRAMEWORK_MULTI_CONFIG_POSTFIX_DEBUG to
the value of ${${postfix_var}} but that variable was empty, because we
only set it in the PARENT_SCOPE.
Set the variable also in the current scope.
Amends 8c41125118
Pick-to: 6.5 6.7
Change-Id: Iae3f1050bb11805b4cce01ec491a13a3d6c0a9fc
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Both members, QCryptographicHashPrivate and QSmallByteArray, are
nothrow-constructible.
Pick-to: 6.7
Change-Id: I59fa93db15906002f230eb12b8639a595ef559cf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Overload set to be used in QUuid soon.
Pick-to: 6.7 6.5
Change-Id: I6f2c180bb7bb884d40f1691409e816405c3e5d47
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
We've already tested fixed-size-0 spans for default-constructibility
two lines before. We need to check dynamically-sized spans here.
This doesn't extend test coverage: in the course of the function we've
already default-constructed the correct type.
Amends f82cf6333e.
Pick-to: 6.7
Change-Id: Ibb192b1661f12babb449752bf107eca404a95ad2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add the support for multiple prescending macros like
QT_TECH_PREVIEW_API, Q_<MODULENAME>_EXPORT.
This also fixes couple issues caused by previous regex version.
Task-number: QTBUG-125395
Change-Id: I8781b52cb57dd14b427df226deb281619e7fc5d2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This bridges the 2 currently existing attribute types for
the newly added QAccessibleAttributesInterface to AT-SPI2
by using the corresponding object attributes.
QAccessible::Attribute::Level semantically matches
the "aria-level" ARIA attribute, and is mapped to
the "level" AT-SPI object attribute as described in
the Core Accessibility API Mappings specification
for both, headings [1] and non-headings [2].
All of the key-value pairs set in the
QAccessible::Attribute::Custom attribute
are bridged to the AT-SPI level as object attributes
using the same names and values.
Together with a corresponding demo change [3] for LibreOffice
implementing support for the QAccessible::Attribute::Level
attribute in the qt6-based LibreOffice variant, this makes
the specific use-case for reporting the heading level
mentioned in QTBUG-119057 work with the Orca screen reader.
Also tweak the QAccessibleAttributesInterface::attributeValue
documentation to clarify the type to be returned in the
QVariant. (The newly added AT-SPI implementation has
corresponding asserts.)
[1] https://www.w3.org/TR/core-aam-1.2/#ariaLevelHeading
[2] https://www.w3.org/TR/core-aam-1.2/#ariaLevel
[3] https://gerrit.libreoffice.org/c/core/+/159309
Task-number: QTBUG-119057
Change-Id: I7ccdbbcd601c176319ca547d4bdf50b8f93bd7d8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Move the extraction of the QVariant from QSettings into a helper
function.
Change-Id: I3b6be9939e138a244626dd81dbc3535e75770bb9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Extract the path normalization into a helper function, and use
qScopeGuard for leaving QSetting's group.
Moreover, slightly modernize the code by using sliced instead of mid,
and by using the more appropriate qEnvironmentVariable over getenv (our
target is a QString, and the variable contains user text).
Change-Id: I08e600782864684f10ff03451c789e59cdb8febf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Add a new constructor that takes just the parent Context.
This constructor will not load the Qt libraries or start the
Qt app straight away - the new method loadQtLibraries()
will need to be called for that.
Change-Id: I4e94928d23cb9a495400413d0306961e521303d4
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
When no explicit accessible name is set for a window,
QAccessibleWidget::text uses the window title instead for a
non-minimized window.
Send a QAccessible::NameChanged event when changing the
window title results in a change of the accessible name,
to ensure that the AT-SPI cache on Linux gets updated.
Extend tst_QAccessibility::mainWindowTest() to cover the scenario as well.
Note: The entire test function is skipped on platforms not supporting
window activation, e.g. Wayland.
Fixes: QTBUG-124192
Change-Id: I0fa7f683fb5969d6ba9878f6a506c4f192069799
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
It makes it possible to have it used from QML.
Change-Id: Ie4a1ef432f2a06e1d4bbe106bd41b5843e24d8bb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Issue introduced by a68e4f3b96 ("Use the
new QMetaType API in QVariant") in 6.0, which removed the d.is_null
reset at the same time as it replaced the std::destroy_at /
std::construct_at pair with an assignment operation.
[ChangeLog][QtCore][QVariant] Fixed a bug that would allow the class to
keep returning isNull() = true even after calling setValue().
Fixes: QTBUG-125472
Pick-to: 6.5 6.7
Change-Id: If05cb740b64f42eba21efffd17d13f6b1e8113c2
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
to keep the same format because \c is only used with two
tags which is unconsistent.
Pick-to: 6.7
Change-Id: Ie49f6c22a0f0813d49ea69865a80133ad81011c5
Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io>
When creating a QWindows11Style with QStyleFactory::create() the current
colorSchemeIndex and highContrastTheme usage is not set. Those values
are now queried and set also in the Constructor of QWindows11Style.
Fixes: QTBUG-124524
Pick-to: 6.7
Change-Id: I42a3aa5bafb0ff4193b8644ac1895a78b8c82120
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The documentation of QIcon::pixmap() taking a devicePixelRatio could be
read in the way that a QPixmap of the requested size and
devicePixelRatio is generated which is not true. The generation part is
only valid for the given mode and state.
Pick-to: 6.7 6.5
Change-Id: I5374cd7be17c32cd87d7b35552e60a4c07ebe6b2
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
When a KDE theme name doesn't contain the keywords "dark" or "light",
QKdeThemePrivate::updateColorScheme() falls back to heuristics. It
compares text and base color. It sets the color scheme to dark, if
text is lighter than base and otherwise to light.
When the theme name can't be read from KDE settings, because it is
stored on a different location or not yet set, the heuristics fallback
doesn't happen. The color scheme always becomes "Unknown".
Remove this limitation to the benefit of currently unsupported Linuxes.
Fixes: QTBUG-125285
Pick-to: 6.7
Change-Id: I120dd23eee71b14ea8ce3735c3f53bda2caa403e
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Some standard button icons do not have the correct quadratic extent
which leads to rendering artifacts. Even though the real fix might be to
actually let QIcon::actualSize() return the correct pixmap size instead
the size given by the construction of the QIcon via QIcon::addFile()
this fix does not hurt anyone.
Pick-to: 6.7 6.5
Fixes: QTBUG-73655
Change-Id: I43edb38b0146e7d0a698f7a6239da5dbfbc65aa4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
There are various legacy IANA IDs that we should recognize as aliases
for their contemporary equivalents. Later work shall also take these
into account in the Windows IDs. Scan CLDR's data about these aliases
and use it when constructing QTimeZone. This adds aliasMappingTable
and aliasIdData arrays to QTZP_data_p.h and an AliasData type to its
QtTimeZoneCldr namespace.
Change-Id: I1bbfce62959a7e1b7a0bc4a320c32f5a174a2ff2
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Since the new functionality interface feature has removed all calls to
qtActivityDelegate, this is no longer needed.
Task-number: QTBUG-118874
Change-Id: Ibf65f953be8c4694b543610b405b65b91f3ec9ee
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
These are unused functions. They're only called through JNI and those
calls are now through the interface system, so through the interface,
which is the QtActivityDelegate object. These functions are also
already overridden and, in the case of openContextMenu, only
implemented by QtActivityDelegate anyways.
Task-number: QTBUG-118874
Change-Id: I69f41752626ac9892ecef8e40187dfe4663ab08a
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Need a convenient way to access QtServiceEmbeddedDelegate from native
and create via QtView, so extend embedded delegate factory to handle
creating them.
QtView now initializes a QtEmbeddedViewInterface via
QtEmbeddedViewInterfaceFactory, which now has a generic create() API
that takes a Context object, and creates/returns a proper Service or
Activity delegate.
Task-number: QTBUG-118874
Change-Id: I8b04b280b9234f3ac3ab818b2d333430d1ac4e41
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Interface for input-related actions, based off of QtInputDelegate.
Implements all the QtInputDelegate functions called from native code
plus an extra function that allows the native side to get a
QtInputConnectionListener object for QtWindow creation.
Removed some unused functions and unmarked @UsedFromNativeCode in some
that are no longer called from native, but still used from java.
Added QtInputConnectionListener null checks in QtInputConnection, due
to the possibility of a non-existent InputInterface returning a null
QtInputConnectionListener for the QtInputConnection constructor.
Task-number: QTBUG-118874
Change-Id: I8d4cde3e0c735471d0fa30d16db20eb13542cdaa
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
Small interface, just for QtLayout. This is used in
QtAndroid::qtLayout(), which is called by functions handling the
virtual keyboard and the keyboard handles.
Task-number: QTBUG-118874
Change-Id: Ib9b2830136d05dfd70c9c6ca86ac29be36cc5c30
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Implements interface for context menu in QtActivityDelegate and
QtEmbeddedDelegate.
Task-number: QTBUG-118874
Change-Id: I799ad1aca4beb789b87830b720abf0963ca09274
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
This will provide the JNI API used by QtAndroidAccessibility namespace
via QtAndroid namespace.
Removed unnecessary functions like createAccessibilityDelegate from
QtEmbeddedDelegate, moved the interface extension to where it is
actually supported: QtActivityDelegate.
Until now, QtActivityDelegateBase has called the QtEmbeddedDelegate
implementation on createAccessibilityDelegate() in order to create a
QtAccessibilityDelegate - which has not actually created the delegate -
and then done a null check before trying to call the - always null -
QtAccessibilityDelegate member.
The embedding and service-embedding usecases are now dealt with via the
interface validity checks on the C++ side, until an actual
implementation for those is completed.
Task-number: QTBUG-118874
Change-Id: Iea3db0e17ae80c0443e9027bdfe36bba311eed2b
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Add QtWindowInterface interface, to access native functionality related
to windows.
QtActivityBase now follows QtNative.onAppStateDetailsChanged in order
to register and unregister functionalities of QtActivityDelegate.
Task-number: QTBUG-118874
Change-Id: Ifad33bd7aac7683081f026f0591ef496909be095
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This class will be used by java delegates to register their supported
functionalities to the Qt/C++ side.
It registers two native functions: register- and
unregisterBackend, which will be used by the aforementioned
delegates.
It will be used by C++ classes which currently use
QtAndroid::qtActivityDelegate() to access a JNI object which implements
all these features in one big class.
Task-number: QTBUG-118874
Change-Id: I23a7e433104c20b96c08b682a96cfaec98ecb4a9
Reviewed-by: Tinja Paavoseppä <tinja.paavoseppa@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
at-spi2-core commit [1]
commit 8f1c70155b4132de2c567b3034e4f242e0450df5
Author: Mike Gorse <mgorse@suse.com>
Date: Wed Jan 3 16:52:31 2024 -0600
Add HelpText property and corresponding functions in atk and libatspi.
Closes#146
added a HelpText property to AT-SPI2. Qt already has
a corresponding QAccessible::Help, so report that
as the HelpText property in the AT-SPI adaptor.
[1] 8f1c70155b
Fixes: QTBUG-124197
Change-Id: I01489c1fdac953658d379951207f91784f3d1dfe
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
In the version update to 3.0.3, the LicenseId and LicenseFiles items
were updated, but not the License item.
Amends c9a1e8d306.
Pick-to: 6.7 6.5 6.2 5.15
Change-Id: I21870c78a247740ea8d67487a18511169607daba
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
While common script typically adapts the surrounding script, it is
possible for strings of only punctuation (for instance) to remain
undetermined. In addition, Qt considers Latin and Common the same in
font matching, so in order to get merging for latin, we need to
conflate them in the application fallback API as well.
This also adds a couple of missing clears of caches (clearing
the font cache itself when adding a new fallback, since the
fallbacks are kept as part of the cached font engine + clearing
the fallback cache when adding a new application font, since the
new application font may be a fallback candidate).
Note: This also adds some missing removeApplicationFont() calls
from other tests, since these were causing issues with the
new test.
Task-number: QTBUG-124914
Change-Id: Idbfa0f6b492a9194eca67b57101e674f7b8a4ec4
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>