aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickvisualdatamodel
Commit message (Collapse)AuthorAgeFilesLines
* tests/quick: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-07-271-5/+5
| | | | | | | | | | | | - Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Change-Id: Ib9f4c2486af23c47990be4b9e004b965de226dcc Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into ↵Simon Hausmann2013-07-221-3/+1
|\ | | | | | | | | | | | | | | | | | | wip/v4 Conflicts: src/quick/items/context2d/qquickcontext2d.cpp tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro Change-Id: I36a4fd28b3156839aecd70039a3ba566bf19a0bc
| * QtDeclarative: Removing parallel_test from configSimo Fält2013-07-091-2/+0
| | | | | | | | | | | | | | | | | | | | tst_qquickvisualdatamodel and tst_qquickpositioners have been failing recently on CI. One can't reproduce the failures locally unless running the tests parallel, like CI does. Task-number: QTQAINFRA-705 Change-Id: I09a9123d045f2213af915518917ce622b33b27ba Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into ↵Simon Hausmann2013-06-241-0/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wip/v4 Conflicts: src/imports/qtquick2/plugins.qmltypes src/qml/debugger/qv8debugservice.cpp src/qml/qml/qml.pri src/qml/qml/qqmlcompiler.cpp src/qml/qml/qqmlcomponent.cpp src/qml/qml/qqmlcontext.cpp src/qml/qml/qqmldata_p.h src/qml/qml/qqmlengine_p.h src/qml/qml/qqmljavascriptexpression.cpp src/qml/qml/qqmlxmlhttprequest.cpp src/qml/qml/v4/qv4bindings.cpp src/qml/qml/v4/qv4irbuilder.cpp src/qml/qml/v4/qv4jsonobject_p.h src/qml/qml/v8/qqmlbuiltinfunctions.cpp src/qml/qml/v8/qv8bindings.cpp src/qml/qml/v8/qv8contextwrapper.cpp src/qml/qml/v8/qv8listwrapper.cpp src/qml/qml/v8/qv8qobjectwrapper.cpp src/qml/qml/v8/qv8qobjectwrapper_p.h src/qml/qml/v8/qv8sequencewrapper_p_p.h src/qml/qml/v8/qv8typewrapper.cpp src/qml/qml/v8/qv8valuetypewrapper.cpp src/qml/types/qqmldelegatemodel.cpp src/quick/items/context2d/qquickcanvasitem.cpp src/quick/items/context2d/qquickcontext2d.cpp sync.profile tests/auto/qml/qjsengine/tst_qjsengine.cpp tests/benchmarks/qml/animation/animation.pro tools/qmlprofiler/qmlprofiler.pro Change-Id: I18a76b8a81d87523247fa03a44ca334b1a2360c9
| * No longer apply pending changes when accessing ItemView propertiesAlan Alpert2013-04-261-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Fix compilation with built-in v4vm JS engineSimon Hausmann2013-04-151-1/+1
|/ | | | | Change-Id: Ieda9267e296acf6392a5461f4cfb9233a7a409a0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add QtQml.Models moduleAlan Alpert2013-03-121-52/+52
| | | | | | | | | | | The moved Model classes can now be exposed in a QtQml import. To keep the QtQml import resticted to more core functionality, they are being exposed in a plugin module. Change-Id: I0a84642a72c7c9bbf9b6ffd2a6c33549f8e61c29 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Move the model classes from QtQuick to QtQmlAlan Alpert2013-01-241-132/+132
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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>
* make use of qtHaveModule()Oswald Buddenhagen2013-01-101-1/+1
| | | | | | | Change-Id: I23f11c944fafb5863a960dcc83bc1e57e189f662 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Change qml list interfaceMarco Bubke2012-10-231-1/+1
| | | | | Change-Id: I185c6f4cef6105544504324c1616b5995c219fe3 Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
* Remove interim compatibility measuresAlan Alpert2012-10-161-4/+4
| | | | | | | | Also update some variables in qtdeclarative which failed to update rootItem->contentItem. Change-Id: Id34e29546a22a74a7ae2ad90ee3a8def6fc541d3 Reviewed-by: Alan Alpert <416365416c@gmail.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>
* Fix assert when a VisualDataModels context has been invalidated.Andrew den Exter2012-08-241-0/+30
| | | | | | | | | | | Verify the context is valid before attempting to access its engine. The context should normally be valid but there is a small window between a delegate item being released and the DeferredDelete event being processed when it is not. Task-number: QTBUG-26949 Change-Id: I79f3affaed8904cbe0974476010b68305666cd29 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Add tests for writing to model role properties.Andrew den Exter2012-08-021-0/+31
| | | | | Change-Id: I91375e9caecc130fb3a86f5a48d19e000fa6fcac Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
* Test the VisualDataModel hasModelChildren propertyAndrew den Exter2012-08-022-1/+54
| | | | | Change-Id: I9ea71ca5c7d6a0f161cc92583c187d591d26826a Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
* Add tests for VisualDataModel watched roles.Andrew den Exter2012-08-021-0/+90
| | | | | Change-Id: Idc84d0f833fe2ec4ed29bbda62def17ec20a3a8b Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
* Fix handling of changes to the root index of a VisualDataModel.Andrew den Exter2012-08-023-61/+281
| | | | | | | | | | Store the root index as a QPersistentModelIndex so the index remains valid as the model changes, and in the case the root index is removed from the model invalidate the contents of the VisualDataModel until a new root index or model is set. Change-Id: I1cbc27f2068f99a02ff3d43373905dec7e35e900 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Set the Qt API level to compatibility mode in all tests.Thiago Macieira2012-08-011-0/+1
| | | | | | | | | | Qt 5.0 beta requires changing the default to the 5.0 API, disabling the deprecated code. However, tests should test (and often do) the compatibility API too, so turn it back on. Task-number: QTBUG-25053 Change-Id: I6988c2360e9d88916311374a0c910bfc5b607439 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add tests for an object instance as model data.Andrew den Exter2012-07-301-0/+29
| | | | | Change-Id: I08137b24ff97b6c76edcf683e987228cf66d8816 Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
* Remove QListModelInterface.Andrew den Exter2012-07-251-5/+5
| | | | | | | | | | 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>
* QQuickCanvas renamesAlan Alpert2012-07-171-6/+6
| | | | | | | | | | | | | | | | 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>
* Re-enable tests dependent on QStandardItemModel.Andrew den Exter2012-07-121-21/+4
| | | | | | | | | These were disabled when QtWidgets was not available, but that is no longer necessary following QStandardItemModel being moved to QtGui. Change-Id: I7ed133d9fd5ae6daa5ed9df180f7745fc3f368b1 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
* section.property cannot deal with nested propertiesMartin Jones2012-07-022-1/+44
| | | | | | | | Handle nested property names in section.property. Task-number: QTBUG-24569 Change-Id: I0ea6003313108b8232bcd3a3015a4dbbd0753cec Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Pass the right signal index in visualadaptormodel proxy meta-objectKent Hansen2012-06-222-1/+3
| | | | | | | | | | For QMetaObject::activate(), the index must be relative to the class's own signals (excluding non-signal methods). For QMetaObjectBuilder, the notifier index must be relative to the class's own methods. Change-Id: I22f55d1fc55d56c997135dc78f51b710b37bb01a Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Set a non-zero default cacheBuffer.Martin Jones2012-06-131-0/+2
| | | | | | | | | | 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>
* Destroy incubated objects if they are not claimed when ready.Andrew den Exter2012-06-081-0/+282
| | | | | | | | | | If model data is removed while an object is incubating for it the view cannot cancel the incubation because the index is invalidated. So if the object has not been referenced after signalling it is ready assume it's been abandoned and destroy it. Change-Id: I32708e940cfbccbe0d330ad7822f29d3c1f39d13 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Allow qtdeclarative to compile with -no-widgetsMartin Jones2012-06-052-11/+28
| | | | | | | | We have no hard requirement for QtWidgets library, so we should build without it. Change-Id: I85c85cc1a52bf9daa7ab7916f19bf7cc3ad5845f Reviewed-by: Damian Jansen <damian.jansen@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>
* Add an v8 object template for visual data model change sets.Andrew den Exter2012-05-251-1/+0
| | | | | | | | | | This is more optimal than dynamically creating an object per change for each signal emission. Also create static string instances for property names common to all item objects. Change-Id: I8b0a6b683df4ee9c55c15cc928603e82f37045f7 Reviewed-by: Martin Jones <martin.jones@nokia.com> Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Don't construct VisualDataModel attached properties unless requested.Andrew den Exter2012-05-242-0/+45
| | | | | | | This saves allocating a QObject per item model in the common case. Change-Id: I0e77e6c6c0c64ac6c5e482ef55e194c68e778b32 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Fix crash in QQuickVisualDataModel test.Andrew den Exter2012-05-211-2/+2
| | | | | | | "item" + 1 will not concatenate. Change-Id: Icea095fd3183ba1b0e9b0e19b0c1fb6758f39ff3 Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
* Refactor QQuickVisualAdaptorModel to reduce memory consumption.Andrew den Exter2012-05-211-2/+4
| | | | | | | | | | | | Don't inherit from QObject. Use a single QQmlGuard for all model types, and reset the model property if the model is deleted. Construct v8 object template on demand. Store model type specific data in a separate class that is allocated on demand. Change-Id: Id4f7b235741555b6ffba3fcf11727d85d6920e9e Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix warnings in qtdeclarative.Friedemann Kleint2012-03-301-3/+0
| | | | | | | | | | - QString from ASCII conversions - Unused variables - Pointer mismatches Change-Id: I5f76dce4f2ba481c2c2bce8681cf8107bd629566 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Use the same ReferenceError message wording as V8Kent Hansen2012-03-141-6/+6
| | | | | | | | | | | Instead of "Can't find variable: foo", use "foo is not defined". This is in preparation of letting V8 throw the exception when a property lookup fails on the QML scope object (needed for QTBUG-24448). Change-Id: I3c747482a8ef138dad9a85530a4f6b5c4c818a03 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Changed quick tests to work from install directoryKurt Korbatits2012-03-071-3/+1
| | | | | | | | | - Changed tests to use TESTDATA - added check for cross_compile option to skip when sources not available Change-Id: I1f382794ff982bbc07fc20438a4e4a8c8b8d565f Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-2430-0/+4408
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>