aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicklistview/data
Commit message (Collapse)AuthorAgeFilesLines
* Set highlight size for both dimensions, irrespective of ListView orientationRobin Burchell2013-12-111-0/+23
| | | | | | | | | | | The assumption that all list delegates are the same size (dependent on ListView orientation) is not a correct one, even if it is correct most of the time. Task-number: QTBUG-31626 Change-Id: Iba6f3bc5f38d60e3be7632ab17d0c66ab8e73965 Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au> Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Set all attached section properties before emitting change signals.Martin Jones2013-11-301-0/+25
| | | | | | | | | | If we have bindings to the section properties, e.g. implementing manual section header creation, we want previousSection, section and nextSection to be set before emitting the change signals to prevent different results each time the binding is run. Change-Id: Id3a0b4a53419681f35102c9e7c620b5c6112ebb0 Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Also update viewport size when header/footer size changesRobin Burchell2013-11-261-0/+19
| | | | | | | Task-number: QTBUG-24292 Change-Id: I8e7f5abe077b6e8d2ce6625dcf43a34a7260934e Done-with: Martin Jones <martin.jones@jollamobile.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Fix crash when assigning a null QObject or derived property as a ListView modelAndrew den Exter2013-11-241-0/+23
| | | | | | | | | | Fall through to the null case handler in the event of a QVariant of QObject or derived type with a null value, rather than asserting in the instance handler. Task-number: QTBUG-34999 Change-Id: I5eeffbe29a263c57e6157d516b138ddc8e2e7a95 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Reset on model layout changedAlbert Astals Cid2013-10-211-0/+77
| | | | | | | Otherwise the next dataChanged from the model may not be received Change-Id: I16b859d92fdb1823c4a56c297d4451abe438fbb1 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Stabilize and speed up testLars Knoll2013-09-284-2/+4
| | | | | | | | Added lots of missing qWaitForWindowExposed(), and sped up animations. Change-Id: Ie3c5e53dc9e9770baa05fb1da3eedce80ac52d31 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Resizing items out of the list viewport should not change the viewportAlbert Astals Cid2013-07-241-0/+67
| | | | | | | | Consider the old geometry, not the new one to check if an item was outside the viewport or not Change-Id: I108412d560faf86130044f3d091254c07af0c004 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* No longer apply pending changes when accessing ItemView propertiesAlan Alpert2013-04-262-1/+42
| | | | | | | | | | | | | Applying changes in the getters can lead to binding loops, and is currently inconsistently applied. Removing the applyPendingChanges calls from remaining getters, and adding a forceLayout() function for cases where the immediate-apply behavior is needed. Task-number: QTBUG-30555 Parts-of-patch-by: Albert Astals Cid Change-Id: I64632601e02f2a53060296ab7739577a749d916f Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au> Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
* QQuickItemView: Add guard before returning currentItem itemCaroline Chao2013-03-191-0/+23
| | | | | | | | | | | | | And don't check if the currentItem is empty before calling applyPendingChanges(). And an autotest. (Patch from Steffen Imhof) Task-number: QTBUG-30227 Change-Id: Ia16362a6d0dce771f20772929c32e9306ed0e0f9 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Add SnapPosition mode to positionViewAtIndex() in List/GridView.Martin Jones2012-07-271-0/+4
| | | | | | | | | | This allows the view to be positioned on a snap boundary, which is generally what is wanted when strict highlight mode s set or snapping is enabled. Task-number: QTBUG-26605 Change-Id: I6288dc8be4ff16c412b56ab449b6a9fb7b7ea889 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Rename ListView *speed properties to *velocityBea Lam2012-06-266-10/+10
| | | | | Change-Id: I63c02d186b1832e7bf890a00caad150d5bf136cb Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix section delegates not updating when changed.Andrew den Exter2012-06-261-0/+61
| | | | | | | | | Delete all allocated section items before doing an update when the section delegate is changed. Task-number: QTBUG-24899 Change-Id: I09dc7a1c602a49ad7bb37512a7e5116392259457 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Position section headers correctly when section property changes.Andrew den Exter2012-06-261-8/+11
| | | | | | | | | | Schedule a new layout after the section property is changed to correct item positions if section headers are added or removed. Task-number: QTBUG-24900 Change-Id: I7e46ec6dc00e5a810029396a4c5ca4e87ee1d94d Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Revert "Remove properties related to highlight speed"Bea Lam2012-06-256-0/+10
| | | | | | | | | | This reverts commit 18fb5506d524dbe380d5bf636c74c93fb85cbc31. Without these properties there's no way to set a constant movement speed. Change-Id: I49cd648846f801eb479ecce8cde09ff49ea11736 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove properties related to highlight speedBea Lam2012-06-226-10/+0
| | | | | | | | | | ListView should only have duration-type properties (i.e. highlightMoveDuration and highlightResizeDuration) as it's unnecessary to have both duration and speed properties for the highlight animation. (PathView and GridView only have the duration-related properties.) Change-Id: I1b94599e3e89afe6488ce2a882c2802354a859fe Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Set a non-zero default cacheBuffer.Martin Jones2012-06-1315-0/+16
| | | | | | | | | | The likelihood of constant framerate when flicking is considerably improved by having a cacheBuffer. Since there is only a minimal cost in having a modest cacheBuffer, it is better to have a more optimal default value - 320 seems a good starting point. Change-Id: Id3c8a153821573b5b08c6fbd80d34152908d358d Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Fix view delegate parent binding regression.Martin Jones2012-06-121-0/+17
| | | | | | | | | | | | 762b4d90110465aeceb96f44cd06dcda229dfe89 introduced a regression by setting the item parent after completion. This was to avoid rendering an incubated object before completion. However this breaks bindings. Restore setting the item parent before completion, and ensure items are not rendered until completed. Change-Id: Ifc9d0c34ee62e687889c32ffab7c091b4c8cc470 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Fix flicker when changing ListView currentIndex with VisualItemModel.Andrew den Exter2012-05-281-0/+46
| | | | | | | | | | Return the Referenced flag when the view has outstanding references otherwise it will attempt to hide an item if believes shouldn't be visible. Task-number: QTBUG-25849 Change-Id: I7387ab8322a1cd7f3386685086b2b8ad10c8b4f0 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Don't override "z" bindings for header and footerBea Lam2012-05-281-0/+35
| | | | | | | | | | Headers and footers are given a default z value. This value should be set between Component beginCreate() and completeCreate() to avoid overwriting any binding in the header or footer item that has already set the 'z' value. Change-Id: I8e3ee97232d99500a32f2d77d2b663016eb404f7 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix xOrigin and yOrigin to always be top-left posBea Lam2012-05-141-1/+5
| | | | | | | | | | Currently xOrigin is reversed for right-to-left and yOrigin is reversed for bottom-to-top. This is wrong since xOrigin and yOrigin come from Flickable so they should keep that meaning, i.e. the top left corner of where the content begins, in ListView and GridView. Change-Id: I88c77fadd1cf784f4b4d62677168b84675e921b0 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Don't use QtDeclarative compat moduleKent Hansen2012-05-111-1/+1
| | | | | | | Use QtQml instead. Change-Id: If899ebc1e0b4ea86f0f8d4369fbd3eb5cbb2181c Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Fix content pos adjustment when resizing first itemBea Lam2012-05-011-0/+53
| | | | | | | | | | | | If visibleItems.first() changes size in a ListView, the size change should be made in the direction of the content flow. This was not working correctly for layouts other than the default vertical+LTR layout. This patch fixes the issue for other layouts and also fixes resizing of implicitly sized delegates (e.g. positioners) within the default layout. Change-Id: Ib1d84ce000a3a341fe617cf644420dc5d589d577 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Vertical layout direction for ListView and GridViewBea Lam2012-04-172-10/+7
| | | | | | | | Provide verticalLayoutDirection property with TopToBottom and BottomToTop values. Change-Id: If6f0da5dd4735036162868d391852a661854de5b Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Buffer changes received during layout()Bea Lam2012-03-271-0/+37
| | | | | | | | Otherwise, changes received by a view during layout() may override the changes that are currently being processed. Change-Id: Iabc4db682f85ceb7d04c3f7442fb6c98ebdb94f1 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Fix margins for right-to-left modeBea Lam2012-03-211-2/+2
| | | | | | | | | | | | | | | The behaviour for considering left and right margins was inconsistent in views with a right to left layout; these values were reversed for extent calculations but not for general positioning. With this change the left and right margins are never reversed in a right-to-left layout, so minXExtent and maxXExtent calculations always use startMargin and endMargin respectively, regardless of layout direction. Also fixes calculation of endOffset in trackedPositionChanged() when in horizontal orientation. Change-Id: Ie00e3d4c2bd38d8fe6ac0213702206b88bfa895e Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Resetting a model can cause a crash in views with header/footer.Martin Jones2012-03-191-0/+2
| | | | | | | Geometry listeners were called for deleted header/footer. Change-Id: I47854178232f8a4ab5e19a931901b49741fec388 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Speed up view flick tests.Martin Jones2012-03-131-1/+1
| | | | | Change-Id: I98b0a45b5afd0150bfacef2c1c1e814f70ae042f Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Displaced items were moving unnecessarilyBea Lam2012-03-131-0/+78
| | | | | | | | | | | | They should only move if they actually change from the last set position, and not if they are simply changing from their current item position, as that is wrong during an animation. This also cleans up some code for resetting the transition data. Task-number: QTBUG-24586 Change-Id: I0a6635903975ebc40d5cf8398b943a9de92d4493 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* refilled items should be moved immediatelyBea Lam2012-03-101-0/+6
| | | | | | | | | refill() functionality should reposition items immediately, else removeNonVisibleItems() sees different positions from those added in addVisibleItems() if an item is animating. Change-Id: Ib9904e08bf92b18fd4b712270c0ab69e9a113e04 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* ListView can freeze if flicked beyond its bounds.Martin Jones2012-03-071-0/+43
| | | | | | | | | | | | | | If the delegate's size changes in componentComplete and all items are flicked out of view, an incorrect jump calculation in addVisibleItems() resulted in a new delegate being created in the wrong position, and retriggering the jump calculation, which resulted in a new delegate being created in the wrong position, and retriggering the jump... Also fixed currentItem visibility. Change-Id: Iad5f211c4fc5eed9c009d51a0ce3b58181a7b36e Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Fix setting of target lists when target Transition is not setBea Lam2012-03-071-0/+35
| | | | | | | | | | | Target items are now set from QQuickViewItem::prepareTransition() instead of QQuickItemView and QQuickPositioner to ensure they are for a displaced transition even if there is no matching target transition. Task-number: QTBUG-24535 Change-Id: I0a6c7e3c6198786527014d421b96fc562c6186dc Reviewed-by: Martin Jones <martin.jones@nokia.com>
* prepareTransition() must cancel current transitionBea Lam2012-03-071-1/+1
| | | | | | | | | | | | | | | | If it does not, itemX() or itemY() will still return the current transition's 'to' position instead of the nextTransitionTo pos that was scheduled for the next transition (which the item now has moved to using the direct setPos() method). Also refactor prepareTransition() to always move the item directly to the nextTransitionTo if transition is not going ahead. Also fix some broken test code. Task-number: QTBUG-24523 Change-Id: I2e536fbc0da2acbf96fdf2d177190a8968f7fdb1 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Merge master <-> api_changesMatthew Vogt2012-03-053-1/+248
| | | | Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-2439-0/+2272
Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>