aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Correctly set ending path percent if none is provided.Michael Brasser2011-07-292-0/+21
| | | | | | | | Task-number: QTBUG-19818 Change-Id: I5377551d041b593864d56e4449c133deb47d3b45 Reviewed-on: http://codereview.qt.nokia.com/2358 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Clicking on a disabled ListView's delegate breaks mouse interactionMartin Jones2011-07-294-0/+127
| | | | | | | | | | A disabled Flickable should not filter children. Change-Id: I9f0d8fbfd0922b5c6a9eaffa69212867359f79e0 Fixes: QTBUG-20584 Reviewed-on: http://codereview.qt.nokia.com/2354 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Add .arg() for Javascript String typeCharles Yin2011-07-292-1/+25
| | | | | | | | | Change-Id: I973032189c40bfa4d5450396f5bad1a7c81ac68b Task-number:QTBUG-16734 Reviewed-by:Michael Brasser Reviewed-on: http://codereview.qt.nokia.com/2134 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* XmlListModel.status is Ready right after creation (should be Null)Charles Yin2011-07-291-2/+8
| | | | | | | | | | | And whenever both the source the xml properties are empty, the status should be Null as well. Change-Id: I62936d9389b524833422a871b596b99cc93cc734 Task-number:QTBUG-18724 Reviewed-by:Michael Brasser Reviewed-on: http://codereview.qt.nokia.com/2231 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Allow Qt enum values in ListElement.Michael Brasser2011-07-281-0/+4
| | | | | | | | | Task-number: QTBUG-16547 Change-Id: Id215cea5cdaaaef8ff8a06a0bde682f95c91e416 Reviewed-by: Aaron Kennedy Reviewed-on: http://codereview.qt.nokia.com/2227 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Support QT_TRANSLATE_NOOP in ListElement.Michael Brasser2011-07-281-7/+50
| | | | | | | | Task-number: QTBUG-16289 Change-Id: I13e6859de185478e2c6c9486d8deeda103dd7b90 Reviewed-on: http://codereview.qt.nokia.com/2238 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Fix translation context for QML files.Michael Brasser2011-07-284-1/+33
| | | | | | | | | | | Use the base file name as done in QtQuick 1, rather than using the entire path. This also fixes QTBUG-17255 for QtQuick 2. Change-Id: Ia27f6539f82d6caf6e7060b89ff1996d42ffb9cb Reviewed-on: http://codereview.qt.nokia.com/2246 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix bug 20505: Offline Storage API: wrong types of row fieldsCharles Yin2011-07-281-0/+18
| | | | | | | | | | fields types should be returned as same as defined, not strings. Change-Id: I9a0d03acb79850e93cc9266e2595ee61af2089a0 Task-number:QTBUG-20505 Reviewed-on: http://codereview.qt.nokia.com/2065 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix auto-repeat key navigation for GridViewBea Lam2011-07-282-0/+56
| | | | | | | | | | | | | Shouldn't set moveReason=SetIndex in key navigation. ListView didn't do this in its keyPress implementation. Added extra tests for GridView and ListView. Task-number: QTBUG-20408 Change-Id: Iaf0f331d3ba4f037c5bbc0a41418dd656b5a3695 Reviewed-on: http://codereview.qt.nokia.com/2318 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* ListView doesn't show new 1st item currentItem is removed.Martin Jones2011-07-282-2/+16
| | | | | | | | | | | | | If the new 1st item becomes the currentItem after removal it was positioned incorrectly because the currentItem is positioned based on visibleIndex, which was updated after the currentItem was updated. Move visibleIndex update before currentItem update. Change-Id: Iaf92a41eefe7bce093e3000d17f5496dba144bcd Fixes: QTBUG-20575 Reviewed-on: http://codereview.qt.nokia.com/2316 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Add dragging properties to FlickableMartin Jones2011-07-281-0/+111
| | | | | | | | | | | | This allows the user to determine when a movement is due to the user dragging the view directly, i.e. excluding any flick that occurs after the touch is released. Change-Id: Idf4b699946f808da6fa34ec21a3d2cb2f0ec9de6 Fixes: QTBUG-19685 Reviewed-on: http://codereview.qt.nokia.com/2310 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Fix moving of multiple items, and moving items backwardsBea Lam2011-07-282-0/+124
| | | | | | | | | | | | | | To fix backward movements, all backward movements are now flipped into forward movements (as is done in ListModel implemenation). Movement of multiple items wasn't working as views weren't removing the right indexes in these cases. Task-number: QTBUG-19208 Change-Id: I9866ddabc241c066bb77329a6761d500d79aaf61 Reviewed-on: http://codereview.qt.nokia.com/2262 Reviewed-by: Bea Lam <bea.lam@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Fix XmlHttpRequest setHeader bugCharles Yin2011-07-2813-13/+63
| | | | | | | | | | | Setting XMLHttpRequest raw header makes header name uppercase, the name should be kept as it is. Task-number:QTBUG-20472 Change-Id: I8aa8988d6d18d71ee71a7d2f9c3246b20f006f3c Reviewed-on: http://codereview.qt.nokia.com/2225 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* A change in ListView's header height can cause it to overlap the itemsMartin Jones2011-07-281-0/+32
| | | | | | | | | | | If there are no visibleItems the header has no choice but to set visiblePos to a value after itself. Change-Id: I7748db46272989e421eeca88577b6fcf79814b5b Fixes: QTBUG-19844 Reviewed-on: http://codereview.qt.nokia.com/2254 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Fix insertion of one item in ListView.Martin Jones2011-07-282-0/+16
| | | | | | | | | | Off-by-one meant that the item was not created by the ListView. Change-Id: If9658487a615e189c21c419e4d29e7e709e05cef Fixes: QTBUG-19675 Reviewed-on: http://codereview.qt.nokia.com/2251 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bea Lam <bea.lam@nokia.com>
* The views have many +/- 1 which are causing errors.Martin Jones2011-07-281-2/+0
| | | | | | | | | | | Remove them all. endPosition() etc. now refer to the position() + size() rather than position() + size() - 1. Change-Id: I6ddf98def39971ee2e2c3c2d0a1df97781290782 Fixes: QTBUG-20020 Reviewed-on: http://codereview.qt.nokia.com/2243 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Fix crash when a model defines its own modelData role.Andrew den Exter2011-07-281-2/+24
| | | | | | | | | | | Don't create a duplicate modelData property if one has already been created from the model's roles. Task-number: QTBUG-18801 Change-Id: Ic46763a9dc067cfb53b0655d991c553b3b10f023 Reviewed-on: http://codereview.qt.nokia.com/2312 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Update ListModel's internal indexes when items are inserted/removed.Andrew den Exter2011-07-281-1/+26
| | | | | | | | | | | | The changed signals of cached items were being emitted with incorrect indexes if a previous item in the list was inserted or removed, resulting in changes not being reflected in views. Task-number: QTBUG-20286 Change-Id: Id2fb8e2875c6cbd4f2e4d14ef859b7a7a4bac8d9 Reviewed-on: http://codereview.qt.nokia.com/2252 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Don't clip the cursor at the far right of a TextInput.Andrew den Exter2011-07-281-0/+6
| | | | | | | | | | | | | | The cursor is allowed to exceed the boundaries of a TextInput so that the text alignment is consistent with the Text element and the bounding rect of TextInput is expanded to allow for that. To avoid clipping the contentSize also needs to be expanded, and the horizontal scrolling should be calculated against the non-expanded size. Task-number: QTBUG-18818 Change-Id: I09e3a7aff9c2e8a333e8a3f9796683563b3e124a Reviewed-on: http://codereview.qt.nokia.com/2242 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix positioning of items after moveBea Lam2011-07-282-104/+248
| | | | | | | | | | | | | | | | | | | | | | If a move happened after a contentY change but before a refill, the position of the first visible item wasn't calculated correctly. If the first item from visibleItems was above the content start position and a move operation caused the items below it to move away, this first item was not being moved to the correct position (i.e. above the next available visible item) causing the following visible items to be positioned incorrectly on the next refill. ListView supported this previously but only adjusted positioning for items before the content position, instead of for all moved items. Fixed for both ListView and GridView and added more move-related tests. Task-number: QTBUG-20528 Change-Id: I2ba1a2f5e49f790e694c6e1486f649f10d09c256 Reviewed-on: http://codereview.qt.nokia.com/2261 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Don't move view content position item 0 is being replacedBea Lam2011-07-282-0/+56
| | | | | | | | | | | Usually if item 0 moves down, the next item becomes the first visible item and all content moves down. Don't do this if another item is moving up to take its place. Change-Id: If625cfc0eaa70fd1094c7bc0fdd29f5f56766a42 Reviewed-on: http://codereview.qt.nokia.com/2260 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* increase the tryCompare timeout value to make the CI happyCharles Yin2011-07-281-3/+3
| | | | | | | Change-Id: I9561213295969f3064637584f45deb66f56c071b Reviewed-on: http://codereview.qt.nokia.com/2309 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Charles Yin <charles.yin@nokia.com>
* Fix Column/Row size when no items being positionedAlan Alpert2011-07-272-0/+63
| | | | | | | Change-Id: I0bf55c13e55856dd7292e5eda159086096dea86b Reviewed-on: http://codereview.qt.nokia.com/2158 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Don't build V8 as a static libraryKent Hansen2011-07-262-11/+6
| | | | | | | | | | | | In the future, we'll need to be able to export the V8 symbols from the QtDeclarative library, which requires compiling V8 straight in. It's not possible to achieve this using a static library. Change-Id: Ie9e31984d2c03639a311cef11ddd33ba0aa15fd9 Reviewed-on: http://codereview.qt.nokia.com/2187 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* A long press should allow onClicked if there is no onPressAndHoldMartin Jones2011-07-262-15/+52
| | | | | | | | | Fixes: QTBUG-19726 Change-Id: I896c9264c1cf408dcd533b5d6d463d53c785d787 Reviewed-on: http://codereview.qt.nokia.com/2155 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix crash when assigning a list property to transitions.Michael Brasser2011-07-264-0/+50
| | | | | | | | | | | | | | This fixes the crash, but doesn't actually assign any Transitions (the transitions list will now be empty, rather than contain a null Transition object). Correct assignment is a general language issue, and will be fixed separately. Task-number: QTBUG-20227 Change-Id: Ie224d06b1d8bb82d03c5eba378affb7167f08724 Reviewed-by: Alan Alpert Reviewed-on: http://codereview.qt.nokia.com/2152 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Add headerItem and footerItem properties to views.Martin Jones2011-07-262-0/+29
| | | | | | | | | Fixes: QTBUG-19684 Change-Id: Iea7d4a4f902cc45cb0cca8e1221fdb993f0bebd2 Reviewed-on: http://codereview.qt.nokia.com/2151 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bea Lam <bea.lam@nokia.com>
* qmlviewer resizes the root object multiple times.Martin Jones2011-07-261-1/+23
| | | | | | | | | | | | | | In SizeRootObjectToView mode on initial load the view was set to root object size, then the sceneResized() slot would resize back, then we would finally reset back to the correct value in statusChanged(true). Now react directly to the initial size being set. Change-Id: Ib6977cf7bad3fe79b9ac80bb6d916fb0f57c5f5e Fixes: QTBUG-16499 Reviewed-on: http://codereview.qt.nokia.com/2148 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* QDeclarativeView/QSGView SizeRootObjectToView still resizes viewMartin Jones2011-07-265-0/+238
| | | | | | | | | | | Only resize view to object in SizeRootObjectToView if the view has not had a size set, i.e. at initial construction. Change-Id: Ic5ad3cbb3b071c3498047be893da2c7bf0957986 Fixes: QTBUG-15863 Reviewed-on: http://codereview.qt.nokia.com/2132 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Use visible only, and not opacity, in positionersAlan Alpert2011-07-264-27/+25
| | | | | | | | | Task-number: QTBUG-12940 Change-Id: Id637bbd7c30aea8bc23c2aeaccfb069a8de7955f Reviewed-on: http://codereview.qt.nokia.com/2082 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove onMousePositionChanged signal.Michael Brasser2011-07-261-1/+6
| | | | | | | | | | | | This signal was meant to be "private" (not directly used from QML). Provide separate signals for onMouseXChanged and onMouseYChanged. Task-number: QTBUG-18656 Change-Id: Iefc3d78e270db9c037bbb1b890925b4841f2d5fa Reviewed-by: Martin Jones Reviewed-on: http://codereview.qt.nokia.com/2142 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Reference resources to prevent crash (on some platforms)Aaron Kennedy2011-07-262-0/+19
| | | | | | | | | | Prevent the data blob from being deleted in done(). Task-number: QTBUG-18268 Change-Id: Ib265e6fc3e1539d0baf20e365c1f88f615b121dc Reviewed-on: http://codereview.qt.nokia.com/2138 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* AutotestAaron Kennedy2011-07-264-0/+25
| | | | | | | | | Task-number: QTBUG-16878 Change-Id: I0d074c13b32670697f4811060ddf4edbdf6c6451 Reviewed-on: http://codereview.qt.nokia.com/2133 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Update polish even when animations aren't runningAaron Kennedy2011-07-261-0/+38
| | | | | | | | Task-number: QTBUG-20078 Change-Id: I095a872d72da61248794ec4a2a85f91ee618cdbc Reviewed-on: http://codereview.qt.nokia.com/2063 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Move the cursor position to the end when TextInput.readOnly is cleared.Andrew den Exter2011-07-262-0/+10
| | | | | | | | | | Improves consistency with TextEdit. Task-number: QTBUG-18747 Change-Id: Ieb0a332441557fc6ba4c5ddaafea5c634aff1ee4 Reviewed-on: http://codereview.qt.nokia.com/2131 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Don't error if response results in UnknownContentErrorBea Lam2011-07-263-1/+8
| | | | | | | | | | | | | XMLHttpRequest specs state that only 'network errors' should result in a request error, and a HTTP response like 400 Bad Request (which results in QNetworkReply::UnknownContentError) is an indication of the HTTP server response rather than a network error. Task-number: QTBUG-20146 Change-Id: I10c132788200e15b0362da839689a0bb3c2b4a0d Reviewed-on: http://codereview.qt.nokia.com/1915 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* AutotestAaron Kennedy2011-07-254-0/+11
| | | | | | | | | Task-number: QTBUG-16026 Change-Id: Iafcd0ae99016ea684c162e54da1090417f781790 Reviewed-on: http://codereview.qt.nokia.com/2089 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Reverse lookup ids by object pointerAaron Kennedy2011-07-251-0/+32
| | | | | | | | Task-number: QTBUG-18554 Change-Id: Ia4effb629d19aa36b835f6c09a63d9495e5c26e7 Reviewed-on: http://codereview.qt.nokia.com/2079 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Use engine where appropriate in QDeclarativePropertyAaron Kennedy2011-07-251-1/+17
| | | | | | | | Task-number: QTBUG-14697 Change-Id: Id15def75271666699b1fe23e39991710afebff59 Reviewed-on: http://codereview.qt.nokia.com/2077 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Allow object to be accessed by multiple QDeclarativeEnginesAaron Kennedy2011-07-251-0/+37
| | | | | | | | | Task-number: QTBUG-18610 Change-Id: Idd9444018b5344586d6579ddac6a0ffd26bf7139 Reviewed-on: http://codereview.qt.nokia.com/2075 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Allow static alias to composite typeAaron Kennedy2011-07-254-0/+30
| | | | | | | | | Task-number: QTBUG-20200 Change-Id: I2a118dfc9ce1956e038f70049c905ec38396fe5e Reviewed-on: http://codereview.qt.nokia.com/2062 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Handle pinch correctly when one point is released and repressed.Martin Jones2011-07-252-0/+84
| | | | | | | | | | | | | The pinch is not finished at the time one point is released. Ensure that a onPinchStarted is called each time a repress happens, and that onPinchFinished is called when all points are released. Fixes: QTBUG-19632 Change-Id: I467dd612383f7dd11d58a9df063dd86860796216 Reviewed-on: http://codereview.qt.nokia.com/2059 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Support better boolean conversion semanticsAaron Kennedy2011-07-252-0/+50
| | | | | | | | | Task-number: QTBUG-20242 Change-Id: Ie678f6189a8060de600b5394fbaaaef49be274c6 Reviewed-on: http://codereview.qt.nokia.com/2061 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Fix unstable GridView testBea Lam2011-07-251-1/+2
| | | | | | | Change-Id: I1e1f1afe38cced3c85b3e20d37e9859b8304e69c Reviewed-on: http://codereview.qt.nokia.com/1729 Reviewed-by: Bea Lam <bea.lam@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Check objects can be passed as signal parametersAaron Kennedy2011-07-252-0/+32
| | | | | | | | | Task-number: QTBUG-12457 Change-Id: I2d78c8885e488e51364fe4f2a30bde36fa78636a Reviewed-on: http://codereview.qt.nokia.com/2057 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Correctly load flags for binding propertiesAaron Kennedy2011-07-253-0/+30
| | | | | | Change-Id: I80e79ff7de8d879f700f9f4fe96d796de0f17aff Reviewed-on: http://codereview.qt.nokia.com/2055 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Notify when the TextInput cursorRectangle property changes within pre-editAndrew den Exter2011-07-252-0/+11
| | | | | | | | | | Apply 452e13b5407fa4c36f9a573c305d41f551762b93 to scene graph items. Task-number: QTBUG-19089 Change-Id: I4501bdc940cbac9ba2ef068b87ded83b1c86976f Reviewed-on: http://codereview.qt.nokia.com/2054 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Always position headers at a negative positionBea Lam2011-07-217-92/+445
| | | | | | | | | | | | | | | | | | | | | | | | Previously headers were either positioned at 0 if there were no items in the view, or at (0 - headerSize) if items were present. With this fix they are always positioned at (0 - headerSize) to be consistent. Due to the change, setPosition(-headerSize()) is now called from componentCompleted() to ensure the header is visible. This change also fixes GridView's header and footer positioning in TopToBottom + RightToLeft mode. Also added extra tests for header and footer positioning and fixed incorrect test value in tst_QSGGridView::positionViewAtIndex() (was 460 instead of 430 because previously rowPosAt() always added the header size, so if positionViewAtIndex() jumped past all visible items and caused them to be released, the new items started at +headerSize() instead of 0). Change-Id: I1015bed457d4ae964a7fb13702e2dfc470a168a9 Reviewed-on: http://codereview.qt.nokia.com/1618 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Make lastPosition() result consistent among GridView and ListViewBea Lam2011-07-211-2/+2
| | | | | | | | | | | | | | | | | | | lastPosition() returns the end position of the last item so it should always include a -1 calculation for the last item (as FxListItemSG::endPosition() and FxGridItemSG::endPosition() do) to get the last edge pixel of the item. With this fix, both views now calculate startPosition() and endPosition() in the same way. This also fixes positioning of GridView items in TopToBottom+RightToLeft layouts. Incorrect test values in positionViewAtIndex_rightToLeft() test are fixed (the last edge of a 1-pixel border shouldn't be visible, since the bottom edge of a 1-pixel border is actually drawn outside, not inside, the Rectangle). Change-Id: I253c3836f871c61e13c08f67007ebc75e09378d6 Reviewed-on: http://codereview.qt.nokia.com/1547 Reviewed-by: Bea Lam <bea.lam@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Refactor ListView and GridView implementationsBea Lam2011-07-201-2/+2
| | | | | | | | | Places common code into QSGItemView. Change-Id: Ic310dbe7e16774163ba393860da64a0da7d4ea0a Reviewed-on: http://codereview.qt.nokia.com/1200 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bea Lam <bea.lam@nokia.com>