aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-241-18/+43
|\ | | | | | | | | | | | | Conflicts: src/quick/items/qquickrectangle.cpp Change-Id: Ia40bc0f2f08b5be68e32eb1e1f118445d20e44fc
| * Fix positioning of item when first cacheBuffer item is removed.Andrew den Exter2013-12-191-18/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | When items prior to the first visible item are removed from the instantiated items list the first item is moved forward by the size of the item removed so it position remains correct relative to the visible items. But if the removed item is the first instanitated item then it's size shouldn't contribute to the offset as the next instatiated item is already offset by its size. Task-number: QTBUG-33619 Change-Id: I05c33f505e2856afa08cd9cd89d8eae97c20679d Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-12-161-0/+23
|\| | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickitem.cpp src/quick/items/qquicktext.cpp tests/auto/quick/qquicklistview/tst_qquicklistview.cpp Change-Id: I0bc5786098193c2c40b6fd8905de75d90f6ed0cf
| * Set highlight size for both dimensions, irrespective of ListView orientationRobin Burchell2013-12-111-0/+21
| | | | | | | | | | | | | | | | | | | | | | The assumption that all list delegates are the same size (dependent on ListView orientation) is not a correct one, even if it is correct most of the time. Task-number: QTBUG-31626 Change-Id: Iba6f3bc5f38d60e3be7632ab17d0c66ab8e73965 Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au> Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
| * Set all attached section properties before emitting change signals.Martin Jones2013-11-301-0/+2
| | | | | | | | | | | | | | | | | | | | If we have bindings to the section properties, e.g. implementing manual section header creation, we want previousSection, section and nextSection to be set before emitting the change signals to prevent different results each time the binding is run. Change-Id: Id3a0b4a53419681f35102c9e7c620b5c6112ebb0 Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* | Add displayMarginBeginning/End to ListView and GridView.Martin Jones2013-12-111-0/+38
|/ | | | | | | | | | | This allows displaying content outside the visible area of the view. [ChangeLog][QtQuick] Add displayMarginBeginning/End to ListView and GridView. Change-Id: Idf9b5a0cd34a781c9603a9ad98ea189754972ba1 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Also update viewport size when header/footer size changesRobin Burchell2013-11-261-0/+30
| | | | | | | Task-number: QTBUG-24292 Change-Id: I8e7f5abe077b6e8d2ce6625dcf43a34a7260934e Done-with: Martin Jones <martin.jones@jollamobile.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Fix crash when assigning a null QObject or derived property as a ListView modelAndrew den Exter2013-11-241-0/+20
| | | | | | | | | | Fall through to the null case handler in the event of a QVariant of QObject or derived type with a null value, rather than asserting in the instance handler. Task-number: QTBUG-34999 Change-Id: I5eeffbe29a263c57e6157d516b138ddc8e2e7a95 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Reset on model layout changedAlbert Astals Cid2013-10-211-0/+22
| | | | | | | Otherwise the next dataChanged from the model may not be received Change-Id: I16b859d92fdb1823c4a56c297d4451abe438fbb1 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Stabilize and speed up testLars Knoll2013-09-281-43/+51
| | | | | | | | Added lots of missing qWaitForWindowExposed(), and sped up animations. Change-Id: Ie3c5e53dc9e9770baa05fb1da3eedce80ac52d31 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Try to stabilize the multipleTransitions testLars Knoll2013-09-281-0/+1
| | | | | Change-Id: Ifeb53d6a1334623106428410aa2756935d7ba6e1 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Stabilize tests using utilities from QQuickViewTestUtil.Friedemann Kleint2013-08-261-0/+6
| | | | | | | | | | | | | Change QQuickViewTestUtil::createView() to center the window on the screen to avoid taskbar areas. Add routine to move the mouse away and use that in tests using QQuickViewTestUtil::flick() and other mouse interaction since the mouse cursor can interfere with it. Affected tests: qquickgridview, qquickpathview, qquickflickable, qquicklistview, qquickrepeater and qquickpositioners. Task-number: QTBUG-33017 Change-Id: I540c0efb54a231dcb44c8fd5ad9573a2d4d4b9df Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Fix currentIndex in Qml itemView when assigning an empty modelNils Jeisecke2013-08-161-0/+5
| | | | | | | | | | When assigning an empty model to e.g. a ListView after component initialization has been completed, currentIndex is now correctly set to -1. Change-Id: I540c034944009ccb8894bf84f400658ef9f0371f Task-number: QTBUG-32838 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Resizing items out of the list viewport should not change the viewportAlbert Astals Cid2013-07-241-0/+38
| | | | | | | | Consider the old geometry, not the new one to check if an item was outside the viewport or not Change-Id: I108412d560faf86130044f3d091254c07af0c004 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* No longer apply pending changes when accessing ItemView propertiesAlan Alpert2013-04-261-28/+78
| | | | | | | | | | | | | Applying changes in the getters can lead to binding loops, and is currently inconsistently applied. Removing the applyPendingChanges calls from remaining getters, and adding a forceLayout() function for cases where the immediate-apply behavior is needed. Task-number: QTBUG-30555 Parts-of-patch-by: Albert Astals Cid Change-Id: I64632601e02f2a53060296ab7739577a749d916f Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au> Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
* Merge branch 'dev' into stableSergio Ahumada2013-03-201-6/+6
|\ | | | | | | | | | | This starts Qt 5.1 release cycle Change-Id: I6178a580b4c99aded1a69032a02169cff502b71d
| * Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-02-251-0/+13
| |\ | | | | | | | | | Change-Id: Ia02971527a2d1a80c5624d69330428818aab3a41
| * | Move the model classes from QtQuick to QtQmlAlan Alpert2013-01-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is needed for proper support of non-GUI instantiators in QtQml. Only private C++ classes are affected. Aside from name changes, model classes now operate on QObjects instead of QQuickItems, leading to minor changes in the implementation of QtQuick classes using them. The old QML type names will still be registered in the QtQuick import for the forseeable future, but pointing to the new classes. The new QML types will be added in a second commit. Classes Affected: QQuickVisualDataGroup -> QQmlDataGroup QQuickVisualDataModel -> QQmlDelegateModel QQuickVisualItemModel -> QQmlObjectModel QQuickVisualModel -> QQmlInstanceModel QQuickChangeSet -> QQmlChangeSet QQuickListAccessor -> QQmlListAccessor QQuickListCompositor -> QQmlListCompositor QQuickPackage -> QQuickPackage (just moved for now) Change-Id: Ia19e630e53bfa9e5d459e289596cd11df1ea3930 Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
| * | 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>
* | | QQuickItemView: Add guard before returning currentItem itemCaroline Chao2013-03-191-0/+16
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | And don't check if the currentItem is empty before calling applyPendingChanges(). And an autotest. (Patch from Steffen Imhof) Task-number: QTBUG-30227 Change-Id: Ia16362a6d0dce771f20772929c32e9306ed0e0f9 Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | ListView's highlightMoveDuration should default to -1.Michael Brasser2013-02-221-0/+13
|/ | | | | Change-Id: Ibb53cc21b4f1f301569cd7724c60cb8df978921a Reviewed-by: Bea Lam <bea.lam@jollamobile.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>
* Quick tests: Introduce QQmlMessageHandler.Friedemann Kleint2012-12-201-13/+2
| | | | | | | | | | Add QQmlMessageHandler class that can be used to record messages into a QStringList. It also makes sure that the old message handler is reinstalled if the test fails. Task-number: QTBUG-28611 Change-Id: I0fff7bc11e188cf47178d9573e5f2eead693bc10 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Renamed QQuickItem::pos property to positionShawn Rutledge2012-11-291-18/+18
| | | | | | | | | 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>
* tst_QQuickListView::sectionsDelegate_headerVisibility(): restore QSKIPJ-P Nurmi2012-09-241-0/+2
| | | | | | Task-number: QTBUG-24395 Change-Id: Idd403aa5e81965f4ebf14378b28b47c099a2c487 Reviewed-by: Caroline Chao <caroline.chao@digia.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>
* Autotests: Use qInstallMessageHandlerKai Koehne2012-09-141-3/+3
| | | | | | | qInstallMsgHandler got deprecated in Qt 5. Change-Id: Icb6423c7d9f7e507ba36376b0af5ad183379c494 Reviewed-by: Martin Jones <martin.r.jones@gmail.com>
* Attempt to fix tst_QQuickListView::sectionsDelegate_headerVisibility()J-P Nurmi2012-09-061-5/+4
| | | | | | | Task-number: QTBUG-24395 Change-Id: I07b0fc17566e86dcebf913721f293378cf15466b Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Caroline Chao <caroline.chao@nokia.com>
* Add SnapPosition mode to positionViewAtIndex() in List/GridView.Martin Jones2012-07-271-115/+93
| | | | | | | | | | 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 QSKIP from snapOneItem() testBea Lam2012-07-261-5/+0
| | | | | | | | | | | | Past test failures are likely to have been caused by mouse events passing over from previous tests and causing a double click rather than a press for a flick. This should pass now as QQuickViewTestUtil::flick() now calls QTest::mouseMove() instead of sending MouseMove events to the window. Task-number: QTBUG-24338 Change-Id: I68f7f3f91d189ed3ead01c8646570c39ba86f1d4 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Remove QListModelInterface.Andrew den Exter2012-07-251-131/+60
| | | | | | | | | | Implement ListModel and XmlListModel using QAbstractListModel instead. Task-number: QTBUG-15728 Change-Id: I14e03d90883d341f4b1d89c1e9fc9dc1534fde78 Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Changing model after componentComplete should reset currentIndexMartin Jones2012-07-231-6/+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-18/+12
| | | | | | | | | | | - 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-549/+548
| | | | | | | | | | | | | | | | 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-3/+4
| | | | | | | | | | | 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>
* Section headers ignore list delegate size changes when "colliding"Martin Jones2012-07-041-2/+16
| | | | | | | | Make section header updates part of the layout process. Task-number: QTBUG-23298 Change-Id: I4586bc58bc195fcc47f6db79346727eb6e3d3845 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Rename ListView *speed properties to *velocityBea Lam2012-06-261-2/+2
| | | | | Change-Id: I63c02d186b1832e7bf890a00caad150d5bf136cb Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix section delegates not updating when changed.Andrew den Exter2012-06-261-0/+41
| | | | | | | | | Delete all allocated section items before doing an update when the section delegate is changed. Task-number: QTBUG-24899 Change-Id: I09dc7a1c602a49ad7bb37512a7e5116392259457 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Position section headers correctly when section property changes.Andrew den Exter2012-06-261-0/+20
| | | | | | | | | | Schedule a new layout after the section property is changed to correct item positions if section headers are added or removed. Task-number: QTBUG-24900 Change-Id: I7e46ec6dc00e5a810029396a4c5ca4e87ee1d94d Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Isolate unstable testBea Lam2012-06-261-8/+34
| | | | | Change-Id: Id534dc7ff7146799bdb989d8bcf56ca4c0fbeffa Reviewed-by: Andrew den Exter <andrew.den-exter@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>
* Revert "Remove properties related to highlight speed"Bea Lam2012-06-251-0/+3
| | | | | | | | | | This reverts commit 18fb5506d524dbe380d5bf636c74c93fb85cbc31. Without these properties there's no way to set a constant movement speed. Change-Id: I49cd648846f801eb479ecce8cde09ff49ea11736 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Delete canvas created in testBea Lam2012-06-251-0/+2
| | | | | | | | | This was causing a crash on exit. Task-number: QTBUG-23605 Change-Id: I96a38f383a180f8aaf5177ad6d7183f9b0b5e85a Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Fix crash when dragging items outside visible area.Andrew den Exter2012-06-221-18/+58
| | | | | | | | | | | | | | | | | | If asynchronous item creation finishes while the content area of a ListView has been dragged full outside the visible area a full refill is triggered which can overwrite the requested index and potentially result in a single delegate item being assigned to multiple view items and later being doubly released. Only create the view item object in the createItem function to prevent this from happening. Secondly only reset the visible items if jumping outside the buffer range rather than just the fill range to prevent churn when the list only contains buffered items. Task-number: QTBUG-26232 Change-Id: I5bce845898ef5f699f34afc268594ef38e01d6a3 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Rename Flickable x/yOrigin to originX/YBea Lam2012-06-221-9/+9
| | | | | | | | 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>
* Remove properties related to highlight speedBea Lam2012-06-221-3/+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>
* Fix view delegate parent binding regression.Martin Jones2012-06-121-0/+39
| | | | | | | | | | | | 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>