AppKit automatically appends "Start Dictation..." and "Emoji & Symbols"
menu items, after a separator, to a menu in the menu bar that has the
title "Edit" in the operating system language.
Qt applications might however be translated to some other language, in
which case the "Edit" menu is not recognized by AppKit, and the menu
items won't be added. This is bad for accessibility and for users
wanting to type emojis.
If we have a menu that has the title "Edit" as translated in Qt's i18n
system, then create those items manually. To prevent a duplication of
the system- provided menu items, don't add the items if there already
is one with the action being set to the relevant selector. Otherwise,
perform the selector or call the NSApplication method ourselves. This
then results in the relevant keyboard input through regular code paths.
Fixes: QTBUG-79565
Change-Id: Ifd06036211756277550d398034689aca8e770133
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Make it possible to use new native interface QX11Application with
offscreen plugin in case of x11, which technically is
x11 application without xcb connection.
This change is motivated by use of new native interface
in webengine, where offscreen plugin is used for
some tests.
Pick-to: 6.2
Change-Id: Ic2ed5b39573062feaa1e8985962d5d9327b371d7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Android 11 enables pointer tagging by default on arm64 systems [1],
which can cause QML to get invalid data, which caused the color
issue (and most likely other issues).
[1] https://source.android.com/devices/tech/debug/tagged-pointers
Fixes: QTBUG-97009
Task-number: QTBUG-91150
Change-Id: Ic4f145bba3345b3bee5445685f03269e3785f514
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
(cherry picked from commit 9fa805f7f8dfe96d561e9ed3170770ad768baf93)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It doesn't make sense to have a recursive QSet with deleted operator==,
since it's not possible to add elements to it. Consequently declaring a
metatype for it also doesn't make sense. Remove the commented
compile-time check for it.
Task-number: QTBUG-96257
Change-Id: I74ebefb38adcbe36d5c2f317188743e1f37fe16d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If we have OPENSSL_NO_DEPRECATED_3_0 defined. This includes RSA, DSA,
EC and DH-related APIs. As of now, we only make sure the code still
compiles.
Pick-to: 6.2 5.15
Fixes: QTBUG-83733
Change-Id: Id455b851421ce0dcdfb0229fa515ba2b2ed690b1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Unify the logic in QTextEngine
Ensure tightBoundingRect, and the FreeType boundingRect, calculates from
the shaped x offset when calculating the max x coordinate for a glyph.
Fixes: QTBUG-7768
Task-number: QTBUG-70184
Task-number: QTBUG-85936
Task-number: QTBUG-94023
Change-Id: I6daafb25c79158dc7e777529abb5e8d3a284dac0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
It happens on Android Automotive emulator, that output file is in other
directory.
According android spec [1]:
"If a default user isn't specified, each adb subcommand has a different
user. The best practice is to retrieve the user ID with am
get-current-user and then explicitly use --user <userId> for any
command that supports it."
That is the reason why output file can be found in
/data/user/USER_ID/PACKAGE_NAME directory.
Checking path related to current user was added as backup solution.
[1]https://source.android.com/devices/tech/admin/multi-user-testing
Pick-to: 6.2
Change-Id: Id7e6ddef74f4f20b7469a07bba6a71d3622c4e20
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
We don't need the assembly file any more. According to a comment to
patchsets 2 in the Gerrit code review for commit
bb8a61866e, the section ended up as
SHT_PROGBITS instead of SHT_NOTE. I didn't know then that the section
type is not actually important, only whether it's present in the segment
pointed by a PT_NOTE is. That isn't recorded in the review.
Since we now depend on the linker properly placing the .note.* sections
for Qt plugins, we can rely on this working.
Change-Id: Icb2516126f674e7b8bb3fffd16ad659149e34a23
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This issue bit me. The API is surprising and very un-Qt-like...
Pick-to: 6.2
Change-Id: I2bbf422288924c198645fffd16aa1c58d921bd7e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This continues the effort from the previous commit, by not passing
through the JSON conversion at all, and simply using CBOR directly.
The port in qtbase is complete, but in order to support the conversion
in other modules without introducing breakages, there's a temporary
class used for converting to QPluginParsedMetaData from
QJsonObject. It'll be removed once all other modules have finished
converting.
Change-Id: I2de1b4dfacd443148279fffd16a3ed4ddaf34afc
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Since QJsonValue and QCborValue use the same backend, we may as well use
the CBOR frontend classes, which means we avoid an unnecessary
conversion until later.
Change-Id: I2de1b4dfacd443148279fffd16a3e2f56cd74c0b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This fixes the regression introduced in Android multiabi changes.
Amends 0a02d84555
Task-number: QTBUG-88841
Change-Id: I09e129361eb760cdc14c2302e821ce4fcbf117c3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The root event loop may have been exited, so we need to ensure the
event dispatcher is woken up so it can evaluate whether it should
continue or not. For most applications this happens automatically
when e.g. the user moves their mouse or press a key, but for tests
this may not be the case, and the test will stall and never exit
its event loop.
Pick-to: 6.2
Change-Id: Ic241e3f1045481c34150289ff711b921addb18e4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Instead of plumbing QWidgetWindow close events via handleCloseEvent,
we just implement closeEvent directly. This allows QWindow do save
the state of the window/widget before the close event, so that we
know whether we should trigger lastWindowClosed handling, even if
the window was deleted as a result of the close event.
This also relieves QGuiApplication and QApplication from dealing
with the close logic in their notify functions, so that these
functions can focus on the propagation of events -- not how the
event is handled.
Change-Id: I8b586b53a53b1df1d8630c1acb635c60f191bb4b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Amends 32edae5e26, which introduced a
timeout after which the restored state is discarded. If this timeout
hits during a CI run, then the test is expected to
fail.
Implement a lambda that watches for the restored state to disappear.
This happens primarily when restoring a fullscreen state, where some
desktop environments scroll in a new virtual desktop. It should not
happen for other data tags.
Change-Id: I5ff43a4e1857eca17a5d4fe2b47add1f70636e8d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
We were treating the input as if it was always reasonably good.
Since we know the max boundaries anyway lets just stop processing
when those are reached
Fixes: QTBUG-97489
Change-Id: Ibb78d6d51ad58454b2007ab46d54116ca0be5448
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Mention the platform-specific backends and add a section on packaging
Pick-to: 6.2
Fixes: QTBUG-97532
Change-Id: Ice78e32e81a719ccf237625e542d620662d3073e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Brings support for transportMedium to NetworkListManager
backend. Which, with this patch, also uses winrt API because
there is no equivalent API available in NLM.
This API is so much nicer than NLM...
Task-number: QTBUG-91023
Change-Id: I360a3a197caa2aa4848c8f768aea6a09a68b0ed5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
When declaring metatypes, the metatype system tries to detect if the
comparison operators for the given type exist and automatically register
them. In case of QHash, the equality operator was enabled if the value
type provides one. But the implementation needs equality operator of
the key type as well. As a result, when the key type has no equality
operator, the metatype system detects that the equality operator is
available for the QHash itself, but the compilation for metatype
registration fails when trying to instantiate the code that uses
equality operator for the key. This is fixed by enabling equality
operators for the QHash only when both the key and value types provide
one.
The same issue existed also for QMultiHash, with the difference, that
QMultiHash didn't have the constraints even on the value type. So added
checks for both.
Fixes: QTBUG-96256
Pick-to: 6.2
Change-Id: Ib8b6d365223f2b3515cbcb1843524cd6f867a6ac
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Most compilers are clever enough to optimize this out. Yet, even with
optimizations disabled, we don't want to do two TLS lookups here.
Change-Id: I822954c7cec591084d6c27c916818dab7e000ea9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Do the check for inBindingWrapper() last.
Change-Id: I3d589c9fba524f465e35cd4cc0e65e3af376b419
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Add additional template argument to QObjectCompatProperty to specify
a custom getter. This may be useful for classes like
QAbstractProxyModelPrivate the need to customize property getters.
Task-number: QTBUG-89655
Change-Id: I34fe4bdebbbf1446aff60bd20a946454607f52d5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
On macOs with APFS mkdir sets errno to EISDIR, so take the error code
into account.
Pick-to: 6.2
Fixes: QTBUG-97110
Change-Id: I8e7d10c95430a2802bdbfbf94dd65219bd9071a7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Commit ed48391c59 removed the check for
ERROR_ACCESS_DENIED reported by the Windows CreateDirectory(...)
function in case an existing windows drive name was passed as argument.
This restores the behavior of the function which broke after 5.15.
Pick-to: 6.2
Fixes: QTBUG-85997
Change-Id: Ie86188100766f7364acee57b15a250f4a2720b9f
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
- GHS's __PRETTY_FUNCTION__ (used by QT as Q_FUNC_INFO) doesn't have spaces
round the = operator when indicating the type of the template parameter.
The compilation error:
qt5/qtbase/src/corelib/kernel/qmetatype.h", line 2104: note #3316-D:
cannot access position 53 in array of 49 elements
constexpr const char *begin = func + prefix;
^
detected during:
instantiation of
"auto QtPrivate::typenameHelper<T>() [with T=void]" at
line 2186
Task-number: QTBUG-97087
Pick-to: 6.2
Change-Id: I33e61f5d54a61944a5aecf07d149a8dee0ef1e5d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Private Qt module dependencies of a Qt module are recorded
in the IMPORTED_LINK_DEPENDENT_LIBRARIES property of a Qt module.
This property is used to compute the runtime dependency dir path
to be passed to the linker via the -rpath-link option.
If the referenced target does not exist in the scope where it's
used, no -rpath-link will be generated (or at least that specific
dir path won't be passed).
The linking operation will either fail saying the library is not found,
or a different version of the library might be silently picked up in
the sysroot or other implicit lib dir.
Make sure that QtFooModuleDependencies.cmake calls find_package() for
all Qt module private dependencies (or other Qt provided 3rd party
libs in the Qt6:: namespace) so that the targets are in scope and
IMPORTED_LINK_DEPENDENT_LIBRARIES does its job.
qmake also records the INTERFACE_LINK_LIBRARIES of a private Qt module
as the runtime dependencies of the module.
It's not clear why it does that. A private Qt module is an
INTERFACE_LIBRARY so it shouldn't add any new runtime dependencies.
Nevertheless, the find_package part of that has been recently addressed
in 2b6500cd15 for a different reason.
This change is basically the CMake equivalent of
326b91ea78
Pick-to: 6.2
Fixes: QTBUG-86533
Change-Id: Iaf514a14acaded4e8752149cca0c159a271be188
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>
Caught by clang 13 detecting we set a variable but never used it.
Change-Id: I8c6a0ff3ec184205a544fffd16af3d52b6f172a2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
It was broken by fe4a5a27e0.
Pick-to: 6.2
Change-Id: I77da7ec9cdedc80a72b7f11980950a8bebfdaf3b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Found by clang 13:
qfontsubset.cpp:1211:10: warning: variable 'sumAdvances' set but not used [-Wunused-but-set-variable]
Change-Id: Iea05060bc2c046928536fffd16adf500fb9bc8e5
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
No point otherwise. But do it before trying to select the database, in
case the database name has non-US-ASCII characters.
Task-number: QTBUG-97054
Pick-to: 6.2 6.2.1
Change-Id: Iea05060bc2c046928536fffd16adf036367b07bb
Reviewed-by: Liang Qi <liang.qi@qt.io>
It returns zero on success and non-zero on failure.
Fixes: QTBUG-97054
Pick-to: 6.2 6.2.1
Change-Id: Iea05060bc2c046928536fffd16adf0177aadb082
Reviewed-by: Liang Qi <liang.qi@qt.io>
The backed expect the pipeline to be valid, so document it and
assert if the set pipeline is a null pointer.
Pick-to: 6.2
Change-Id: I72b3d0d11b8dc98240d17e13adf2b6ccbd71891d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
It's not intended to be copied or moved and static analysis complains.
Change-Id: I2ac2eccadb66ea572cf297f16af693b15553a1b9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
If widget parent has graphics effect, it can't render directly to the
backing store, because the backing store needs to be updated from the
parents effect drawing instead of the widget drawing.
Pick-to: 6.2 5.15
Fixes: QTBUG-96240
Change-Id: Ib9b55547f9e5538f32837ec9df45d29fa68d7c1b
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
With clang 13:
vk_mem_alloc.h:4360:22: warning: definition of implicit copy constructor for 'VmaStlAllocator<VmaDefragmentationAlgorithm::AllocationInfo>' is deprecated because it has a user-declared copy assignment operator [-Wdeprecated-copy]
vk_mem_alloc.h:4391:9: note: in implicit copy constructor for 'VmaStlAllocator<VmaDefragmentationAlgorithm::AllocationInfo>' first required here
Repeats ad nauseam
Change-Id: Iea05060bc2c046928536fffd16adf5181ede7abe
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
For MSVC it's clear that the plugin and Qt must match, since they would
be linking to different runtime assemblies otherwise. For all other
systems, including MinGW on Windows, there's no such thing.
But we insist on MinGW debug-and-release builds matching.
Change-Id: I3eb1bd30e0124f89a052fffd16a6aa52c7f8b9c0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This is necessary to optimize QObjectCompatProperty::notify in a second
step.
Change-Id: I89aaf51d39e04f17285f7db27f9b40d145fd846d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The designer animation driver needs the ability to drive the animation
both forwards and backwards.
Pick-to: 6.2 6.2.1
Task-number: QDS-4910
Change-Id: Ie2b1855d062bb254b28b216328cb618d90ee8454
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
QWidget will call close() in its destructor, which we might end up
in if a user deletes the widget in the closeEvent.
Pick-to: 6.2
Change-Id: I39684aec0ca130033dad60f2bbf823364a5edcec
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This corresponds to Unicode version 14.0.0.
Added the following scripts:
* CyproMinoan
* OldUyghur
* Tangsa
* Toto
* Vithkuqi
Full support of these scripts requires harfbuzz version 3.0.0,
this version adds support for Unicode 14.0:
https://github.com/harfbuzz/harfbuzz/releases/tag/3.0.0
With this release 10 test cases in tst_qurluts46 were fixed, one
additional test case is failing in tst_qtextboundaryfinder and
is commented out. In total 62 line break test cases and 44 word
break test cases are failing.
A comment in src/corelib/text/qt_attribution.json was updated to
include the URL of the page containing UCD version number.
Fixes: QTBUG-94359
Change-Id: Iefc9ff13f3df279f91cbdb1246d56f75b20ecb35
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
A single configuration provides qdoc and qtattributionsscanner via
provisioning. The environment variables instruct QDoc to run in
testing mode; it ignores linking warnings (since we don't have .index
files for external documentation modules) and terminates with non-zero
exit code if documentation warnings exceed the limit set in the
documentation config.
The provisioned binaries are portable, packaged together with their
dependencies. As they are installed under /opt, the instructions
create symlinks to the binaries in the install directory before
building the 'generate_docs' target.
Pick-to: 6.2
Task-number: QTBUG-78069
Fixes: QTBUG-95554
Change-Id: I4a4765250247e2fc6eddd153c36cf8126ddd10ae
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
If we don't have a binding, we don't need to remove it. We can figure
this out without TLS lookup.
Pick-to: 6.2
Change-Id: I0cb20f2a68a119df7742631e307002e3813eac03
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
If there is no binding data, we don't need it. inBindingWrapper()
involves a TLS lookup.
Pick-to: 6.2
Change-Id: I829f314d708b80821e907124eef4aec758bbbc6a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
When a dialog was accepted or rejected via done(), we used to only hide
it, but as of 0246bfd40a we now close it.
Closing a widget results in hiding it as part of handleClose, so we
do not need to explicitly hide it before calling close(). In fact
doing so prevents the lastWindowClosed logic from checking whether
the window was visible before handling the close event, which is
documented to be a requirement for a window triggering lastWindowClosed.
We still need to hide the widget in case we don't end up closing it
ourselves, to ensure QDialog::closeEvent accepts the close. The reason
for the code in closeEvent seems a bit dubious, but that's left for
future adventures.
Change-Id: Ic32b965d495c08996c3a199bbee798df0206216c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
In a512e210ac5b032c5fc2edf1ddf72e5a414485fda512e21 quitOnLastWindowClosed
was changed to be implemented in terms of quitLockEnabled, but without
any documentation to that end.
Although the two features are similar (automatic quit under certain
conditions), and interact, it doesn't make sense to overlap them until
we actually expose them as a single property (automaticQuit e.g.)
The logic for determining whether we can can quit automatically has
been refactored to take both properties into account, on both a Core
and Gui level. The call sites still need to check the individual
properties to determine whether to activate automatic quit for
that particular code path.
Change-Id: I38c3e8cb30db373ea73dd45f150e5048c0db2f4d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Because of the constraints on comparison, debug and data stream
operators, the return types for them look weird in docs. Conditionally
use the actual return types, in case if Q_CLANG_QDOC is defined.
Also add the docs of debug stream operators for types for which they
were misssing.
Task-number: QTBUG-97247
Pick-to: 6.2
Change-Id: I57f2c52bd3af805c7eeebb602c47de1e95ee09bd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>