Use e.g. Qt6::Core instead of Qt::Core. This is better matching the
find_package(Qt6 ...) call, and also avoids issues that the versionless
targets have.
Task-number: QTBUG-113277
Change-Id: Ib80f885e9f73fb9ad54b9e9b22cae2318877dc07
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 2e6403f8bf)
Add a snippet and link to property change signal handlers to explain
the concept, since that page is hard to find unless you know where to
look.
Change-Id: Id4019076d55199a9cafe4acdced1a7efc64bb3f2
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit 7e745bbba2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The placeholder text should always be aligned to the left
according to my tests on native Android via an emulator.
Fixes: QTBUG-113172
Change-Id: I75ae31e1e6b9846d90ab5034c43f8684698e0ab7
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit 4ab11d03ac)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove the listeners of the indicator upon the button's destruction.
Task-number: QTBUG-98790
Change-Id: I76509ebec601b8f6d004c90cdfbda46e390463a3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 9829dbd77d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove the listeners of the contentItem upon the PageIndicator's
destruction.
Task-number: QTBUG-98790
Change-Id: Ic03a0ea149806de524567b4115255e308df90105
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 098231ae31)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It already happens as part of Renderer::map. So, if we set size = 0
before we call uploadBatch then it will implicitly set the size needed.
One of the loops was also grabbing the sizes before the final size
was determined.
Change-Id: I610d9850a66011c3d17eea131c063c42fe149962
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit 6f06068db8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove the listeners of the contentItem upon the Menu's destruction.
Task-number: QTBUG-98790
Change-Id: Ic1aa842f003c9ced40e88b195021d085e86540eb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 7481dff314)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If Flickable has an exclusive grab (e.g if it's being dragged), and
at the same time, a child has a passive grab (e.g a TapHandler inside
a child of the content item), Flickable ends up getting the same pointer
events twice.
The reason this happens is because Flickable has a childMouseEventFilter.
So the flickable will first get all the pointer events since it has an
exclusive grab, just to see that the filter will receive the same
events once more, as they next are delivered to the passive grabbers.
The result is that Flickable will handle all pointer events
(move, release etc) twice when it has en exclusive grab, which will
even cause the flickable from stop flicking prematurely if the mouse
release ends up outside the bounds of the flickable (because of a double
call to handleReleaseEvent(), which will set stealMouse to false too
early).
To fix this, this patch will make sure that we don't handle any pointer
events in the childMouseEventFilter if we already have an exclusive grab.
After all, having an exclusive grab means that we're already getting the
events the "normal" way, and shouldn't handle the same events once more.
Fixes: QTBUG-104987
Change-Id: Iaed49cb860cf50ea38a70a6e546d9dcf25cce444
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit 1bac9de113)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
A mouseClick will cause the RangeSlider handle to move to the click
position and we should expect the same for a touch press.
We update the position of the handle in handleRelease if keepMouse/
TouchGrab is set to true. However, we don't grab the touch on a
touch press in case eg.: a flickable wants to steal the event.
So we can remove the check as we shouldn't update the position
only if grabbed. This makes the behavior similar to the slider
too.
Fixes: QTBUG-112945
Change-Id: Id2cf99416a52b5e42989a4adda1532e3ac550a93
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit f6fb9252c6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
resize(0) only sets the size and doesn't deallocate anything.
Conversely, shrink(0), which was used before it was changed
to resize(0) doesn't change the size and only deallocates.
Use a mix of both for now.
Change-Id: I3e36a766ef7483158a5a300351b0d7864d24e184
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit e061d654ea)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This prevents unnecessary CPU and GPU usage with the iOS and Fusion
styles.
It's not currently possible to test this without adding objectNames to
each animation, which relies on us remembering to do so. Even then, not
all styles use QML animations in their BusyIndicator implementations -
some use e.g. QQuickAnimatedNode). Also, there is no QML API to find
QObject children of a given type (animations) - I've created
QTBUG-113264 to propose such an API.
Task-number: QTBUG-50161
Change-Id: Ieafb5f2f1a9703d4dc26e4f934dbcc86e2709445
Reviewed-by: Doris Verria <doris.verria@qt.io>
(cherry picked from commit 8efa148293)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If there are multiple moves between touch down and release,
but they are merged, or if there is only one move,
flick occurs but no movement signal is generated.
So, send movementStarted if the view is moving in
handleReleaseEvent
Fixes: QTBUG-112924
Change-Id: I774799bac2a00296a72005dcfa9ade6683836d08
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit e6a363efe8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This fix changes the way the search component of UrlObjects is formatted
by passing the correct options to QUrl::query. Namely, the
EncodeDelimiters flag is no longer set. This now allows for correct
encoding of backslashes in search strings.
Amends 6cca731f3e.
Task-number: QTBUG-111014
Change-Id: Iee544dfc7ad6ba374601c8ec4690d11bf07c9b6a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit af4cd4763a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
pinchHandlerOnFlickable fail with QTBUG-112924.
Blacklist it for now.
It will be handled in QTBUG-113226
Fixes: QTBUG-113226
Fixes: QTBUG-112924
Change-Id: I58c646f957fb6f397405dc477d00eee770602e80
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit 407675b191)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Using qt_internal_add_test for a benchmark gives it a _check target, not
a _benchmark target. Use qt_internal_add_benchmark instead, link against
QuickTest, and set the QUICK_TEST_SOURCE_DIR variable explicitly.
Change-Id: Id72f2623b7edaa538ef3ff2cb3f505506652ee5a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 741b5c6b51)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
While a normal QML scene should not feature extremely deep object trees,
one can still encounter them in some test cases.
Those test cases might then run out of (C++) stack space with the
previous recursive version of markAsDeleted.
Thus, we change the implementation to use an explicit workqueue instead
of relying on recursion. This changes the visitation order, but code is
not supposed to rely on the order of Component.onDestroyed calls anyway
(and we keep at least the order in so far that the parent emits the
"signal" before it's children.
Change-Id: I93b30cc26b984d1a21cff92df1dd68cd45e67477
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 0a333bc7e5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
saveWindowPosition() uses QSettings which uses
the special file engine, which does not exist
at destructor time anymore.
This resulted in a crash.
QQmlPreviewPosition idea is that saveWindowPosition()
is called when there was a move event.
Also saving it at the constructor was just a nice to
have.
Change-Id: I650176691acf8ad1ef9ae46b76f61dafee82a56d
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit db01d4ef5a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If an item is inserted or deleted at an index less than or equal to the
current index, StackLayout.currentIndex will be updated in order to
reflect which is the current visible item. This is consistent with
QStackedLayout, QStackedWidget and TabBar
[ChangeLog][QtQuick][Layouts] StackLayout will now update currentIndex
if an Item is inserted or removed at an index less than or equal to the
current index.
Task-number: QTBUG-112691
Change-Id: Id1d687e309c8f199a4f68698b53ca7c169f17dcd
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit adc3d8b2e4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Change-Id: Ieacfa716b657ac221a75cd5a0dd75d5099962e91
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
(cherry picked from commit e362381e59)
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Hover events are no longer propagated to siblings when they have been
accepted by an item, at least for the time being. This patch changes
the hierarchy such that it works either way.
Fixes: QTBUG-111322
Change-Id: Ied953a423954342c02e613af618be0784d6397ee
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3b12b19847)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
HoverHandler does not react to button presses. Images to indicate button
presses are loaded but never shown because of this. This patch adds an
additional PointHandler which reacts to button presses.
Change-Id: I60c1daef5144d7431605b0dc7dbedc0723a17fe0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 30c3a65b7b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It does not exist in Qt6 and was apparently replaced by WheelEvent.
Change-Id: I6b833e664d8e5e5d6e2bd23ed90695d43073decd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 8d902def13)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Only one XHR test expects Keep-Alive, Upgrade, HTTP2-Settings as the
Connection: header, which fails when I run it locally, and I can see
no reason why that test [0] would expect it, where all the others just
give "Keep-Alive{{Ignore}}" (or "close") in their .expect files, so do
the same for [0] as well.
[0] sendPropfind:Send PROPFIND "allprop" request for collection.
Change-Id: I09cafcf282861b87693b5782f34e2fb84c888ff1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 0ca564ed40)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When siblings in a StackLayout are reordered, we need to react, since
the sibling order corresponds to the "stack order"
Fixes: QTBUG-112691
Change-Id: Ie768af34bf5ee9d15ca67d61a64115f3df31990f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit a0fb254915)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
isReady() will only return true *after* componentComplete() and *before*
destruction is about to happen
There is no point in rebuilding the layout when an item is added or
removed before the component is ready, because there will be a full
layout rebuild as soon as the component is completed.
This is a preparation for fixing QTBUG-112691
Change-Id: I6e19578d847c6d4518479bc00f21442333e0fb07
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit b9524e4e8d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This fixes a bug in the following sequence:
- user opens a window
- the window is hidden whilst under the mouse
- later the window is reopened without the mouse being under the window
- with the lastMousePosition set an item underneath where the mouse
used to be gets activated.
On X11 we get a Leave event for the hidden window, this is not true for
wayland.
Change-Id: Ib14e8dbe29f1ad9a71a488b671d226be1d017b8d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 40889ffe52)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
User facing strings are being translated, and all qmllint warnings are
gone. JavaScript statments no longer end with semi-colon, and some
whitespace changes have been made.
Change-Id: I2a6792800ef3b8a0dc596632dcd3b7d76aa08fe3
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit b65c0ce133)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The \include command includes the source in its entirety when the
second parameter is omitted. This pulled in also the license header
which was visible in the generated documentation.
Add snippet tags and use them to extract only the content we need.
Task-number: QTBUG-113138
Change-Id: Ie3fe2fede1e81d08201ec4353352ef069aebc388
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
(cherry picked from commit d664cb4845)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
To avoid confusion, all macros that take a class name as an argument should specify that the class name needs to be fully qualified, even
if you're already inside the namespace.
Fixes: QTBUG-110718
Change-Id: Icaed4be5df44e8d35ef382a918246ed03b0bb0c5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 4f465236f2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In Unity Build, on OpenSUSE, for some reason compiler confuses
the Node with an `int`. This refactoring resolves the issue by moving
the type into the `icutils` namespace.
Task-number: QTBUG-109394
Change-Id: Id379b9aff21b29115d4503791debd658f034a0cd
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit c838419824)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends 72651a50f8.
This commit decided to ignore double clicks in the virtual
QQuickItem::mouseDoubleClickEvent().
If a subclass inheriting from QQuickItem wants to not ignore
a double click, it should override mouseDoubleClickEvent()
and handle the double click event accordingly.
Fix QQuickMouseArea::mouseDoubleClickEvent(QMouseEvent *event) to *not*
call the base implementation in QQuickItem after handling a double
click, because QQuickItem sets that double-click MouseEvent back to
the ignored state.
This was leading to weird behavior on platforms with touch
screens like Android or IOS where buttons "got stuck" after
a double click.
Fixes: QTBUG-112434
Fixes: QTBUG-109393
Change-Id: I774189fbcb356b07336f35f053e05a12c34ce602
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit d7fac6923a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add a code snippet, as Item::transform is not a notifying property
so the Scale item has to be instantiated and bound to separately.
Fixes: QTBUG-70939
Change-Id: Ie0ca672dc65f5a44fa2ac2c3f3ee897a6d663d80
Reviewed-by: Matthias Rauter <matthias.rauter@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit e4a2a999ae)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The test case fails frequently and flakily locally with the Material
style, because the exit transition of the static menu interferes with
the opening of the dynamic menu. Wait for the static menu to be
completely done with the exit transition before continuing.
As a drive-by, replace all QCOMPARE(actual, true/false) patterns with
QVERIFY.
Task-number: QTBUG-104323
Change-Id: Ide90f0094b05d628a0eb047248a72c35bcb7cdc3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
(cherry picked from commit c39f407a5a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QQuickItemPrivate::accessibleRole is virtual and called by the framework
to determine the role of an item. The default implementation checks and
respects a possible Accessible attached object. However, subclasses that
override the virtual don't, so the attached properties are ignored, and
the class-specific implementation wins. This makes it impossible to
change the role of e.g. a checkable button.
To fix that, move the code respecting the attached object into a non-
virtual function that the framework calls instead, and only call the
virtual member if there is no attached object, or if that object is not
initialized with a role. Replace calls to the virtual from the
framework with calls to the non-virtual wrapper.
Do this for both QQuickItem and for QQuickPopup, and adjust the logic
in QQuickControl types that create an attached object and initialize
it's role when accessibility becomes active. Use the non-overridable
effective role value for that as well.
Add a test case, and to avoid any new framework calls to the virtual,
make it private.
Fixes: QTBUG-110114
Change-Id: Ia709cecbd181b6d8ee3297a4af60c1e7db9a2c51
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit 3c08d08ae2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
GCC 13 says:
In member function ‘void QAbstractAnimationJob::setState(State)’,
inlined from ‘void QAbstractAnimationJob::setState(State)’ at animations/qabstractanimationjob.cpp:295:6,
inlined from ‘void QAbstractAnimationJob::complete()’ at animations/qabstractanimationjob.cpp:528:13:
animations/qanimationjobutil_p.h:41:39: error: storing the address of local variable ‘wasDeleted’ in ‘*this.QAbstractAnimationJob::m_selfDeletable.SelfDeletable::m_wasDeleted’ [-Werror=dangling-pointer=]
This warning is produced when the action is "return" (used by the
RETURN_IF_DELETED macro) because we'd leave m_wasDeleted with the
dangling pointer. However, it's not really dangling because it was
deleted, but GCC doesn't know that.
Change-Id: I3b169860d8bd41e9be6bfffd1757115520a67972
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 7c33b6e957)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If the area of a (List|Grid)View is 0, then instantiating delegates is
pointless, as they couldn't be shown anyway. However, our current logic
could not handle this case well, and would end up instantiating a
delegate for every delegate entry if their size also ended up being 0 -
you can after all fit infinitely many 0 sized items into a zero sized
container.
Detect this situation in QQuickItemViewPrivate::refill and the
applyInsertionChange implementations. Note that we only exit early if
there are no visible items and the view is zero-sized; if there are
visible items, we still want to ensure that they are removed after all.
We also need to adjust a few tests which had zero sized views to no
longer be zero sized; otherwise they wouldn't have created their
delegates in time.
[ChangeLog][QtQuick][ListView][Important Behavior Change] If a ListView
has size zero, it won't instantiate any delegates until its size becomes
non-zero.
Fixes: QTBUG-110625
Fixes: QTBUG-89568
Fixes: QTBUG-51773
Change-Id: Ibe0e6fa5f01784016882522c120d2fee38df285b
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 37c25c6e74)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The current text sounds a bit like it's describing a const value.
Change-Id: Idf9b8ae14ce032af7ac073419aba6250b26f5847
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit db04cfb2d0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Give an overview of the module and some handy links and tips. This
also adds a note on how to get anti-aliasing with the shapes, as well
as a link to PathText as one of the supported element types.
Fixes: QTBUG-106529
Task-number: QTBUG-112463
Change-Id: I137d25e2ca138454f913e92158d9286977457227
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit ee017bd9cf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>