| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
QMutableTouch/SinglePointEvent can be publicly copy constructed from their
non-mutable counterparts, make use of that.
Change-Id: I7f56a9f9649bb7726cca1eaddccfdc3f21d47554
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>
|
|
|
|
|
|
|
| |
Since we depend on C++17 now, all of these can go.
Change-Id: I0484fd4bb99e4367ec211c29146c316453729959
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's no need to heap-allocate a short-term mouse event; and
localizing one is easy enough via QMutableEventPoint::setPosition.
The sendMouseEvent() function (and its name) didn't make as much sense
as handling the filtering completely in the childMouseEventFilter()
function. Checking and changing the grabber is also now possible via
accessors in the event itself, so now we have one fewer use of
QQuickItem::grabMouse() and QQuickWindow::mouseGrabberItem().
Change-Id: I84f9f26e349a8d1aabacdbdbb264949d1103e91d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
|
|
|
|
|
|
|
|
| |
Task-number: QTBUG-84319
Change-Id: I2dcfb8a2db98282c7a1acdad1e6f4f949f26df15
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several event accessors were deprecated in
qtbase/24e52c10deedbaef833c0e2c3ee7bee03eacc4f5.
Replacements were generated by clazy using the new qevent-accessors check:
$ export CLAZY_CHECKS=qevent-accessors
$ export CLAZY_EXPORT_FIXES=1
$ ../qt6/configure -platform linux-clang -developer-build -debug
-no-optimize-debug -opensource -confirm-license -no-pch QMAKE_CXX=clazy
$ make
$ cd ../../qt6/qtdeclarative
$ find . -name "*.clazy.yaml"
$ clang-apply-replacements .
Task-number: QTBUG-20885
Task-number: QTBUG-84775
Change-Id: I1be5819506fd5039e86b4494223acbe193e6b0c9
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
| |
QDoc will generate these notes automatically.
Task-number: QTBUG-37355
Change-Id: I8ed058ecbbcc630ad0351f6ce167c3fa61936f6f
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
When the grabbed Item is released and then grabbed again,
if ungrabMouse () is called, the animation stops. In order to
avoid this, when ungrabMouse () is called, if offset is different,
it is modified to animate.
Task-number: QTBUG-79592
Change-Id: I61cbd4dad90643722f12480f0dab3859ce116af8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A side effect of 8fd398c9d2f5f54e446e0b402bc63a2edb50da6f is that it
became possible for the highlight to stop between items, rather than
snapping to a specific item, if the user taps, clicks or drags an
additional time while the movement is ongoing. That was because it
didn't get a mouse grab, so it missed the release event.
QQuickPathViewPrivate::handleMouseReleaseEvent() needs to take care of
the snapping behavior after the user stops dragging. This only affects
behavior in the case that the PathView is already moving and the mouse
is pressed again: we assume the user wants to alter the PathView's
velocity, not interact with any delegate inside or with any parent item.
Task-number: QTBUG-77173
Task-number: QTBUG-59620
Change-Id: I7b2f69a6ef8d8022d7c917a5bf9e8fb40c8848db
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- avoid runtime conversion of float->double when initializing a qreal
- use qFuzzyCompare/qFuzzyIsNull to avoid direct comparison of
qreal values
- don't test a float value as a bool by implicit casting(!)
to check whether it's zero
- avoid implicit casts and old-style casts
- fix whitespace around comments
Change-Id: I7b0e77d38d5c86aa1a71833738deb5f0f893b507
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Just do the typical
do {
[..stuff..]
} while(0)
in the macros
Fix the places that didn't have semicolons.
This should eliminate some compiler warnings complaining about
excessive semicolons
Change-Id: I6b0e7a55badfd0f80c3cd0e9e1da42dc41945485
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
That is, from the time between the last mouse move event to the mouse
release, the velocity will be linearly discounted/depreciated until it
reaches 0 at QML_FLICK_VELOCITY_DECAY_TIME, which is currently 50 ms.
50 ms seems like a long time if the user meant to flick and release
immediately (in practice it might be more like 4 ms), and also a
short time if the user meant to "dwell" before releasing.
If we try to translate the fake physics to real physics, this would be
approximately equivalent to saying that if you slide a flat plate on an
air hockey table with one finger, and then stop suddenly, its momentum
_would_ cause it to keep moving under your finger for up to 50ms (except
that it doesn't, because our timeline doesn't "tick" until after the
release); and yet if you hold it for longer than 50ms, it will stop
right on the spot. That's not quite realistic, but feels OK for fake
physics (like the rest of the physics in Qt Quick).
Also add the qt.quick.pathview logging category, which will just log
the velocity calculations for now (but is intended for anything else
in PathView that seems worth logging later on).
Task-number: QTBUG-77173
Task-number: QTBUG-59052
Change-Id: Ie86f18d3b3305874b698c848290e0fd3beda94de
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
So it can be used in QML. Useful in combination with ShapePath,
in order to add graphics along a Shape.
[ChangeLog][QtQuick][Shapes] Exposed QQuickPath::pointAtPercent
as invokable in QML.
Change-Id: Ia8aeb2b74003410ce16d9d2a0c62d79a021530af
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|\
| |
| |
| | |
Change-Id: I910618824785f9119b1e1da9a82e998fd645a96f
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If currentIndex is quickly assigned a different index and then the
previous current index again, it should not move.
Fixes: QTBUG-74508
Change-Id: I8d610e3fe452c8631e082c648e77d2cb70ae57c5
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
| |
This patch adds itemAtIndex method to ItemView-derived views and
to PathView.
[ChangeLog][QtQuick][QQuickItemView] Added itemAtIndex() to
GridView, ListView and PathView to fetch a visible delegate by index.
Change-Id: Id8475d06c1481036984fe5109bb52cf2729b1c21
Fixes: QTBUG-72961
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
| |
Don't trigger (potentially seconds long) animation to to fix very small
errors in offset.
Change-Id: Ibdba16e4fb7a1aff7577a29ab594af8aba231d6d
Reviewed-by: Martin Jones <martin.jones@qinetic.com.au>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes an issue where mouse events could be stolen by the
parent of a PathView due to the PathView not correctly setting the
keep-mouse-grab flag in handleMousePressEvent(). This commit ensures
that the flag is correctly set, so that the second flick in a double
flick is handled by the PathView rather than being stolen by the
parent.
Task-number: QTBUG-59620
Change-Id: Iccdfe16e7e80e6d1d31f95c3dba9c8839b20f30f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The TabBar auto tests in Qt Quick Controls 2 repeats the following
process very quickly for several data rows:
1. Creates a TabBar (PathView, when using the Universal style)
2. Moves items in its QQmlObjectModel
3. Deletes the TabBar
When run with ASAN, this test would fail, because the TabButtons
(which are child items of the PathView) would try to access a deleted
QQuickItemChangeListener upon their destruction.
The underlying issue is that QQuickPathView::modelUpdated() is called,
and before a refill() can happen, the view is deleted.
QQuickPathView::refill() was the only execution path that was releasing
the cached items (QQuickPathViewPrivate::itemCache), and since part of
releasing an item involves removing the QQuickPathView as a change
listener from the item, the item would access the deleted view
(listener) when the item was being destroyed.
This patch fixes the issue by also releasing cached items in
QQuickPathViewPrivate::clear(), which is always called by the
destructor.
Task-number: QTBUG-68964
Change-Id: Ic5bf0943be79948c86bf7c07ef13ecd1a7b971ba
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
|
|
|
|
|
|
| |
Task-number: QTBUG-68933
Change-Id: Ibb5aa227e82825085e7214e17dcffcb17fd44157
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From now on we prefer nullptr instead of 0 to clarify cases where
we are assigning or testing a pointer rather than a numeric zero.
Also, replaced cases where 0 was passed as Qt::KeyboardModifiers
with Qt::NoModifier (clang-tidy replaced them with nullptr, which
waas wrong, so it was just as well to make the tests more readable
rather than to revert those lines).
Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d
Reviewed-by: Simon Hausmann <simon.hausmann@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>
|
|
|
|
|
| |
Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now that qmlInfo actually reports info messages, we want to change
existing callers to use warning-level messages to preserve the original
message level.
This was done through:
perl -p -i -e "s/qmlInfo\(/qmlWarning\(/" **/*.{cpp,h,qdoc}
.. with a little care taken to only add the hunks that should be changed.
Change-Id: I511cee11ce0a26ec1048cd2b84c7536b812a0d89
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
There was no check if new path is a valid object
Task-number: QTBUG-53917
Change-Id: I2fd9534c1d34633243d16eda56a2b07e18dabe16
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
|
|
|
|
|
|
|
|
| |
This function is just needless wrapper of std::fmod.
Use std::fmod directly.
Change-Id: I848164ab260478971e43e69d9e5c3ed852f333b4
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
| |
These methods do not modify objects.
Change-Id: Ibb2622cad6fbcec31c785f5d032304c648372350
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
| |
Change-Id: I5f40c18a619fe22ea6c2d0e709ff163e80d6e74d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|\
| |
| |
| | |
Change-Id: I326616356ee26d4532c6d57558c43c919f0a900d
|
| |\
| | |
| | |
| | | |
Change-Id: I20c622263f40c322954328e4d10a8071db3ca6d1
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
These methods have real arguments.
Change-Id: I61f42076d36265b58dcc598394c6b3576b02dd60
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I3493b16a184fc811289db9e98eff37bb987113a3
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Release all cache items, and then clean container.
Avoid quadratic complexity.
Change-Id: I61f3e43aa070c0be074c3804a83f2ff1de9a398d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I4b49b912c068fd5c76a2c2c8580f616cb42e9bdb
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Re-use itemAt() method.
Change-Id: Ic3673fe4d9fd3f27abc90c9436e99e0da9821cdb
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The 'range for' works with pointer increments and
the generated code is less, so we save some text size.
Change-Id: I66a2827c9a342d9453a52028d3ec76a91a19a606
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/qml/compiler/qqmltypecompiler.cpp
src/qml/compiler/qv4isel_moth.cpp
src/qml/compiler/qv4ssa_p.h
src/qml/qml/qqmlobjectcreator.cpp
Change-Id: I8bb7fe773d657f908f20ee5e72c2b9bd643f6260
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/qml/compiler/qv4isel_moth.cpp
src/qml/compiler/qv4ssa_p.h
tests/benchmarks/qml/qqmlimage/qqmlimage.pro
tests/benchmarks/qml/qqmlimage/tst_qqmlimage.cpp
Change-Id: Iad11ce7fdf0c6d200fdebc16a94081bd8069a87a
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
... when all (or almost all) items are in the cache.
When all items are in cache, check lower bound is equal
to upper_bound.
In rare cases, especially when almost all items are in cache,
the inserting code was used (not only appending and prepending).
In this code there was not bound check before creation of item
and there was such situation:
1. Create item by inserting code (without bound check)
2. At the next call of refill() remove this item by life cycle
because this item does not meet the conditions. And go to step 1.
In other words at the first call we create some item, at the second
remove this item. And again.
So we had infinite construction/destruction loop. To break it we
should check position of new item before creation in inserting code
too (like we do in appending and prepending code).
Task-number: QTBUG-37815
Change-Id: I015cdeb67ca5fcd06c34b3145b49cbd3e38d4078
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
First call of QQuickPathView::refill() did not use currentIndex
for item prepending and there was situation when items were
not created, e.g.:
PathView with current item in center and currentIndex was set
so that item with index 0 was after current item and before path
end. The result of this situation: items from path begin to current
item were not created.
The reason was that idx always equaled (modelCount-1) for item
prepending.
Now first filling uses currentIndex to calculate valid idx.
Task-number: QTBUG-53464
Change-Id: I7e343b0712c9c5c5cd56b1d8e020cf8c0f6e6301
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
For CoW types, prefer const methods to avoid needless detach()ing.
Change-Id: I270cdc6eb8c5946f5c20b379bbb7c60f0ba518eb
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\|
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/jit/qv4targetplatform_p.h
src/quick/accessible/qaccessiblequickitem_p.h
Change-Id: Ic95075a5fad81ec997a61561bd65979dfa3b9d4d
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I have seen far too many cases of someone simply setting cacheBuffer to a
massive number in an attempt to workaround a slow delegate. It should be
explicit that cacheBuffer is not a solution for these problems.
Change-Id: I09416d06ff7faf51a104e09ca5f6b3593ddc53c7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Part of 0e053528 was reverted in the merge, about lastTimestamp. It
will be applied later in separate commit.
qmltest::shadersource-dynamic-sourceobject::test_endresult() was
blacklisted on linux.
Conflicts:
.qmake.conf
tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
tests/auto/qmltest/BLACKLIST
tests/auto/qmltest/qmltest.pro
Task-number: QTBUG-53590
Task-number: QTBUG-53971
Change-Id: I48af90b49a3c7b29de16f4178a04807f8bc05130
|
| |
| |
| |
| |
| |
| |
| |
| | |
Change-Id: Ibce14fddcbb608ffddb69f01e168d10c924c2957
Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It is needed by the behavior of TabBar in universal style in QtQC2.
[ChangeLog][QtQuick][PathView] Added movementDirection property
Change-Id: Iedc214a12e7336e52125ec82b9ded45502905978
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Replace substring functions that return QString with
corresponding functions that return QStringRef where
it's possible.
Create QString from QStringRef only where necessary.
While touching the code, also port loops to C++11 style.
Change-Id: I04c99b24ea6afd3715e3edf9ea00bfab838fd53c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|
|\|
| |
| |
| | |
Change-Id: Iec1b2de53c275996364c4bab0123ccb3e6e9895e
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Every getItem() call increases the reference count. If getItem() was
called on an item that was already managed, we must pair it with a call
to releaseItem() in order to keep the reference count in sync.
Change-Id: I897d19c77bc0c58717065cbe925c45a14153ad0b
Task-number: QTBUG-50655
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|
|/
|
|
|
|
|
|
|
|
|
| |
From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new LGPL header instead of LGPL21 one
(in those files which will be under LGPL v3)
Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
QQuickPathView::setCurrentIndex() set moveReason to "SetIndex", but
snapToIndex() overrode it to "Other". This caused updateCurrent() to
change the current index during snap animation and caused binding
loops in Qt Quick Controls 2.
Change-Id: I6c5f34c69886cb5c234ed78535bb356fbb38b3a6
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
|