summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativelistview
Commit message (Collapse)AuthorAgeFilesLines
* Moving contentY by large values in List/GridView is slowMartin Jones2011-04-141-0/+56
| | | | | | | | | | We needed to create/destroy every delegate between the current position and the new position. Now we estimate element at the new position and just create the elements from that item. Change-Id: I9da1354cbadb4e44fafc1a0bee619d058d1e06a2 Task-number: QTBUG-14974 Reviewed-by: Bea Lam
* Ensure view is positioned correctly when orientation changes.Martin Jones2011-04-122-0/+54
| | | | | | Change-Id: I7fbedff965ae8c89dcbb96ba5dcee85c07aa29b1 Task-number: QTBUG-17065 Reviewed-by: Bea Lam
* Regression: currentIndex was not set correctly after model cleared.Martin Jones2011-03-151-0/+7
| | | | | | | | | | Change b3080d78f2ff2d98410249e09d5d7d6e20fd155c stopped the currentIndex from being updated when a new item is added to an empty view. Change-Id: I77a0789fcf3693034a2d7aca173fec669b913b18 Task-number: QTBUG-18123 Reviewed-by: Bea Lam
* Fix ListView boundary extents for RTL layout.Martin Jones2011-03-112-0/+143
| | | | | | | | | The delegates were laid out RTL, but the first item was not aligned with the right edge. Also fixes QTBUG-18037. Change-Id: I6387c2f1ad37385376304f8cc76407b34d9fb834 Task-number: QTBUG-16010 Reviewed-by: Joona Petrell
* Merge branch '4.7' into qtquick11Martin Jones2011-03-012-2/+67
|\ | | | | | | | | | | | | Conflicts: src/declarative/graphicsitems/qdeclarativelistview.cpp Change-Id: Ic21311365c6139520ae337a379bdedb6ffe497db
| * Drag over bounds errors when ListView has variable height contentMartin Jones2011-02-281-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two related problems: - when dragging variable height content up beyond bounds items are destroyed, causing the maximum extent to change, which in turn causes skipping. This is fixed by storing the extents on press so that later changes do not affect drag behavior. - when variable height content is dragged beyond the bounds and and released, items are created as the view returns to bounds. This changes the extents, however the bound target was not updated. If the viewport height changes during fixup the bounds animation is now updated. Change-Id: Ib37ec9e51f8ceb71af1e2e58f25fd8da18dcd632 Task-number: QTBUG-17769 Reviewed-by: Michael Brasser
| * Fix test instability.Martin Jones2011-02-281-0/+2
| | | | | | | | | | | | | | Allow the asynchronous view changes to complete before testing section positions. Change-Id: I09c7592205b6e3c55807ec1c5aa4b09f9cd8b92c
| * Ensure layout is updated when section property changes.Martin Jones2011-02-252-1/+24
| | | | | | | | | | | | | | | | | | | | | | When the section property changed the sections were recalculated, but the items were not relayouted. Also avoid 'Unable to assign undefined value' warning by setting section item parent before component is completed. Change-Id: I7bd8eb369877a6faf72b32b80b45a68366c95772 Task-number: QTBUG-17759 Reviewed-by: Michael Brasser
| * DelayRemove of list delegate on section boundary duplicated sectionMartin Jones2011-02-232-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When removing a delegate with a removal animation that fell on a section boundary (i.e. owned the section header), the following item would also create a section header before the previous item was removed. Make updateSections() include the removed, but visible items in its update. Ensure updateSections() is called when the removed item is destroyed to ensure a new section header is created at that point. Change-Id: Ie831e3acf65b2989ebb030e2ab38cdbe179a9d45 Task-number: QTBUG-17606 Reviewed-by: Michael Brasser
* | Add LayoutMirroring attached property for mirroring QML layoutsJoona Petrell2011-03-012-9/+68
| | | | | | | | | | | | Task-number: QTBUG-17280 Reviewed-by: Martin Jones Change-Id: I34a623b49ce0fd5c05ae7a7ea5d0437c107b8a9b
* | Adding file required for ListView AutotestChristopher Ham2011-02-171-0/+42
| | | | | | | | | | | | | | | | The file was missed out in the previous commit. Change-Id: Ic8d055e9797b5da2ba1cb548984efc8c7e205751 Task-number: QTBUG-16010 Reviewed-by: Trust Me
* | GridView and ListView bug fixesChristopher Ham2011-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | ListView and GridView check before accessing an empty model. Fixed issue with undefined header. Current index initialised properly when dynamically creating ListModel items with javascript. Change-Id: I121c0626db6eb7ccaab689dfc750e0d03773d90f Task-number: QTBUG-15877 Reviewed-by: Joona Petrell
* | Righ-to-left support for GridView and ListViewChristopher Ham2011-02-151-0/+42
|/ | | | | | | | | GridView and ListView can now be laid out right-to-left. The behaviour should be identical and mirrored to the oridinary behaviour. Change-Id: I8e55c5f88358042caa5201712ef239cd67628172 Task-number: QTBUG-15877 Reviewed-by: Joona Petrell
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7Bea Lam2011-02-092-0/+116
|\ | | | | | | | | | | | | Conflicts: tests/auto/declarative/qdeclarativemoduleplugin/qdeclarativemoduleplugin.pro Change-Id: I8da521f05ebc266d91caa582852155b571d5cc63
| * Ensure section delegates are updated when the section property changes.Martin Jones2011-02-072-0/+116
| | | | | | | | | | | | | | | | | | If the section property changes and the existing section delegate is reused the section property in the delegate must be updated. Change-Id: I6c3dcdb697e80e1ab5162a179da52e0a0f41144c Task-number: QTBUG-17068 Reviewed-by: Bea Lam
* | Call onAdd() for first items added to ListView and GridViewBea Lam2011-02-092-4/+146
|/ | | | | | | | | | | | The bug was caused by the fact that the itemsInserted() implementation in ListView and GridView returned early for cases where (model->count() <= 1) and so did not call onAdd() unlike for other cases. This change also fixes some incorrect values in the header() and footer() unit tests for ListView and GridView. Change-Id: I24f5c86afcd62c26e17b0932f257f4767a287b8e Task-number: QTBUG-15642 Reviewed-by: Martin Jones
* Changing header or footer failed to delete the previous.Martin Jones2011-02-023-1/+46
| | | | | | | | Also ensure that the view is repositioned if the change of header results in the view being out of bounds. Task-number: QTBUG-16522 Reviewed-by: Michael Brasser
* Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into qtquick11Bea Lam2011-01-271-0/+13
|\ | | | | | | | | | | Conflicts: src/declarative/graphicsitems/qdeclarativegridview.cpp src/declarative/graphicsitems/qdeclarativelistview.cpp
| * positionViewAtIndex can fail when positioned near end of list.Martin Jones2011-01-211-0/+13
| | | | | | | | | | | | | | | | | | We positioned the view beyond the bounds, which in some cases resulted in only one item being created. Combined with a bug in the bounds fixup very many items were created. Task-number: QT-4441 Reviewed-by: Michael Brasser
* | Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into qtquick11Martin Jones2011-01-193-3/+3
|\ \ | |/
| * Update copyright year to 2011.Jason McDonald2011-01-103-3/+3
| | | | | | | | Reviewed-by: Trust Me
* | Add methods to position view at beginning or end.Martin Jones2011-01-112-0/+68
|/ | | | | | | Takes into account header/footer. Task-number: QTBUG-16213 Reviewed-by: Michael Brasser
* Models which load incrementally via fetchMore() don't work.Martin Jones2010-12-234-1/+187
| | | | | | | | Call canFetchMore()/fetchMore() on setModel(), setRootIndex() and when the last item is created. Task-number: QTBUG-16039 Reviewed-by: Bea Lam
* Removing all visible items in ListView resulted in blank view.Martin Jones2010-12-221-1/+2
| | | | | | | | | When delayRemove is true and all visible items are tagged to be removed the visibleIndex became invalid and refill() began filling from 0. Task-number: QTBUG-16183 Reviewed-by: Michael Brasser
* Add tests for ListView.indexAt() and GridView.IndexAt()Martin Jones2010-12-211-0/+33
|
* Ensure ListView contentHeight is set to a valid size.Martin Jones2010-12-132-0/+57
| | | | | | | | | If the view height is 0 no items will be created so the contentHeight can not be estimated. The currentItem is usually created, so it is possible to use that to estimate. Task-number: QTBUG-16037 Reviewed-by: Bea Lam
* highlightFollowsCurrentItem: false was not always honoredMartin Jones2010-12-092-3/+10
| | | | | | | | In some cases ListView and GridView would position the highlight despite highlightFollowsCurrentItem: false being specified. Task-number: QTBUG-15972 Reviewed-by: Michael Brasser
* ListView: Fix calculation of currentItem position when out of view.Martin Jones2010-12-082-1/+94
| | | | | | | | The calculation of position of currentItem when it is out of the visible area was bogus. Task-number: QTBUG-15525 Reviewed-by: Bea Lam
* ListView header is not visible initially.Martin Jones2010-12-012-18/+82
| | | | | | | | | If the header size was not set explicitly, but determined implicitly from Text height, the view was not positioned so that the header was visible when first shown. Task-number: QTBUG-15599 Reviewed-by: Bea Lam
* Ensure header is considered when positioning content with snapping.Martin Jones2010-11-302-0/+62
| | | | | | | | | When snapping is enabled the header was ignored and content would be aligned with the first item rather than the header, when at the top of the view. Task-number: QTBUG-15710 Reviewed-by: Bea Lam
* Avoid lockup in ListView when animating delegates.Martin Jones2010-11-242-0/+52
| | | | | | | | | | Animating delegates results in the content height changing, which may result in fixup being called if at the ends of the view, which may in turn cause refill to be called, which will change the content height, which repeats. Prevent this recusion from happening. Task-number: QTBUG-14821 Reviewed-by: Bea Lam
* ListView: items with size < 1.0 were layed out incorrectly.Martin Jones2010-11-152-0/+62
| | | | | | | | If the size of an item was less than one its endPosition() was less than its position(), which caused incorrect layout (overlapping items). Task-number: QTBUG-15242 Reviewed-by: Yann Bodson
* ListView item insertion didn't handle delayed item removal correctly.Martin Jones2010-10-201-0/+9
| | | | | | | | | The delayed removal items weren't handled correctly by mapRangeFromModel() function. Use mapFromModel() instead which gives us what we actually want and remove unused mapRangeFromModel(). Task-number: QTBUG-14471 Reviewed-by: Michael Brasser
* Fix consistency of setting currentIndex in ListView and GridView.Martin Jones2010-10-142-0/+94
| | | | | | | | | | | The behaviour of setting the currentIndex out of bounds, was different depending upon whether it was set -ve, beyond the end, or before component completed. The behaviour is now consistent - setting the currentIndex out of bounds is allowed and will cause the currentItem and highlightItem to become null. Task-number: QTBUG-12571 Reviewed-by: Michael Brasser
* Remove debug code added by 650a0078e2cef43eff107fe8d2505f64a0bfedf0Martin Jones2010-10-131-3/+0
| | | | Task-number: QT-4093
* Update sections if model content changes.Martin Jones2010-10-121-0/+11
| | | | | | | | We didn't handle the section property changing, e.g. due to asynchronous model. Task-number: QT-4093 Reviewed-by: Aaron Kennedy
* emit currentSectionChanged when section changes in ListView.Martin Jones2010-10-081-0/+6
| | | | | Task-number: QTBUG-13981 Reviewed-by: Michael Brasser
* Replace all occurances of "Qt 4.7" with "QtQuick 1.0"Aaron Kennedy2010-09-2911-12/+12
| | | | | Task-number: QTBUG-13799 Reviewed-by: Martin Jones
* Add test for view velocity update on setCurrentIndex()Martin Jones2010-09-131-0/+2
| | | | Task-number: QTBUG-13543
* Add test for ListView positioning when all visible items are removed.Martin Jones2010-09-051-1/+30
| | | | Task-number: QTBUG-12664
* Ensure Flickable visibleArea is updated when view height changesMartin Jones2010-08-312-0/+49
| | | | Task-number: QTBUG-13095
* Handle layoutChanged() properly in QML views.Martin Jones2010-08-261-1/+1
| | | | | | Update all visible items when layoutChanged() is emitted. Task-number: QTBUG-13146
* Fix ListView and GridView tests following off-by-one fixes.Martin Jones2010-08-261-1/+1
| | | | | | Our tests were verifying incorrect positions... Task-number: QTBUG-12822
* Fix ListView.view attached property with VisualItemModelMartin Jones2010-08-262-3/+4
| | | | | | | | We assumed that the attached object was created at the same time as the item. Task-number: QTBUG-13166 Reviewed-by: Aaron Kennedy
* Position GridView and ListView footer correctly when model cleared.Martin Jones2010-07-142-0/+62
| | | | Task-number: QTBUG-12167
* Add ListView.nextSection attached propertyMartin Jones2010-06-302-5/+12
| | | | | | and also renamed ListView.prevSection to ListView.previousSection Task-number: QTBUG-11372
* Update tests following QDeclarativeFlickable::viewport() -> contentIem()Martin Jones2010-06-241-122/+122
|
* Ensure the view is correctly positioned at component complete.Martin Jones2010-06-232-16/+18
| | | | | | If a currentIndex has been specified, ensure the view starts at the correct position immediately, rather than scrolling to it after startup.
* Fix crash when changing ListView model with highlightRangeMode: ↵Martin Jones2010-06-091-0/+8
| | | | | | ListView.StrictlyEnforceRange Task-number: QTBUG-11328
* Make declarative autotests compile on Symbian abld build systemJoona Petrell2010-06-082-3/+6
| | | | | Task-number: Reviewed-by: Martin Jones