aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickpathview.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Port QtDeclarative from QStringRef to QStringViewKarsten Heimrich2020-06-161-1/+1
| | | | | | | | 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>
* Replace calls to deprecated QEvent accessor functionsShawn Rutledge2020-06-111-7/+7
| | | | | | | | | | | | | | | | | | | | 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>
* Remove hard-coded notes for 'Corresponding handler' for QML signalsTopi Reinio2020-03-101-12/+0
| | | | | | | | QDoc will generate these notes automatically. Task-number: QTBUG-37355 Change-Id: I8ed058ecbbcc630ad0351f6ce167c3fa61936f6f Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix incorrect behavior of PathView with ungrabMouse()Shin-ichi Okada2019-12-041-2/+3
| | | | | | | | | | | 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>
* PathView: grab mouse on press if already movingShawn Rutledge2019-09-231-3/+4
| | | | | | | | | | | | | | | | | | 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>
* PathView: fix warnings, oddities and whitespaceShawn Rutledge2019-09-181-79/+79
| | | | | | | | | | | | | - 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>
* Fix qmlobject_{dis}connect macros to require semicolon at the endJan Arve Sæther2019-09-161-2/+2
| | | | | | | | | | | | | | | | | | 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>
* PathView: reduce velocity by linear decay model if release is delayedShawn Rutledge2019-09-121-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Expose QQuickPath::pointAtPercent as Q_INVOKABLEPaolo Angelelli2019-06-251-4/+4
| | | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-03-281-4/+0
|\ | | | | | | Change-Id: I910618824785f9119b1e1da9a82e998fd645a96f
| * Fix incorrect PathView.currentIndex assignment with StrictlyEnforceRangeShawn Rutledge2019-03-271-4/+0
| | | | | | | | | | | | | | | | | | 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>
* | Add itemAtIndex to quick viewsPaolo Angelelli2019-01-171-0/+27
|/ | | | | | | | | | | | 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>
* Prevent overly drawn-out animation when snappingMichael Brasser2018-11-291-1/+5
| | | | | | | | 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>
* Prevent PathView's parent stealing mouse grab during double-flickChris Adams2018-09-241-0/+2
| | | | | | | | | | | | | 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>
* QQuickPathViewPrivate: fix heap-use-after-freeMitch Curtis2018-06-251-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Doc: Add missing dots (qtdeclarative)Paul Wicking2018-06-191-1/+1
| | | | | | Task-number: QTBUG-68933 Change-Id: Ibb5aa227e82825085e7214e17dcffcb17fd44157 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-1/+1
| | | | | | | | | | | | | 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>
* QQmlIntanceModel: use QQmlIncubator::IncubationMode instead of bool to ↵Richard Moe Gustavsen2017-11-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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>
* Run includemocs in qtdeclarativeThiago Macieira2017-04-261-0/+1
| | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Port existing qmlInfo callers to qmlWarningRobin Burchell2017-01-111-1/+1
| | | | | | | | | | | | | 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>
* PathView: fix crash on path removeOleg Yadrov2017-01-111-7/+14
| | | | | | | | | | 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>
* PathView: remove qmlMode() functionAnton Kudryavtsev2016-10-121-20/+14
| | | | | | | | This function is just needless wrapper of std::fmod. Use std::fmod directly. Change-Id: I848164ab260478971e43e69d9e5c3ed852f333b4 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Quick: mark some methods as constAnton Kudryavtsev2016-10-121-2/+2
| | | | | | | These methods do not modify objects. Change-Id: Ibb2622cad6fbcec31c785f5d032304c648372350 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* PathView: use nullptr instead of 0Anton Kudryavtsev2016-09-141-24/+24
| | | | | Change-Id: I5f40c18a619fe22ea6c2d0e709ff163e80d6e74d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-191-2/+2
|\ | | | | | | Change-Id: I326616356ee26d4532c6d57558c43c919f0a900d
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-181-2/+2
| |\ | | | | | | | | | Change-Id: I20c622263f40c322954328e4d10a8071db3ca6d1
| | * QQuickPathView: fix doc for itemAt() and indexAt()Anton Kudryavtsev2016-08-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | These methods have real arguments. Change-Id: I61f42076d36265b58dcc598394c6b3576b02dd60 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | | Quick: replace 'foreach' with 'range for'Anton Kudryavtsev2016-08-181-5/+8
| | | | | | | | | | | | | | | Change-Id: I3493b16a184fc811289db9e98eff37bb987113a3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | QQuickPathView: optimize releasing of cache itemsAnton Kudryavtsev2016-08-181-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | Release all cache items, and then clean container. Avoid quadratic complexity. Change-Id: I61f3e43aa070c0be074c3804a83f2ff1de9a398d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | QQuickPathView: de-duplicate calls and cache resultsAnton Kudryavtsev2016-08-181-4/+6
| | | | | | | | | | | | | | | Change-Id: I4b49b912c068fd5c76a2c2c8580f616cb42e9bdb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | QQuickPathView: de-duplicate code of indexAt()Anton Kudryavtsev2016-08-171-10/+2
| | | | | | | | | | | | | | | | | | | | | Re-use itemAt() method. Change-Id: Ic3673fe4d9fd3f27abc90c9436e99e0da9821cdb Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | QQuickPathView: port some loops to 'range for'Anton Kudryavtsev2016-08-171-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-171-21/+39
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-131-21/+39
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * PathView: fix infinite construction/destruction loopAnton Kudryavtsev2016-08-121-18/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... 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>
| | * PathView: fix item creationAnton Kudryavtsev2016-08-121-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Quick: use const (and const APIs) moreAnton Kudryavtsev2016-08-121-6/+6
|/ / | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-201-4/+6
|\| | | | | | | | | | | | | | | Conflicts: src/qml/jit/qv4targetplatform_p.h src/quick/accessible/qaccessiblequickitem_p.h Change-Id: Ic95075a5fad81ec997a61561bd65979dfa3b9d4d
| * ItemViews: Make the wording of the warning on cache properties slightly sterner.Robin Burchell2016-06-161-4/+6
| | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-101-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Fix grammar in PathView docsMitch Curtis2016-05-271-1/+1
| | | | | | | | | | | | | | | | 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>
* | Quick: expose movementDirection of PathViewLiang Qi2016-05-021-6/+49
| | | | | | | | | | | | | | | | | | 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>
* | Use QStringRef to optimize memory allocationAnton Kudryavtsev2016-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-291-0/+4
|\| | | | | | | Change-Id: Iec1b2de53c275996364c4bab0123ccb3e6e9895e
| * PathView: don't leak item referencesJ-P Nurmi2016-01-281-0/+4
| | | | | | | | | | | | | | | | | | | | 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>
* | Updated license headersJani Heikkinen2016-01-191-14/+20
|/ | | | | | | | | | | 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>
* Fix QQuickPathViewPrivate::snapToIndex()J-P Nurmi2015-10-221-5/+5
| | | | | | | | | | 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>
* Remove ordered list assumptions in PathViewAlan Alpert2015-05-181-47/+112
| | | | | | | | | | | | | | | | | | When flicking fast or jumping around on paths with some items not seen, the current algorithm makes assumptions about list ordering which are hard to maintain. Specifically that it has the index of the first item in the list cached and that all changed will be to either prepend or append an item to the current ordered set. This patch removes that assumption, leading to a little more work each time to identify where new elements will go. There is still a slightly faster path for the common case of adding elements to the beginning or end of the path. Task-number: QTBUG-42716 Change-Id: Ief76c93967d254d405e6656ef27d06b4ecc470c8 Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* PathView: use qt.quick.itemview.lifecycle logging categoryShawn Rutledge2015-03-131-3/+17
| | | | | | | | It is the same for debugging delegate cycling in ListView. Task-number: QTBUG-42716 Change-Id: I54b83a25a5d8473c643cd326fe114317103bb24e Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Fix invocations of static methods of QGuiApplication/QCoreApplication.Friedemann Kleint2015-03-051-2/+3
| | | | | Change-Id: I7bcc209b0c6e77cf6d974af85a19487345a48975 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>