| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The bug was that a MouseArea could be stuck in pressed state if a touch tap
occurred simultaneously on a second MouseArea while the first was held
pressed by the actual mouse.
QQuickWindowPrivate::setMouseGrabber(QQuickItem *) had too little
information to make the right choice in case the given item argument is
null. It should not mean ungrab everything: in this use case, the mouse and
the touchpoint can be pressing two different MouseAreas, and releasing
either one should ungrab only the MouseArea that is being released.
However the only place it was called with nullptr was in removeGrabber(),
and in that context we are given all the information: which item to ungrab
and whether we want to ungrab mouse, touch or both. It's better to have
a little code duplication between QQuickItem::grabMouse() and
QQuickWindowPrivate::removeGrabber() than to lose this information
about which device(s) and Item to ungrab.
Task-number: QTBUG-64249
Change-Id: I0710534a05f3ceeb66105a03ab0f32a61df8a522
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
synchronously
The current implementation created new items with default incubation mode, which
is AsynchronousIfNested. But from reading the code, it seems like changes to the
model were really expected to be handled synchronously, since there aren't any
sections in the code that will recover from situations were requested items ends
up incubating async. This is also backed by the fact that the second argument
used to be a bool set to 'synchronous'. The fact that this was translated to
AsynchronousIfNested later down the chain didn't seems to be taken into account.
A bug with this is found in ListView when it's embedded inside an async Loader.
In that case, all list items will be incubating async at startup, which is normally
expected and fine. But if the model assigned to the ListView is modified before the
loader has finished, async loading will also happen to the items created because of
the change. And then the situation described above will occur.
This patch will force any items loaded because of a model change to be synchronous.
This seems to be in line with the synchronous logic that already exists. And its
also quite acceptable, since changing the model before everything is completed is
a corner case, and can naturally lead to some stuttering in the list view anyway.
A potential for improvement on this logic is to try to recover whenever creating an
item fails. But this takes a lot of work because of the way model changes are
structured and stored, and can easily cause regressions. Since this is a corner
case, it is probably not worth it.
[ChangeLog][QtQml][ListView] Fixed a bug in ListView that sometimes make items
end up with wrong geometry when changes to its model happens while the ListView
is being loaded async (e.g if wrapped inside an async Loader).
Task-number: QTBUG-61537
Change-Id: I8d6857beaf8ef98b02bb46282a1312749b0fb801
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'requestedIndex'
We used to assign the currently incubating item to 'requestedIndex' based
on requested incubation mode alone. This is not sufficient, as the item
can also be loaded async when the mode is AsyncIfNested. To check if the
item is really loading async (and that we're not getting nullptr because
of some other failure), we need to ask the incubator.
Task-number: QTBUG-61537
Change-Id: Id1f458db4a7584a6b58d5bad0e7832ce4fc341dc
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
specify incubation mode
The current implementation would pass a boolean to signal if asynchronous
or synchronous incubation should be used to create an item. The problem with this approach
is that passing 'synchronous" would translate to QQmlIncubation::AsynchronousIfNested
later down the chain. This meant that even if the caller requested synchronous incubation, it
could end up with asynchronous incubation anyway, e.g if an async parent incubator was active at
the time of the call. And this can easily come as an unhandled supprise for the caller, and as
such, cause unforseen bugs.
This patch is a first of a set of patches that is done to fix the bug reported in the task below.
It will not change any behavior, it is written to preserve the logic exactly as it were, just
as a preparation for subsequent patches. It makes it explicit at the call location what
incubation mode will be used, and especially make it clear whenever the AsynchronousIfNested
flag is in play.
Task-number: QTBUG-61537
Change-Id: I8b3ba5438ebb2cd59983a098bd8ceeeb844da87b
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a ListView with pressDelay contains a MouseArea in a delegate, and
you tap the MouseArea on a touchscreen,
QQuickFlickablePrivate::replayDelayedPress() sends a saved copy of the
original QMouseEvent, and then a synthetic release, without marking it
as synthetic. (QQuickFlickable is not touch-aware in any way: it
thinks the mouse events it receives are real ones.) As a result of
sending the delayed press through, QQuickWindowPrivate::setMouseGrabber()
is called and sets the touchpoint's grabber to the MouseArea, but
does not set the core pointer's eventpoint's grabber.
Flickable then ungrabs for itself, so we have to ensure that the
ungrab affects either the actual mouse or the synth-mouse, whichever
was in use. Then because the synthetic release is not known to come
from a touchscreen, QQuickWindowPrivate::deliverMouseEvent() was
checking the core pointer's grabber and concluding that there is no
grabber. In such a case, it now checks whether touchMouseId is set,
meaning that we are somewhere between sending a synthesized press and
release, gets the touchpoint's grabber (which is MouseArea, because it
didn't reject the press), and sends the release there.
Task-number: QTBUG-61144
Change-Id: I494873e48af179bc63b618e881ba469b97dadf4d
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In complicated cases where the model moves rows around while
the view is running slow (perhaps during high CPU load),
there were cases when Repeater would call
movedItem->stackBefore(deleteableItem), but deleteable items
can be null, so there was often an error
QQuickItem::stackBefore: Cannot stack before 0x0, which must be a sibling
and occasionally a crash. Now we check both the callee and the
parameter to stackBefore to make sure neither of them are null.
Task-number: QTBUG-54859
Change-Id: I45a8b2939c16b9bbe3a802ddd348dc55f51061a7
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|\
| |
| |
| | |
refs/staging/5.9
|
| |\
| | |
| | |
| | | |
Change-Id: Ic6457df47bed359fd43653e73726f1896944241c
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Task-number: QTBUG-64562
Change-Id: I52e07b0d8b7a5d1cc960431dcbd1a90dd3e7e518
Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The previous fix for nested clip regions introduced a regression which
broke nested clipping cases that involved one of the clip nodes being
null regions because they were offscreen.
The clip region stack can either have an null QRegion or be empty as an
initial state (depends on what is being rendered). We made a special
check for these two states, but it is not enough to check if the top
item is null for the null region case beacuse at any point in time a
null clip region node could have been added. So to fix this the null
initial state also requires a count of 1.
Task-number: QTBUG-63743
Change-Id: Ib0d17026f1d5a663e819412e11d25d9ad8b445ff
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
if the scene is rendered by a QQuickRenderControl and we have a different
target window (for instance QQuickWidget) we check the target window of
the render control instead of the own window, this fixes window keyboard
shortcuts for QQuickWidget
Task-number: QTBUG-64548
Change-Id: I7614be580f2a707c752189e4c9b53a5d5f0159d7
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Documentation has been missing since the beginning.
Making it an uncreatable type provides the opportunity to associate
the C++ type with the QML type so that the latter can be used in the
QML documentation, as opposed to simply registering the C++ type
with no QML name as was done before.
Task-number: QTBUG-47290
Task-number: QTBUG-63143
Change-Id: Ib82cc7b27c9591eaf2c7997d2781a2b4246cfbff
Reviewed-by: Michael Brasser <michael.brasser@live.com>
|
| |
| |
| |
| |
| | |
Change-Id: I89b36ee7d03ac6b8d07b24c656d3311728e8f9c3
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The expected signal counts were not matching. Since the test has not
been run in the CI, it went unnoticed. Furthermore, the test crashed
due to a missing null pointer check.
Change-Id: Iff80a2ea17832eb7bc531ac9eb2fc482f2c69e38
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
| |
It's such a common mistake to observe that they normally go to zero at
the top-left corner, but fail to realize that they won't always do that.
Task-number: QTBUG-64219
Task-number: QTBUG-22894
Task-number: QTBUG-27884
Change-Id: I6bc81d4761debdaff8fb3366bf1e944241207157
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
|
|
|
|
| |
Sticky headers and footers weren't accounted for when calculating new
view position causing the requested item to be left behind them.
Task-number: QTBUG-63974
Change-Id: Id69579643a942e8558960b2c8b0fee980fa86947
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pointer event instances are QObject-children of QQuickWindow, meaning
that they remain alive after ~QQuickWindow(), until execution reaches
~QObject(). Make sure the pointer event instances are cleaned up in
~QQuickWindow() to avoid accessing them later during the destruction
phase.
Task-number: QTBUG-61434
Change-Id: Icd4576e7581524773a3eb33864fdd64df821e0e8
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Normally, this was not a problem, but it is problematic during
QQuickWindow destruction:
The list of pointer event instances are destroyed, but later the grabber
is removed (through call to removeGrabber()). This queries the
mouseGrabberItem(), which would create a new pointer event instance.
It also has the benefit that d->pointerEventInstances are now only
populated due to actual incoming events.
Task-number: QTBUG-61434
Change-Id: I4e7b6f5643f3b971138a1f7c7237ee734d29783c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
| |
The variable wasn't initialized in any constructor. This
didn't cause issues in practice, as it always got set in
optimizeRenderList().
Change-Id: I37459bb2d51bbe2bb881aaefffd6972a5345c75d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
|
|
|
|
|
|
|
| |
And check whether nine patch pixmaps are opaque as well.
Change-Id: I23f2cb675b923eace849a1c0ad71efe1446c86c4
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Volker Krause <volker.krause@kdab.com>
|
|
|
|
|
|
|
|
|
|
| |
If the content of a layer completely covers every pixel of
it, mark that layer as opaque so that we can avoid alpha
blending where possible.
Change-Id: Ia0be4e7a96ecddd31a26f353509de976bcc9e397
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Volker Krause <volker.krause@kdab.com>
|
|
|
|
|
|
|
|
|
| |
Index based scrolling does not enable moving and flicking properties.
Task-number: QTBUG-34576
Change-Id: Ief06d37115ca389027670c97ce6c0457a74d4872
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The animation was not being performed if the delayRemove attached
property was changed by the handler of the remove() attached signal.
We need to run the delayed transitions not only if we have an animation
for the target item, but also if we have an animation for the items
being displaced.
(The flag variables can safely be obtained outside of the for loop,
given that their value should not change during the loop iteration)
Task-number: QTBUG-57225
Change-Id: I8c138677d7dcdf63e0932ec5cf7738c0caeb2ab8
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In QQuickItemViewPrivate::applyModelChanges(), if
moveReason = QQuickItemViewPrivate::Other,
then QQuickItemView::trackedPositionChanged() will fail to call
d->setPosition(pos), which is normally what keeps the Flickable
moving for a while. Leave the reason as-is (it will be SetIndex in
this case), so as not to forget that we were actually trying to move
down. Updating the model was just a side-effect of that: either
because some QML code was trying to append to the model or because
fetchMore() was called.
Task-number: QTBUG-61269
Task-number: QTBUG-62864
Change-Id: I3fd402469950d6c12e6a8d6e42be83ea4f54776a
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|
|
|
|
|
|
|
| |
Sequential call of setWidth() and setHeight() results in outdated height on
widthChanged() signal. Use setSize() to set width and height at once.
Change-Id: I013f5e1fcfc65a8606f9596ddc196b633873dc98
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If all the items currently in the view are being removed,
lastVisibleIndex will be -1. This caused an unwanted repositioning
of all the deleted items, which got moved to a wrong location.
Therefore, when all visible items are removed, we should avoid
recomputing any item's position.
Task-number: QTBUG-57225
Change-Id: I9909748a9cccb5e6a3726306e250921ce69fcba9
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
| |
And help avoid that we draw the same pixel multiple times.
Change-Id: I56dccfeffe6865d0aaa252c84ae693380c3bbb5b
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Volker Krause <volker.krause@kdab.com>
|
|
|
|
|
| |
Change-Id: I5340dfb214de63ad848b2c9c322c89a19b770fc2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Otherwise we may get called back when the window's scene graph is ready,
but we don't have a controller anymore then. This leads to a crash.
Change-Id: I8075619e1fd3c69ca0f7d0b1d72952b8cc5040f8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
| |
Sequential call of setWidth() and setHeight() results in outdated height on
widthChanged() signal. Use setSize() to set width and height at once.
Change-Id: I86ff5cef2da912a8855c66a614d5d7d2e71f1de8
Reviewed-by: Risto Avila <risto.avila@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-62449
Change-Id: I523d86d5c1744ee269080cb169990fdb3d8f93ef
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When select all is triggered then the cursor rectangle should be
updated to ensure that the selection handles are visible if they are
displayed on a given platform. For instance, on iOS the loupe handles
should appear in this case.
This also has the added effect that when using Backspace on the iOS
keyboard, it will delete the selected text as opposed to just a
single character as it will handle that situation correctly.
The tst_qquicktextedit::inputMethodUpdate() test is modified to
account for the extra event sent now when selectAll() is called.
Task-number: QTBUG-63835
Change-Id: I94fb0576b286c006dd12c65d0b322d712ed2a96f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When changing between screens, the QImage representing the contents of
the scene will be changed, but the software adaptation was only updating
the contents of the image that had change since the last frame, leading
to uninitialized image data being shown. Now QQuickWidget will force a
full repaint on the new image.
Task-number: QTBUG-61798
Change-Id: Iab200faee8cf6457f2eab6d33dddbe7781c9fcf1
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
|
|
|
|
|
| |
Change-Id: I76dccf547de40b5e72fd7abaa062fa96cb2c118a
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
|
|
|
|
|
| |
Change-Id: Icc08925454445fc9497fb3bfd2c26efe90605983
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Binding its height to the height of the flickable means that it's only
as tall as the flickable, and hence cannot be interacted with beyond a
certain point. The flickable was using the correct height
(paintedHeight), which meant that the entire text could be scrolled,
just not interacted with.
Let it assume its implicitHeight so that it can grow freely.
Task-number: QTBUG-48174
Change-Id: I853d0f505466e26e3100e79ff70210fcfa247f0f
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
| |
Change-Id: I9a01b3f2da0399c84fc7df842f810ae760fd215d
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-62112
Change-Id: I8943baf6bd5261b91d8960bb227992b56b720554
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
|
|
|
|
|
| |
Change-Id: I91aab9d78ff4dced55cb118ea8f88994bd1d2c20
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before once requireImplicitWidth was set to true by requesting
the implicit width, the implicit (and width) was never updated again, even
if the text was updated/changed.
Adding also a test
Task-number: QTBUG-63153
Change-Id: Ie3bac4baeb14c2e69acc43d11a351ac91d5400da
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-62913
Change-Id: Ib561e0ab6582c1df41ae1c75ba304377c00d63f0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
| |
On some platforms, math functions in the std namespace don't work even
if cmath is included.
Change-Id: Ia71d22b07f508e0584de5320f376fbf4b3a2887b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
|
|
|
|
|
| |
Change-Id: I3f978d9638ce3f47dff0adfb5fccdc0b4816a690
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Ensure that the same flick consistently produces the same results,
by making sure we don't use old timestamps from previous flicks.
Task-number: QTBUG-62939
Change-Id: Ie738076abba66d38ff505292925e9441c38a3c95
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
| |
Mostly as a way of verifying the fix for QTBUG-37095, so far.
But of course other log messages can be added to this category later.
Task-number: QTBUG-37095
Change-Id: I57930e9376529b6eacca1b554d31382d41582fda
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Handle moving between high- and normal-DPI displays.
The texture gets a setCanvasWindow() call on screen
change. Read window->effectiveDevicePixelRatio() here
and set m_canvasWindowChanged on change to trigger
a repaint if there was a change.
Task-number: QTBUG-37095
Change-Id: I96ff07bd7334269cad219eb0a9056c62e850aac7
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This amends patch 4b982c744f538a24e21a2af146c45f93d27dd1cb.
Previously, setting hotSpot had no effect on the image position because
QDrag object used for the drag is created in startDrag(), and the
hotspot was never updated before drag->exec(...).
Task-number: QTBUG-61980
Change-Id: I9c11c456d3b32b5986cf287b2610437e3825d9d9
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
This is the default for OpenGL and D3D12 QSGLayer implementations, and
means that code using QSGLayer can end up rendering upside down if
switched the software backend.
Task-number: QTBUG-62929
Change-Id: Ib34b10c4eb834d2ef52e9005866242886b3addeb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Normally all shader programs from materials are cached in a simple table
that is alive as long as the renderer exists, in practice this means being
tied to the QQuickWindow which is often the entire lifetime of an
application.
Use releaseResources(), which is mostly a no-op on the scenegraph level
at the moment, to free this cache.
Task-number: QTBUG-62392
Change-Id: I279e595874fee1ab4fe0dede0843a3686dea5806
Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
visible pos
The current implementation would only return true if the added
delegate was positioned below the last visible pixel. This caused
a problem when the position ended up at exactly the last visible
position, since then we would return false, meaning that a re-layout
would not be done.
Since we use the same calculations several places, this patch
will factor it out into lastVisiblePos, and also fix up the
places where we test on it. Especially this includes making
sure that we set visibleAffected to true if we actually
enter the for-loop that adds the item to visibleItems. To
make the code more readable (and to ensure that we are
consistent), we set it to true inside the for-loop.
Task-number: QTBUG-61537
Change-Id: Ie697b5b6d9f4236ee856bde75fd9bc0a07dda7ea
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|