aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* | Move ListModel and ListElement to the QtQml importAlan Alpert2013-01-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | They're already in the QtQml module, but were left in the QtQuick import because they were considered to be of minimal use without QtQuick types. QtQml types are being developed would could make ListModel useful without QtQuick, indicating that they should no longer be considered QtQuick depedent. Change-Id: I31499f2cc23baf4bc70fb451ba164408bed89ff6 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* | Complete rewrite of threaded render loop.Gunnar Sletta2013-01-181-1/+2
|/ | | | | | | | | | | | | | | | This change starts using the superior implementation of the scene graph render loop which has been worked on in the scenegraph-playground project for a while. It uses a far more straightforward locking/sync paradigm compared to the existing one and is less deadlock and error prone. It also enables the scene graph thread to run on its own when the GUI thread is blocked, enabling threaded animations. This changes also introduces a naming change inside Qt Quick from "Window Manager" -> "Render Loop" as that fits better to what the code does. Change-Id: I1c2170ee04fcbef79660bd7dae6cace647cdb276 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix compiler warnings in declarative tests.Friedemann Kleint2012-12-201-0/+1
| | | | | | | | | | | | - Unused variables - Missing enumeration values in switch - truncation from double to float - truncation from size_t to int - Missing initializers - Mix of operator & and bool | Change-Id: Ib212aeea41befef193f12300a1d9814a60f183af Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Renamed QQuickItem::pos property to positionShawn Rutledge2012-11-291-22/+22
| | | | | | | | | Abbreviated property names are less descriptive so we don't have many of them. Might as well be consistent. QWindow::pos was already renamed. Change-Id: Ib52673e68e7dc902b2f8942dba6b899074b2538b Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* All QWindow properties that have "window" in them have been renamed.Shawn Rutledge2012-11-081-2/+2
| | | | | | | Depends on patch Ie4424ec15fbdef6b29b137f90a2ae33f173edd21 in qtbase. Change-Id: I9614cc2c7ed119c663b3f6f99267483e291e529c Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Fixed instances of "to to" in qtdeclarative.Samuel Rødal2012-09-241-1/+1
| | | | | | | Really it should just be "to". Change-Id: I3263c8d6ce2f0ad33ab12d7ddb9202beac578f91 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add SnapPosition mode to positionViewAtIndex() in List/GridView.Martin Jones2012-07-271-277/+148
| | | | | | | | | | 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>
* Remove QListModelInterface.Andrew den Exter2012-07-251-7/+7
| | | | | | | | | | Implement ListModel and XmlListModel using QAbstractListModel instead. Task-number: QTBUG-15728 Change-Id: I14e03d90883d341f4b1d89c1e9fc9dc1534fde78 Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* QtQuick: Remove usages of qWaitForWindowShown(QWindow *).Friedemann Kleint2012-07-241-1/+1
| | | | | Change-Id: I722e20b2fb8d8c6c19c6f3f2cb16910d7433e9a4 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Changing model after componentComplete should reset currentIndexMartin Jones2012-07-231-5/+16
| | | | | | | | When the model is changed reset currentIndex back to 0. Task-number: QTBUG-26604 Change-Id: I1934e083819537d416acd85c75362daff382aa04 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* QtDeclarative: Remove usage of deprecated qWaitForWindowShown().Friedemann Kleint2012-07-191-2/+2
| | | | | | | | | | | - Replace by qWaitForWindowExposed() or qWaitForWindowActive() where applicable. - Use QVERIFY to verify success. - Stabilize some tests by checking for 'active', add missing call to show(). Change-Id: I6cae063e44a3839760ed9f61dacb26cd1717118d Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QQuickCanvas renamesAlan Alpert2012-07-171-416/+416
| | | | | | | | | | | | | | | | QQuickCanvas is now called QQuickWindow QQuickCanvas::rootItem is now QQuickWindow::contentItem QQuickItem::canvas is now QQuickItem::window QQuickItem::ItemChangeData::canvas is also renamed window QQuickCanvas::grabFrameBuffer is now QQuickWindow::grabWindow The functions related to the color property have dropped the clear from their names. The first three changes have interim compatibility measures in place to ease the transition. Change-Id: Id34e29546a22a74a7ae2ad90ee3a8def6fc541d2 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Use qWaitForWindowActive() where it is required.Friedemann Kleint2012-07-091-1/+2
| | | | | | | | | | | Prepare a change in qtbase in which the implementation of qWaitForWindowShown() will be changed to qWaitForWindowExposed() instead of qWaitForWindowActive(). Try to stabilize further tests by introduing wait functions instead of calls to qApp->processEvents(). Change-Id: I9825885430d78be1610a3fe20023fad24aaacba9 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix crash in tst_qquicklistview.Andrew den Exter2012-06-261-0/+10
| | | | | | | | Destroy the shared canvas before QGuiApplication is destroyed. Task-number: QTBUG-26244 Change-Id: I9aa59bae5314f51c84a61821af2fb3c7a1c77941 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Rename Flickable x/yOrigin to originX/YBea Lam2012-06-221-16/+16
| | | | | | | | This is consistent with the naming of other x/y properties, e.g. contentX/Y, relativeX/Y etc. Change-Id: I5159f8e54a6fda6a1f83a563ea9db47c3b8af238 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix warnings in declarative tests.Friedemann Kleint2012-06-201-2/+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>
* Set a non-zero default cacheBuffer.Martin Jones2012-06-131-1/+6
| | | | | | | | | | 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>
* Performance should always be better with cacheBufferMartin Jones2012-06-081-49/+49
| | | | | | | | | | | | | 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/+9
| | | | | | | | 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>
* Fix nested GridView key navigation with a single row or column.Andrew den Exter2012-05-291-0/+19
| | | | | | | | | | Don't ignore key events when the currentIndex is unchanged due to wrapping. . Task-number: QTBUG-21999 Change-Id: Idc82d472ca7ec495669207761bfe7de58b8781f9 Reviewed-by: Bea Lam <bea.lam@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-281-0/+21
| | | | | | | | | | 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-19/+40
| | | | | | | | | | 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>
* Only run populate for items in model at creationBea Lam2012-04-231-24/+20
| | | | | | | Don't run for items added in Component.onCompleted. Change-Id: I58745ab989efae168d036875cb2fb88e3e2db0c3 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* QtDeclarative: No longer use QDeclarative compatibility defines.Friedemann Kleint2012-04-201-1/+2
| | | | | Change-Id: Icbd9777cf1d978468c8023712ed90cd3c7dda56f Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Vertical layout direction for ListView and GridViewBea Lam2012-04-171-512/+1157
| | | | | | | | 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-9/+36
| | | | | | | | | 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>
* Measure offsets by rows instead of pixelsBea Lam2012-04-131-163/+202
| | | | | | | Will make it easier to test multiple flows and layout directions. Change-Id: I33cabb650f65a2fd2932d23d501bf250d71ef80d Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Fix imports in GridView testMartin Jones2012-03-281-2/+11
| | | | | | | | Were still importing QtQuick 1.0 and not checking whether the components were created. Change-Id: Ie42e5d1b3a134af39c62c5eb54a1d620c59cefee Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Fix margins for right-to-left modeBea Lam2012-03-211-11/+12
| | | | | | | | | | | | | | | 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/+146
| | | | | | | Geometry listeners were called for deleted header/footer. Change-Id: I47854178232f8a4ab5e19a931901b49741fec388 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Windows: Fix file URL issues in declarative autotestsMiikka Heikkinen2012-03-151-1/+1
| | | | | | | | | | Fixed by using testFileUrl() shared utility function where appropriate instead of testFile() or various other ways file URLs were being incorrectly used. Task-number: QTBUG-24779 Change-Id: I48cbd297d419238f42ea45132344b7e5a487b6f1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Reuse QQuickView in GridView table driven testsMartin Jones2012-03-141-40/+88
| | | | | | | | Makes the tests run faster since we're not waiting for a window to appear all the time. Change-Id: Id2442cf32055084088c19865499055c7282bcae0 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Speed up view flick tests.Martin Jones2012-03-131-18/+17
| | | | | 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-131-0/+50
| | | | | | | | | | | | 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-6/+33
| | | | | | | | | 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/+6
| | | | | | | | | | | | | | 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/+15
| | | | | | | | | | | 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-13/+2
| | | | | | | | | | | | | | | | 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-051-7/+242
| | | | Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-0/+5075
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>