Added link to Adding Open SSL support to Android Applications
Users are having difficulty finding this information, so adding a link
to the networking module's SSL Classes page.
Clarified the section title for adding SSL when building Qt from source.
Pick-to: 6.3 6.4
Change-Id: I88fbf696583d75c76d3b9778dbacd058eb00b50d
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Add support for accessing local fonts via local-fonts API.
Local fonts API is available in Chrome 103 and above.
Fixes: QTBUG-81736
Change-Id: Iac47b3a30c7a22933cbdbfc97ce0791edb63b5bd
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This implements the build system bits required to build Qt
as as separate wasm modules a.k.a Emscripten side modules.
Enable by configuring with the "-shared" flag.
This is the first step towards shared library support and gets
us as far as being able to load QtCore and instantiate a
QCoreApplication.
Task-number: QTBUG-63925
Change-Id: Ib8f07f80fb5b13c8dbba65c7db735dc557b70d0e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This fixes some threading bugs
Pick-to: 6.4
Change-Id: I1a96dcc54d8338de09b551d52a166d073e85d752
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Two qdoc files included a .cmake file that contained qdoc markup. After
.cmake files got license headers, the license header showed up in the
flow content of the documentation.
Rename the .cmake file to .qdocinc and adjust the license header to be
in line with the rest of the documentation.
This amends commit 87bcb9ca6ec883afb86165a282557014c9f06e41.
Change-Id: Ie9b02c75b67791c60cc8e054b52a15ffa9cf3e32
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Type registration isn't necessary any more, unless you're trying to look
up a name back to ID or QMetaType object. It hasn't been since 6.0.
Drive-by update the example not to use deprecated API.
Drive-by remove the paragraph about requirements that aren't accurate
any more.
Pick-to: 6.4
Task-number: QTBUG-104858
Change-Id: Ic6547f8247454b47baa8fffd170eecb66719fa65
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Extend the support of pointing at the right test from batch from WASM
to all supported platforms.
Change-Id: I9b6342ed0954f0fdc2f08c76f6b3f24f44f0388a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This follows-up on commit 4d24fcd3e1 -
when ShortData is bigger than a pointer (on 32-bit systems, when using
64-bit ShortData), copying d isn't sufficient; data must be copied.
Likewise, comparing d to check for equality is insufficient when
isShort(), as the other may also be short and differ in the more
significant bytes.
Change-Id: I49c0cf33727b8b43436cf0e3f57f602e83226885
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Unifies our approach to calling CoInitializeEx and CoUninitialize,
removing a lot of boilerplate in the process, and also fixes a few
bugs where we would incorrectly balance our calls to CoInitializeEx
and CoUninitialize.
The optimistic approach of qfilesystemengine_win.cpp of calling
CoCreateInstance without initializing the COM library explicitly
has been removed, as calling CoInitializeEx should be a noop in
the situation where it's already been loaded.
Change-Id: I9e2ec101678c2ebb9946504b5e8034e58f1bb56a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The resource compiler may not use the same parameters as we passed
to CL, and if so, there won't be any definition for WIN32, this will
cause some header files think we are not building for Windows. To
eliminate this uncertainty, we just pass "/DWIN32" to the resource
compiler to let it have this definition unconditionally. It won't
hurt in any case anyway. And this parameter is also hard-coded in
vcpkg's Windows toolchain by default, so it should be safe.
Change-Id: I45c42c40de8f4ab75fee219832f84d22b653af31
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Now that there's QLibraryInfo::isDebugBuild(), it's better to also
have QLibraryInfo::isSharedBuild() at the same time. It's also a
very useful information about the current Qt build.
I think debug/release and static/shared are the most important
properties of a library, so it's better to have them both.
Deprecate the global function qSharedBuild() in favor of the newly
introduced QLibraryInfo::isSharedBuild().
As a drive-by, add the nodiscard attribute to both functions.
[ChangeLog][QtCore] Added QLibraryInfo::isSharedBuild() and deprecated
qSharedBuild().
Change-Id: I48fa0dc5eeca97e709d5267733fa70aae244174f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add CollectionInfo to scrollable nodes.
Every scrollable node will get a CollectionInfo attached to signal
the number of (possibly invisible) children.
This is necessary as TalkBack on Android doesn't scroll to items not
visible on screen if the number of further child nodes is not
communicated to TalkBack.
* Return success of scroll to TalkBack.
TalkBack needs the result of the scroll to decide if it should leave
the current element or stay after a scroll was successful.
Success of a scroll action is measured as the successful movement
of the children of the scrolled element. This is a workaround for
the Qt Accessibility API not returning the success of failure of a
performed action.
Task-number: QTBUG-103499
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: Ie2c51d0b77fb5030973a0f93c42e0db3082be45e
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
QtQuick Flickable has an issue that after a scroll the previously
hidden items are not added to the A11Y hierarchy. That happens because
Android has no ways to detect that something has changed.
This patch uses the ScrollingEnd event to notify Android A11Y backend
that the Flickable was scrolled, so that it could update the A11Y
hierarchy and add the previously hidden nodes.
The ScrollingEnd event generation is added to QQuickFlickable in a
separate commit.
Task-number: QTBUG-103513
Pick-to: 6.4 6.3 6.2 5.15
Change-Id: Ie6cd688d56343bcfe7ce9580c0b9244dd6d6c068
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Samuel Mira <samuel.mira@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
[ChangeLog][Potentially Source-Incompatible Changes] qSharedBuild() is
moved from qglobal.h to qlibraryinfo.h, '#include <QtCore/QLibraryInfo>'
needs to be added where it's used.
Task-number: QTBUG-99313
Change-Id: Ic64561a8eb129ba2934e2770ca02119de208a2a5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Yuhang Zhao <2546789017@qq.com>
We first detached in operator[] itself, then in the data()
call.
Change-Id: I18b8b282b3b879125db350e0127953f83f773619
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
It does a check to ensure you aren't comparing outside the container.
Fixes: QTBUG-106001
Pick-to: 6.2 6.3 6.4
Change-Id: Ic6547f8247454b47baa8fffd170eef346b7f4f24
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
isMinimized in QWasmWindow::getTitleBarControlRect is unused. Remove it.
Change-Id: Iee0a351d4d20d5436fe45a18543d0811b8443459
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
The function is used the internal window activation machinery and
should not be called by user code.
Many tests still use this function, and should be ported over to
QWidget::activateWindow(). For now they are using the private
helper in QApplicationPrivate, so that we can progress with the
public API deprecation.
Change-Id: I29f1575acf9efdcbae4c005ee9b2eb1bb0c8e5b5
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
With styles that want the selected combobox item to flash, QComboBox
runs a modal event loop in hidePopup. This might result in reentrancy if
a mouseReleaseEvent is processed during the 60 ms of flashing.
Since mouseReleaseEvent calls hidePopup again, we end up reentrancy and
possibly undefined behavior which has caused crashes with Qt Creator on
macOS.
Prevent the reentrancy of hidePopup using a boolean flag. Since
QBoolBlocker (or QScopedValueRollback) cannot be used with a bit flag,
use a QScopeGuard to reset the flag reliably.
Fixes: QTBUG-105951
Change-Id: Iaa5df47b93217fc8dff621764ac4005bbc3459b7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
(cherry picked from commit 2af64c4577e42fecfeab9611c15fa8526bb09988)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add "/c65001" to explicitly set the code page to UTF-8 for
the resource compiler, otherwise the resource compiler may
pick up the local code page instead.
Already tested locally, most Qt repos build without any problem,
only very little repos are untested due to my local environment
can't build them.
Change-Id: I7e20f936d6af1fbb90b5c20980190b727c9021de
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
9a369a25dd added a
QAccessibleEvent ctor that takes a QAccessibleInterface*
instead of a QObject*.
Retrieving the QAccessibleInterface* later is done using the
interface's unique ID stored in the m_uniqueId member.
However, the fact that m_uniqueId is a member
of the union alongside with m_child means that setting
a child via QAccessibleEvent::setChild also overwrites
the stored unique ID, which breaks retrieving the accessible
interface later.
Fix this for the case where the QAccessibleInterface has
an associated QObject by assigning m_object in the ctor as well.
This means that a QAccessibleEvent created using either of the two
constructors (the one taking the QObject* and the one taking
the QAccessibleInterface* associated with the object) now behaves
the same.
Fixing the case where there is no associated QObject would require
further changes (e.g. adding a member for the QAccessibleInterface*
or making the m_uniqueId member a separate member instead of having
it in a union with m_child). However, I see no way to do so without
breaking the ABI, so that is left unchanged.
This also adds a corresponding test case.
Fixes: QTBUG-105988
Pick-to: 6.4
Change-Id: I71a548af0277a5034e9e207f066fa3e25c5393f3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
When using QAccessibleEvents of types QAccessible::Selection,
QAccessible::SelectionAdd and QAccessible::SelectionRemove,
Qt (internally) also always uses QAccessbibleEvent::setChild to
set the child that has been (un)selected.
As a consequence, the interface retrieved using
QAccessibleEvent::accessibleInterface here is not the
a11y object in which the selection has changed, but
the child, so notifying about a change to its selected
state (as happens here in the AT-SPI adapter) is in line
with that.
For AT-SPI, assistive technology (like the Orca screen reader)
often reacts to the SelectionChanged event on the object
managing the selection, so send a corresponding event
for the parent of the (un)selected child as well.
(Besides the lack of support for the AT-SPI Selection
interface - s. QTBUG-105909 - the fact that this event
wasn't sent previously e.g. turned out to be one reason
for the Orca screen reader not announcing selected cells in
the Qt 6 based UI variant of LibreOffice Calc.)
Change-Id: Icc8b9a7ecc77bc5394fd1ab4f8163caed951ba86
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
QAccessible::SelectionWithin is meant to be used
when several changes to a selection have occurred
(instead of using multiple QAccessible::SelectionAdd
and QAccessible::SelectionRemoved events).
So far, that event was simply ignored by the AT-SPI
adapter.
Forward that as a SelectionChanged event to AT-SPI.
Change-Id: Ia8187f82b9b96b7ca5b52bf0a0923bbf4c777ad1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This helps get ready for wasm64
Change-Id: I6db5b93c7ca851cab7fc95701b27a20263c8c0bd
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Pick-to: 6.4
Change-Id: I67a9a0d06e88384c0bb6f5008609bcfbf504705f
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The reply *is* needed.
Otherwise, e.g. running
examples/widgets/widgets/spinboxes/spinboxes
and clicking on the a11y objects for the spinboxes
in Accerciser's [1] treeview of the app's a11y
hierarchy makes Accerciser output this and crash:
> $ accerciser
> dbus[67434]: arguments to dbus_message_unref() were incorrect, assertion "message != NULL" failed in file ../../../dbus/dbus-message.c line 1727.
> This is normally a bug in some application using the D-Bus library.
>
> D-Bus not built with -rdynamic so unable to print a backtrace
> Aborted (core dumped)
[1] https://gitlab.gnome.org/GNOME/accerciser
diff --git a/src/gui/accessible/linux/atspiadaptor.cpp b/src/gui/accessible/linux/atspiadaptor.cpp
index cdc27132c9..6b8a9fcaac 100644
Change-Id: I442d3130623ccae096a6b79577874a6fd95c8aa2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
... but not actually defined or used
anywhere.
Change-Id: I8d6b9f58e7ec6bb795f10cf058c3f043995cefbd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The GetStringAtOffset method was added to the
AT-SPI Text interface in at-spi2-core commmit [1]:
commit 56220f05bc8b7683911658e1a8aff4a1ab3cab8d
Author: Mike Gorse <mgorse@suse.com>
Date: Mon Aug 19 16:43:02 2013 -0500
Add atspi_text_get_string_at_offset
As compared to GetTextAtOffset, which is very similar and
already supported in Qt's AT-SPI adapter, the new method
uses a new enum, AtspiTextGranularity, to specify the region
of text that should be returned.
Other than AtspiTextBoundaryType (that is used by
GetTextAtOffset), AtspiTextGranularity now also has
a value for the paragraph granularity
(ATSPI_TEXT_GRANULARITY_PARAGRAPH).
While AtspiTextBoundaryType has two enum values for the
word/sentence/line boundaries (ATSPI_TEXT_BOUNDARY_WORD_START and
ATSPI_TEXT_BOUNDARY_WORD_END, etc.), AtspiTextGranularity
doesn't have this any more, but ATSPI_TEXT_GRANULARITY_WORD
etc. seem to correspond to what the variants ending on "_START"
do when used with GetTextAtOffset, since the documentation says that
the range is "defined by the boundaries of a word
starting at the beginning of the current word and finishing
at the beginning of the following one, if present." (and likewise
for ATSPI_TEXT_GRANULARITY_SENTENCE, ATSPI_TEXT_GRANULARITY_LINE,
ATSPI_TEXT_GRANULARITY_PARAGRAPH).
In order to support GetStringAtOffset, this
adds a new mapping from the AtspiTextGranularity enum values
to the corresponding QAccessible::TextBoundaryType, similar
to what's done for the AtspiTextBoundaryType in the
handling of the GetTextAtOffset method.
The existing AtSpiAdaptor::qAccessibleBoundaryType
method is renamed to
AtSpiAdaptor::qAccessibleBoundaryTypeFromAtspiBoundaryType
to clearer distinguish it from the newly introduced
AtSpiAdaptor::qAccessibleBoundaryTypeFromAtspiTextGranularity.
No similar new alternatives have been added
to AT-SPI for GetTextBeforeOffset and GetTextAfterOffset.
[1] 56220f05bc
Fixes: QTBUG-105811
Change-Id: I674a760e80c349baea89dcb4ac7aecdef9b2b45f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This implements handling for the ScrollSubstringTo
method from the AT-SPI Text interface by calling
QAccessibleTextInterface::scrollToSubstring with
the given text offsets.
While the AT-SPI method has an additional parameter
for the scroll type that specifies where on screen
to place the given substring (s. doc at [1]), there
is no equivalent in
QAccessibleTextInterface::scrollToSubstring,
so ignore that parameter.
[1] https://lazka.github.io/pgi-docs/Atspi-2.0/classes/Text.html#Atspi.Text.scroll_substring_to
Fixes: QTBUG-105854
Change-Id: I390e1316c5c55cb646a299499a5f87c9c6945a44
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The QScopedPointer::take() call in comparison() test was used to
avoid a double-deletion error, because the test is creating two
QScopedPointer instances referencing the same memory.
Avoid the take() call by providing a custom DummyDeleter and
managing the memory by the extarnal std::unique_ptr.
As the test now has no test-cases for QScopedPointer::take()
calls, create a new test for this deprecated API, and guard
it with QT_DEPRECATED_SINCE checks.
Task-number: QTBUG-104858
Change-Id: Iecc28d44d76c9ce5835e6b1a1df7db30e2a9ca25
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The most common changes are:
* removing the explicit tests for deprecated APIs
* QMultiMap::insertMulti() -> QMultiMap::insert()
* QMultiMap::insert(QMultiMap) -> QMultiMap::unite(QMultiMap)
Add separate tests for the deprecated APIs, and guard them
with QT_DEPRECATED_SINCE() checks.
Task-number: QTBUG-104858
Change-Id: Ifb79212d07f20028d93d75f2b32ec3785cc93b22
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QVariant::Type -> QMetaType::Type.
* Guard the test for deprecated fromUtf16(const ushort *) overload with
QT_DEPRECATED_SINCE check.
* Use fromUtf16(const char16_t *) overload in other places.
As a drive-by: fix formatting in the affected lines.
Task-number: QTBUG-104858
Change-Id: I9fa3a935bca36e97f934f673e2fc07b451c72872
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This fixes dock widget undocking - previously, without the capture, any
widget that the mouse accidentally entered would get the event,
resulting in re-docking problems, cursor issues etc.
Fixes: QTBUG-105621
Pick-to: 6.4
Change-Id: Ia1f2c91578018f2ae9df903bc0730200ede17d32
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Logging category lcQpaDockWidgets was used in both dock widget test
and implementation. This dual use caused static builds to fail.
This patch replaces lcQpaDockWidgets with a test specific logging
category in tst_QDockWidget.
Pick-to: 6.4 6.3 6.2
Change-Id: I02cdfdaee9c1c1840126d803139b3d271aeac236
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
But not before ::fromValue, since that registers automatically.
Take the opportunity to add the \relates to the two streaming operators
to QDataStream, so the documentation shows up *somewhere* at all.
Pick-to: 6.4
Task-number: QTBUG-105469
Change-Id: Ic6547f8247454b47baa8fffd170eb8ffc31feb5d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
For those, moc does know their type ID, and yet they may be still
forward-declared in the C++ side, so the meta object may have recorded a
null pointer in the metatype array.
Fixes: QTBUG-105832
Change-Id: Ic6547f8247454b47baa8fffd170dae07c0813dc7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
[ChangeLog][QtCore][QScopedArrayPointer] Is no longer limited to 2Gi
elements in size.
Task-number: QTBUG-103533
Change-Id: Ic591b3245c53d478e42ff054e01054d855b38685
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Port ints that should be qsizetype. None of these are likely to cause
bugs, because both path lengths and number of directory entries are
usually limited by the OS, not by INT_MAX.
As a drive-by, replace length() with size() and port some functions
from QString to QStringView.
Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-103525
Change-Id: I79eb6d580631346a1e77eb1c7a73a3880943794e
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Implement auto test for (de)serialization of dock widget properties.
Test settings compatibility by importing a hard coded byte array.
Test serialization format and sequence by comparing expected and real
serialization output.
Test dock widget closing behavior (QTBUG-103474) to ensure that
no closing inconsistency is caused by serialization incompatibility.
Extensively document/comment the test to ensure failures can be easily
interpreted in the future.
Task-number: QTBUG-103474
Change-Id: I3c1589c2c291b2ed56334d09b85536d4c7388f92
Pick-to: 6.4 6.3 6.2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The snippet for QFileDialog::saveFileContent is wrong - the parameters
used are in wrong order.
Pick-to: 6.4 6.2 5.15
Change-Id: I022e8ed2ef5aeea5a44e9b10ac211893a3e24c0f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The class used to be implicitly movable to a different thread, but this
is no longer the case, so we don't need to initialize and uninitialize
the COM library in start() and stop(). A qFatal has been added to ensure
we detect if this will be required again.
Change-Id: Ib22fe0bdcd5cb96f05632b09803c5de8ff43279a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Add implementation for requestInterruption() and
isInterruptionRequested().
Pick-to: 6.4
Change-Id: I9ffabb0181a48c71deded7362c6c8e2e96418cc0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The cpp/winrt configure test fails if clang is being used so there is no
need to explicitly check for the compiler.
Change-Id: Ifb2cb792cf3ea2d2ff09be6e47d741f09aec765f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This is useful in some cases where extra parameters have to be set on
the test target.
Change-Id: Ic727fdaf0bc9c2e1c684d1a86352d31c0f974477
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>