Commit Graph

30489 Commits

Author SHA1 Message Date
Kai Köhne 222a5601a9 Examples: Use versioned CMake targets for Qt modules
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)
2023-05-03 12:32:40 +02:00
Mitch Curtis 76372d0d0b Doc: explain how to handle currentIndex changes in TabBar and SwipeView
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>
2023-05-03 04:10:26 +00:00
Mitch Curtis 40d39636af Material: fix placeholder text alignment
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>
2023-05-03 02:08:58 +00:00
Safiyyah Moosa a58c40af8f Docs: Fix "Can't link to" example warnings
Task-number: QTBUG-113160
Change-Id: I49de891c36d778df5d2727f2f0703d534421e2d5
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit 961d11e55f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-05-02 19:29:16 +00:00
Mitch Curtis 53c0eed980 QQuickIndicatorButton: fix listeners being called after destruction
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>
2023-05-02 15:40:00 +00:00
Mitch Curtis 32d78022ab PageIndicator: fix change listeners being called after destruction
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>
2023-05-02 15:40:00 +00:00
Mårten Nordheim eb63a0bfb0 Drop extra resizing of upload pools
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>
2023-05-02 15:40:00 +00:00
Olivier De Cannière 60da75b6ac Examples: Replace broken link to Qt logo in networkaccessmanagerfactory
Change-Id: Idda2d0e70049873622e43baea2fbcf80f4b5723c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 8db22d191f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-05-02 15:40:00 +00:00
Mitch Curtis 06c8d07c89 Menu: fix change listeners being called after destruction
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>
2023-05-02 15:40:00 +00:00
Richard Moe Gustavsen 9418f2d1e1 QQuickFlickable: avoid processing the same event twice
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>
2023-05-02 15:39:59 +00:00
Olivier De Cannière d04c8f4563 cmake: Fix config for the networkaccessmanagerfactory manual example
Amends: d023d149d9

Change-Id: I54adf85c1ff7da2d6cc1aa13b9c9c5e1a334c1d8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit c1983b446b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-05-02 15:39:59 +00:00
Doris Verria 322c4c4afe RangeSlider: Don't update position only if mouse/touch is grabbed
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>
2023-05-02 15:39:59 +00:00
Mårten Nordheim b86fd0e36a Really release pool resources in Renderer::releaseCachedResources
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>
2023-05-02 15:39:59 +00:00
Fabian Kosmale cc9ae5820b QML metatypes: Adjust to QMetaType revision increment
Task-number: QTBUG-113227
Change-Id: Icd2ca482ef8656d544c7c560ca05b9dd222f9c0a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 71541af735)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-05-02 07:08:35 +00:00
Qt Submodule Update Bot c46f959e47 Update dependencies on '6.5' in qt/qtdeclarative
Change-Id: I2156567a40b68291c2ef4c1909a33a311ff41cb4
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2023-05-02 04:12:23 +00:00
Qt Submodule Update Bot b2e146691a Update dependencies on '6.5' in qt/qtdeclarative
Change-Id: I0510d6d0cbd73512fa8e13f018d788b8ead86bb8
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2023-05-01 04:15:00 +00:00
Mitch Curtis c80953e21f BusyIndicator: stop animation when not visible
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>
2023-05-01 02:17:18 +00:00
Seokha Ko 25169a444d Flickable: Send movement signal when flick starts
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>
2023-04-29 14:38:59 +00:00
Olivier De Cannière 2d26b07ff6 QV4: Fix formatting options for the search component of UrlObject
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>
2023-04-28 14:55:44 +00:00
Alexey Edelev ed88eab0b2 Add the use of the qt_internal_project_setup function
The function sets the required CMake variables and policies.

Task-number: QTBUG-112685
Change-Id: Idae8f19eca28bac764480130dc679df1c1273598
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit bb8163a533)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-04-28 14:52:16 +00:00
Seokha Ko ead4f545ed Blacklist failing tests in tst_flickableinterop
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>
2023-04-28 08:25:46 +00:00
Qt Submodule Update Bot c6b214d55b Update dependencies on '6.5' in qt/qtdeclarative
Change-Id: I92d82d40cae0b70486aa9d964a245da8f8cba739
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2023-04-28 08:25:46 +00:00
Volker Hilsheimer 6f01b5663c Make the colorresolving benchmark also a benchmark for cmake
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>
2023-04-28 05:44:24 +00:00
Fabian Kosmale ed77612821 QQmlData: Implement markAsDeleted without recursion
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>
2023-04-28 05:41:48 +00:00
Tim Jenßen c8e5e21edd qmlpreview: fix crash on exit
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>
2023-04-28 05:24:55 +00:00
Jan Arve Sæther 466e17a9ae Fix StackLayout to keep the current visible item after insert/removal
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>
2023-04-26 13:38:41 +00:00
Antti Määttä 680ddb8b4e Trace: Convert qtdeclarative to use new tracepoint generation
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>
2023-04-26 16:38:41 +03:00
Qt Submodule Update Bot c241296bc7 Update dependencies on '6.5' in qt/qtdeclarative
Change-Id: I9a76277af35da37de11f71d6b3f9d79b6f618b5c
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2023-04-26 10:45:00 +00:00
Matthias Rauter 8fddd2a85e Change hierarchy level of MouseFeedbackSprite in pointerhandler example
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>
2023-04-26 10:45:00 +00:00
Matthias Rauter 3591fe2456 Fix button handling in MouseFeedbackSprite of pointerhandler example
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>
2023-04-26 10:45:00 +00:00
Matthias Rauter 7e86b72c5f Remove reference to QQuickPointerScrollEvent in documentation
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>
2023-04-26 10:45:00 +00:00
Edward Welbourne 4c4a84bfb3 XHR WebDAV test: don't expect more than Keep-Alive in Connection: header
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>
2023-04-26 00:49:54 +00:00
Jan Arve Sæther 8d08d0d4e9 Fix StackLayout to react to reordering siblings
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>
2023-04-25 17:39:13 +00:00
Jan Arve Sæther ef8b5344e7 Avoid rebuilding the layout before the component is complete
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>
2023-04-25 17:39:12 +00:00
David Edmundson 79874d568c qquickwindow: Clear hover when a window is hidden
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>
2023-04-25 17:39:10 +00:00
Oliver Eftevaag 33beb3ff2a Particle system example: qmllint and qsTr()
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>
2023-04-25 17:39:09 +00:00
Topi Reinio ee35560dac Doc: Exclude licensing header when including a .qdocinc
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>
2023-04-25 17:39:07 +00:00
Andreas Eliasson 1e407d1bb3 Doc: Specify that class name must be fully qualified
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>
2023-04-25 09:48:29 +00:00
Leena Miettinen 2bba2f7dc6 Doc: Fix typo in QT_QMLLINTER_TARGETS_FOLDER CMake QML property name
Task-number: QTBUG-113116
Change-Id: I8d2c1c2e8e96b365b4bd2e6c9a321cdf1824272b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 86937f9313)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-04-25 09:48:29 +00:00
Amir Masoud Abdol 2a31b22143 Refactor the usage of icutils::Node
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>
2023-04-25 05:39:10 +00:00
Sami Shalayel 398926db49 QQuickItem: item stays pressed after DoubleClicks
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>
2023-04-24 07:11:28 +00:00
Volker Hilsheimer 62e265b190 Popup: Document how to scale a popup
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>
2023-04-22 20:27:13 +00:00
Volker Hilsheimer ea28fc656e MenuBar: Clean up and stabilize test case
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>
2023-04-22 06:44:42 +00:00
Volker Hilsheimer d204cebca4 Accessibility: respect value in attached Accessible in controls
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>
2023-04-22 06:44:31 +00:00
Thiago Macieira 224eb8e3af ACTION_IF: suppress GCC 13 warning about leaked dangling pointer
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>
2023-04-21 14:08:48 +00:00
Fabian Kosmale 8fae0aa4ae QQuickItemView: Skip instantiating delegates if size is 0
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>
2023-04-20 10:17:07 +00:00
Sze Howe Koh a21353e99b Doc: Re-phrase descriptions around read-only properties
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>
2023-04-20 10:17:06 +00:00
Eskil Abrahamsen Blomfeldt aa7644934f doc: Expand module docs for Qt Quick Shapes
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>
2023-04-20 07:45:58 +00:00
Qt Submodule Update Bot be518d69cd Update dependencies on '6.5' in qt/qtdeclarative
Change-Id: Ifce12b55dafc604d2e2631f53416ac6629a219a7
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2023-04-20 05:24:50 +00:00
Oliver Eftevaag 0fee516d99 Remove qmllint warnings in particle emitters example
Change-Id: Ibdf9bb196454bcfa4c46d237aa69928d3bc9a7a4
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit 8b856a7d08)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2023-04-19 20:05:52 +00:00