aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qtquick2/qquicklistview
Commit message (Collapse)AuthorAgeFilesLines
* Separate out some of the common test codeBea Lam2012-02-072-414/+65
| | | | | | | | | Moves findItem, findItems() etc. into shared/visualtestutil.h and moves duplicate list model test classes and other common view-specific code into shared/viewtestutil.h. Change-Id: Ia79bc4df1ab7fb618597755c0288a2e8f5054faf Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Section header is not made visible when changing currentIndex.Martin Jones2012-02-071-0/+7
| | | | | | | | | Make section header visible when setting currentIndex to an item on a section boundary. Could also affect initial position if view size started at 0. Change-Id: Ie65f91826311d34a290d369d8956f1c88f7efb70 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Incorrect initial pos after resizing view with margins.Martin Jones2012-02-023-0/+96
| | | | | | | | | | The currentItem tracking didn't position the view to show the margins. This affects resizing the view and also changing currentIndex. Task-number: QTBUG-24028 Change-Id: I47d4c771c0d712c93abadfb6b2deb5194241fb6b Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-303-3/+3
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: If39bd256b0fa85eba17ea30f8ab87ea27d758908 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-233-3/+3
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I6a730abc0c396fb545a48b2d6938abedac2e3f1c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Fix lockup in views due to endless polish loop.Martin Jones2012-01-201-7/+6
| | | | | | | | | | | | | It was possible to cause an endless polish loop in some rare cases. Eliminate all calls to polish() within existing polish() code paths. Cleanup delegate creation and cancelling in the cacheBuffer area. Adjust first item position correctly when inserting/removing before visibleItems list. Change-Id: I508a2e6de8cb09d904466cbf5fb6b5dfd1e89c49 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Insertions were calculating wrong insertion posBea Lam2012-01-181-0/+21
| | | | | | | | | | | | | | | | | | | | | | | After removes, and after each insertion, the view must adjust the visibleItems.first() position and call layoutVisibleItems() to ensure that the correct insertion position is calculated for insertions that follow. When applyInsertionChange() in GridView and ListView calculates the position for item insertion, it looks at the current positions of the items in visibleItems, so these positions must be updated prior to this calculation. Otherwise, insertions that follow a remove may not calculate this position correctly and will neglect to add some items, and multiple insertions may unnecessarily create items at positions that are not actually visible. resetFirstItemPosition() is changed to take a set position and it replaces resetItemPosition() since it can do the same thing. Task-number: QTBUG-23610 QTBUG-23609 Change-Id: I8839ee7d15853301435e80c0dc563f93fc3605cf Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Handle views with negative width/heightMartin Jones2012-01-161-0/+35
| | | | | | | | | A view with a negative d->size() would get stuck in an infinite loop. Also make sure item layout/visibility is updated when the view size changes. Change-Id: I1f16a714ecebe1c4b71902c460e27fb0f1c4406f Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Add tests for item polish bug on MacBea Lam2012-01-131-1/+3
| | | | | | | | | | | | | On Mac OS X, if a QQuickItem triggers a polish request from Component.onCompleted, its updatePolish() function is not called. The tst_qquickitem::polishOnCompleted() test demonstrates this. If a running animation is added to the polishOnCompleted.qml in the test, the test will pass. Task-number: QTBUG-23481, QTBUG-23480, QTBUG-21590 Change-Id: I172b12e784aa458c43c23e0ee43f034f0bd332ee Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Use QGuiApplication, not QApplication, in testsDamian Jansen2012-01-131-4/+4
| | | | | Change-Id: I7802293e6cafb90686c103972bc036cf74184714 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Disable an unstable test.Gunnar Sletta2012-01-121-0/+1
| | | | | Change-Id: I2f346ce26bfb23e148cb5b0ad73a934930a4fdf7 Reviewed-by: Matthew Cattell <matthew.cattell@nokia.com>
* QQuickListView is unstable when run as parallelGunnar Sletta2012-01-091-1/+0
| | | | | Change-Id: I4d7e31e69f4b71d5ecf2113b90343e10320e8056 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix positioning issues and change content y repositioning behaviourBea Lam2012-01-091-13/+218
| | | | | | | | | | | | | | | | | | | | | | | Refactor the code for re-positioning the visibleItems.first() in QSGItemView::applyModelChanges() and fix various positioning issues. The positioning behaviour for removing items at the start of the view has changed. This action will no longer cause the content y to move down; previously the content y would always move down unless another item was moving backwards to the first visible position. This will make it easier to implement built-in removal transitions for the views, since removed items cannot be animated if the content y jumps down past them. Additionally, moving items from before a GridView should not cause the top item in the view to move upwards and out of the view. This also adds additional remove tests and fixes the tst_QQuickGridView::moved() test which wasn't waiting for the polish event after setting the content y, which caused some of the tests to pass even though their test data was wrong. Change-Id: Idad11a73a18f88208e73a52111ed839458e05f2d Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add itemAt(x,y) function to GridView and ListView.Martin Jones2012-01-061-7/+27
| | | | | | | Task-number: QTBUG-21592 Change-Id: I3169e789da701ce261250421239584abd7f29b57 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Skip failing autotestsAaron Kennedy2012-01-051-0/+8
| | | | | | Task-number: QTBUG-23481 Change-Id: I719cf1fa7cd3b1f3475a629312ed5fba1511c8ec Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-053-3/+3
| | | | | Change-Id: I0a8d99909cac867dce72da70b1bbcb649989a51b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Make tst_QQuickListView::margins() more reliableBea Lam2012-01-051-1/+2
| | | | | Change-Id: Ib66f5717316b4c8d71dbef408afbbb9b0698ad7a Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix test failures with shadow builds.Andrew den Exter2012-01-031-4/+4
| | | | | | | | | | QFINDTESTDATA uses __FILE__ to determine the source directory, which means it finds the wrong source directory when the macro is used from a shared base class. Define the correct source directory in a pri file and include that wherever QDeclarativeDataTest is used. Change-Id: If3ef435f4bb3049733f49402338303c8b440f1fa Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* QDeclarative tests: Introduce base class for data tests.Friedemann Kleint2011-12-212-89/+81
| | | | | | | | | | | | | | | | | In tests/auto/shared/util.* replace macros/find functions by a base class QDeclarativeDataTest with accessors for the data directory helper functions to create URLs from it. The class relies on QFINDTESTDATA, which is the standard way of locating test data. Using the class should reduce the number of calls to QFileInfo.exists(), etc significantly. In addition, provide utility functions for messages. Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Change-Id: Id2beacb157922ee9412f9e45cf9695cec1f8379a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Ensure items in ListView and GridViews viewport are visible.Andrew den Exter2011-12-202-4/+237
| | | | | | | | | Unrequested items and items in the cache buffer are hidden by the views. Make these items visible again if they enter the viewport due to a relayout. Change-Id: I574d1513e88c31c3c01a4a20ac77c21111279d3e Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Fix compilation due to header changesSergio Ahumada2011-12-171-1/+1
| | | | | | | | | | - Fix QtGui/QApplication => QtWidgets/QApplication - Fix QtGui/QStylePlugin => QtWidgets/QStylePlugin - Fix QtWidgets/QStringListModel => QtCore/QStringListModel - Fix QtWidgets/qstringlistmodel.h => QtCore/qstringlistmodel.h Change-Id: I8df28f032f039107b900c81be27d2d6e5e69e06e Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Don't emit model reset on completing a VisualDataModel.Andrew den Exter2011-12-153-36/+324
| | | | | | | | | The views try and retain their current state as much as possible on a reset which prevents the current item being set to a valid item as would happen if the VisualDataModel was completed before the view. Change-Id: I593a850aeeb58846ab500f193487db4033e26399 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Add tests for snapOneItem/snapOneRow snapModeMartin Jones2011-12-062-0/+162
| | | | | | Change-Id: Ia7e8fe6a7da48d8f67914d90377c6fad32ecb415 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Say hello to QtQuick moduleKent Hansen2011-12-0232-0/+5808
This change moves the QtQuick 2 types and C++ API (including SceneGraph) to a new module (AKA library), QtQuick. 99% of this change is moving files from src/declarative to src/quick, and from tests/auto/declarative to tests/auto/qtquick2. The loading of QtQuick 2 ("import QtQuick 2.0") is now delegated to a plugin, src/imports/qtquick2, just like it's done for QtQuick 1. All tools, examples, and tests that use QtQuick C++ API have gotten "QT += quick" or "QT += quick-private" added to their .pro file. A few additional internal QtDeclarative classes had to be exported (via Q_DECLARATIVE_PRIVATE_EXPORT) since they're needed by the QtQuick 2 implementation. The old header locations (e.g. QtDeclarative/qquickitem.h) will still be supported for some time, but will produce compile-time warnings. (To avoid the QtQuick implementation using the compatibility headers (since QtDeclarative's includepath comes first), a few include statements were modified, e.g. from "#include <qsgnode.h>" to "#include <QtQuick/qsgnode.h>".) There's a change in qtbase that automatically adds QtQuick to the module list if QtDeclarative is used. Together with the compatibility headers, this should help reduce the migration pain for existing projects. In theory, simply getting an existing QtDeclarative-based project to compile and link shouldn't require any changes for now -- but porting to the new scheme is of course recommended, and will eventually become mandatory. Task-number: QTBUG-22889 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Change-Id: Ia52be9373172ba2f37e7623231ecb060316c96a7 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>