aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicklistview
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove properties related to highlight speedBea Lam2012-06-227-13/+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>
* Fix warnings in declarative tests.Friedemann Kleint2012-06-201-6/+7
| | | | | | | | | | | | - Unused variables and test data. - () around operator &&. - Conversion of false to 0-pointer where QVariant was intended. - Missing enumeration value. - Remove duplicated qqmlecmascript entry from qml.pro (has an internal check for no-widgets). Change-Id: Ie030167e22bce26e3988a4406c630fb460f61a3c Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Mark tst_qquicklistview insignificant for Mac.Friedemann Kleint2012-06-201-0/+1
| | | | | | | Task-number: QTBUG-26244 Change-Id: I314fa5293ffaa72dafa843d1a950d0abed5a4516 Reviewed-by: Jason McDonald <jason.mcdonald@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>
* tst_qquicklistview: further increase test timeoutKent Hansen2012-06-131-2/+1
| | | | | | | | | This test has timed out on a recent test run, but appeared to be making progress. Increase the timeout, and remove the insignificant_test flag. Change-Id: Ic3d5f0dbf43e5d0a284ae87c9fd21552b759cbad Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix view delegate parent binding regression.Martin Jones2012-06-122-0/+56
| | | | | | | | | | | | 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>
* Mark qquicklistview autotest as insignificantKent Hansen2012-06-121-0/+1
| | | | | | | Flaky on macx-clang developer-build OSX 10.7. Change-Id: I4e8b7604dff9dd64efd6110e2cbde461d82b94d3 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Performance should always be better with cacheBufferMartin Jones2012-06-081-58/+58
| | | | | | | | | | | | | Setting a cacheBuffer introduced more work for the scenegraph due to cached delegates' visibility being toggled. Changing visibility is expensive as it is proagated to all children. Introduce a cheap method of hiding a branch instead. Also avoid initiating incubation in the same frame as a completed creation. Change-Id: I573bcf37f441f96a7502d445be50ef4301f217d5 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Clearing a view didn't reset content size.Martin Jones2012-05-311-0/+10
| | | | | | | | Ensure that a valid contentHeight/contentWidth is set regardless of whether there is a valid model. Change-Id: I546683c7571a1379e3ca2ef285435ad48319e8e4 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Set explicit testcase.timeout for slow testsRohan McGovern2012-05-291-0/+1
| | | | | | | | | | | | We'd like to decrease the default timeout for tests in the Qt Project CI so that we waste less time waiting for hanging tests. Tests which genuinely take a long time to run, such as these, should have their timeout explicitly set in their .pro file. Change-Id: I24c91494a5cc30af1d8929c995886253ab34fe86 Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Fix flicker when changing ListView currentIndex with VisualItemModel.Andrew den Exter2012-05-282-0/+96
| | | | | | | | | | 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>
* Fix PathView not updating after all items are removed from the model.Andrew den Exter2012-05-281-1/+0
| | | | | | | | | | | | Always clear the layoutScheduled flag on a refill even if there are no items to create, otherwise future layouts won't be scheduled because it appears one is already pending. Fixes an issue in the dragselection example where items that should have moved to the PathView instead disappeared. Change-Id: I4302b5b43184c697a78f5c09dc3811326e2271ca Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Don't parent (QObject) delegate items to views.Andrew den Exter2012-05-281-1/+1
| | | | | | | | | | | | This keeps object ownership within the context the items were created in and simplifies lifetime management as the VisualDataModel has sole license to delete objects and doesn't have to keep guards against a view and all it's children being deleted. Delegates are still reparented in the item heirarchy. Change-Id: Ife5afdfe294a5a8ca1ca3638a086f72452e4915c Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Don't override "z" bindings for header and footerBea Lam2012-05-282-0/+56
| | | | | | | | | | 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-142-10/+29
| | | | | | | | | | 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-012-0/+160
| | | | | | | | | | | | 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>
* Only run populate for items in model at creationBea Lam2012-04-231-19/+14
| | | | | | | Don't run for items added in Component.onCompleted. Change-Id: I58745ab989efae168d036875cb2fb88e3e2db0c3 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Vertical layout direction for ListView and GridViewBea Lam2012-04-173-257/+470
| | | | | | | | Provide verticalLayoutDirection property with TopToBottom and BottomToTop values. Change-Id: If6f0da5dd4735036162868d391852a661854de5b Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Don't ignore model changes when the ListView scroll position changes.Andrew den Exter2012-04-131-11/+38
| | | | | | | | | If there are pending changes when the ListView viewport changes then do a full layout instead of a refill. Likewise for GridView and when animations finish or the cacheBuffer size changes. Change-Id: I57a2b01fee5729381558af366dad24ba26c223ef Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Section comparison should be case insensitive.Martin Jones2012-03-281-5/+5
| | | | | | | | Allows use of mixed case model data without having to add a special role just for sectioning. Change-Id: I0a747e51542b5bf0f9db8fc2732882928a6cc676 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Buffer changes received during layout()Bea Lam2012-03-272-0/+64
| | | | | | | | 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-212-5/+30
| | | | | | | | | | | | | | | 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-192-0/+41
| | | | | | | Geometry listeners were called for deleted header/footer. Change-Id: I47854178232f8a4ab5e19a931901b49741fec388 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Ensure section header/footer are cleaned up.Martin Jones2012-03-191-0/+17
| | | | | | | | If the model is cleared or replaced with an empty one, the section headers should be released. Change-Id: Ia2f070c312593743b2c5332a6c69facaf222ee6d Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Reuse QQuickView in ListView table driven testsMartin Jones2012-03-131-44/+89
| | | | | | | | Makes the tests run faster since we're not waiting for a window to appear all the time. Change-Id: Ibff3706873dbad2f92d2135eae260368f4f4bb10 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Speed up view flick tests.Martin Jones2012-03-132-9/+7
| | | | | Change-Id: I98b0a45b5afd0150bfacef2c1c1e814f70ae042f Reviewed-by: Bea Lam <bea.lam@nokia.com>
* ListView.contentHeight does not include header and footer item heightsMartin Jones2012-03-131-0/+10
| | | | | | | Task-number: QTBUG-24664 Change-Id: I2a2fe144835e61665b8693d58ca4fb9ba506e8a8 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Displaced items were moving unnecessarilyBea Lam2012-03-132-0/+129
| | | | | | | | | | | | 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>
* Remove unneeded dependencies to QtWidgets and QtOpenGLLars Knoll2012-03-121-1/+1
| | | | | Change-Id: I43bb54524f5786a838073df8812107dda7b0d56e Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* refilled items should be moved immediatelyBea Lam2012-03-102-4/+37
| | | | | | | | | 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-072-0/+82
| | | | | | | | | | | | | | 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-072-0/+50
| | | | | | | | | | | 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>
* Changed quick tests to work from install directoryKurt Korbatits2012-03-071-3/+1
| | | | | | | | | - Changed tests to use TESTDATA - added check for cross_compile option to skip when sources not available Change-Id: I1f382794ff982bbc07fc20438a4e4a8c8b8d565f Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* prepareTransition() must cancel current transitionBea Lam2012-03-072-14/+3
| | | | | | | | | | | | | | | | 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-054-22/+550
| | | | Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-2443-0/+8161
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>