aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Add unit test for concatenated property name accessChris Adams2012-08-092-0/+137
| | | | | | Task-number: QTBUG-23126 Change-Id: I706d5f4ba49a554c3816146f15a87e001cde9a3f Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Change error messages to reflect new module terminologyChris Adams2012-08-096-15/+107
| | | | | | | | | | | | | Previously, modules which registered types into a protected type namespace were known as "strict" modules; now they are known as "identified" modules. This commit also adds a unit test to ensure that the module identifier directive is the first command in the qmldir file. Change-Id: I90e9d2c5b51ecb2b9d058c9fe9d9310fd3cd4f45 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com> Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Allow invokable functions of value-type classes to be calledChris Adams2012-08-097-2/+202
| | | | | | | | | | | | Previously, invokable functions of value-type classes were returned as properties. This commit fixes that bug by allowing such functions to be invoked normally. It also improves copy-value type handling. This commit also ensures that QMatrix4x4 value types are constructed with qreal values as this is the storage type used internally. Change-Id: Iab0fe4c522ed53d60154e8a8d46dda925fb9f4de Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Ensure that copy sequences can be passed as argumentsChris Adams2012-08-094-24/+34
| | | | | | | | | | | | Previously, automatic conversion from JS array to sequence copy resource was not performed in the case where the array was passed as a parameter to a QObject function invocation. This commit adds code to check if the parameter type is a sequence type - and if so, and if the value is a variantlist, we convert it to a sequence of the appropriate type. Change-Id: I3cc3e2f95604bc71d1d8d237e1acffa1e03b78ba Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Add type name to singleton (module api) implementations.Glenn Watson2012-08-0859-239/+438
| | | | | | | | | | | | | This change renames the previous module api implementation to singleton types. When a singleton type is registered, a type name must be provided that is used when accessing the API from QML. This makes the implementation more consistent with the rest of QML. Task-number: QTBUG-26549 Change-Id: Iab0bb1ccf516bd3ae20aee562a64d22976e0aecd Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Allow signal parameters which are custom QML object-typesChris Adams2012-08-089-1/+159
| | | | | | | | | | | This commit allows lazy resolution of signal parameter types, which allows QML object types to be used as signal parameters. If a signal is emitted with an incorrect parameter type, it will be passed through as a null parameter. Task-number: QTBUG-14550 Change-Id: I7e899ad57452826cc405bed10c541f8d35789d04 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Support JS Array.sort() function for sequence wrappers.Glenn Watson2012-08-085-2/+183
| | | | | | | | | | | | | | The V8 natve sort implementation calls some functions that are incompatible with the way sequence wrappers work. In particular, it calls an internal length() function which does not pass through the length accessor provided by sequence wrappers, so the sort function always thinks the array is zero length. Instead, clone the array prototype and override the sort function with one that is specific to sequence wrappers. Task-number: QTBUG-25269 Change-Id: Ic83b9ee0bd3a0707e512f28057f0f99b432fded4 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Add tests for copying QQuickChangeSets and debug output.Andrew den Exter2012-08-071-0/+61
| | | | | Change-Id: I4367f9d15e216f48116a7652c8fd064c706c9d35 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Fix pasting with the middle button in TextInput and TextEdit.Andrew den Exter2012-08-062-0/+106
| | | | | | | | Neither item accepted the middle button which prevented the mouse events ever reaching them. Change-Id: Ia8f693099df4d6c248976453d554fef96d1d3b33 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add tests for copy and paste using keyboard shortcuts.Andrew den Exter2012-08-062-0/+138
| | | | | | | Fixes TextInput.cut() removing text while read only. Change-Id: I03cd44d381be9d53f71ba168b8be7971ab0bbad7 Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
* Don't use compatibility headersPaul Olav Tvete2012-08-037-7/+7
| | | | | | | Cleaning up after the QWindowSystemInterface header change. Change-Id: Icc2df3cfd441bf6b113602f17d9b843fbc8c75ba Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Refactor and document QQuickChangeSet.Andrew den Exter2012-08-031-338/+1039
| | | | | | | | | Store an offset variable for moves so that an insert can be split without the need to also split the corresponding remove, simplifying the logic involved somewhat. Change-Id: I1df19d431a04361a75e107bc4d149cbb80cd791d Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Make QQmlScriptString opaque.Michael Brasser2012-08-035-18/+62
| | | | | | | | Allow for future optimization by encapsulating the raw script data. Change-Id: I1863103e8e6d74ede60593cabb240e16f2ae657e Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Skip failing testBea Lam2012-08-021-0/+4
| | | | | | | | tst_qqmlxmlhttprequest::stateChangeCallingContext() sometimes fails on Windows. Change-Id: Ib755c614e23587e6ea216da5c9108100a0f05d39 Reviewed-by: Andrew den Exter <andrew.den-exter@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-022-0/+92
| | | | | 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-025-88/+309
| | | | | | | | | | 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-01178-0/+178
| | | | | | | | | | 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 includes for QWindowSystemInterfacePaul Olav Tvete2012-08-016-0/+6
| | | | | | | QWindowsystemInterface will no longer be a public class Change-Id: Ibd815d377cbd553e8c3e99e99b337a9854647001 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* Skip tst_qquickfolderlistmodel::changeDrive()Bea Lam2012-08-011-0/+1
| | | | | | | | Fails on Windows. Task-number: QTBUG-26728 Change-Id: I81c4b13940fe68d780db9d43a5a11edf8f12e99a Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Refactor context2d thread logicCharles Yin2012-07-313-14/+14
| | | | | | | | | | 1. Use QQuickContext2DRenderThread for Threaded rendering 2. Make FBO target works with all render strategies 3. Remove some unnessary locks, call texture methods by invoking meta calls 4. Run existing tests with all render targets and strategies (except Cooperative) Change-Id: I0db5c91d848b86bcc1536c30d7a5804b66a817f1 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Fix folder list model when changing drives on Windows.Glenn Watson2012-07-311-0/+52
| | | | | | | | | | The folder list model implementation drops drive letters when changing folder on Windows. Fix this and add a Windows specific test case. Task-number: QTBUG-26620 Change-Id: If58551ba01b56343ebf44512620207e49d83ba09 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Implement strict mode for qmldir modulesMatthew Vogt2012-07-3144-4/+948
| | | | | | | | | | | | | | | Allow a module's qmldir to contain a module directive, which when present specifies 'strict mode' import processing. In strict mode, type registrations are only permitted into the namespace identified in the qmldir file's module directive. In addition, any type registrations to that namespace originating from other modules are treated as error conditions. Task-number: QTBUG-26551 Change-Id: I081bde2d3b83d3f28524440177fb2cd1ccee34ad Reviewed-by: Chris Adams <christopher.adams@nokia.com> Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Some autotests which failed on OSX don't fail anymore; others doBea Lam2012-07-301-20/+16
| | | | | | | Seems to be better after the parallel touch/mouse propagation. Change-Id: I7336a451f18469d819a6105d58ae6dbb029a0c2c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Add tests for Text(*) default property values and notifiers.Andrew den Exter2012-07-303-8/+409
| | | | | Change-Id: I64bfe285ab4ddad53a4d323ca93b15ea0426ed51 Reviewed-by: Damian Jansen <damian.jansen@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>
* Delete created objects in tests and fix warningsBea Lam2012-07-301-0/+15
| | | | | Change-Id: I593fc9f4506e849852e56fbc7c40a3481c601806 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Remove default parameter from protected QmlPropertyMap CT.Friedemann Kleint2012-07-301-1/+1
| | | | | | | | | Make public constructor explicit. This fixes QtLocation compilation (declarativeplaces defaulted to the protected CT). Change-Id: I8b32d7624b6ba770f6d646c227a0bfd37e501ee5 Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Stabilize tst_qquickloader test caseMatthew Vogt2012-07-301-14/+22
| | | | | | | | Ensure cases are not affected by timer events of incubation controllers created in previous cases. Change-Id: Ia633ed142242d000de5f497896a685ca2f26e143 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Pixmap loader adds images to unreferenced list when cache: falseMartin Jones2012-07-271-1/+56
| | | | | | | | | | | | | | Don't add uncached images to the unreferenced list, since they cannot be reused later as they are not in the cache. Additionally, we currently search for images in the cache, even if we set cache: false. Setting cache false should not put images in the cache and should not use images that are in the cache. Task-number: QTBUG-26676 Change-Id: Ib7eb42199ae6ae6154b696c83ad1dd959e0f208f Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Allow access to signals and slots in QQmlPropertyMap inheritorsMatthew Vogt2012-07-271-0/+43
| | | | | | | | | | | Allow inheritors of QQmlPropertyMap to pass the static meta object information needed to support their signals and slots. If the correct pointer is not provided to the constructor, it is not accessible via the virtual metaObject() function during construction. Task-number: QTBUG-26400 Change-Id: Ide8c6d3568e4abd4c48e0aa60e6fa05a9c2a11cf Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix QML import paths in Qt resources.Aaron McCarthy2012-07-275-18/+62
| | | | | | | | | | | | | | | Allow adding qrc: urls as import paths. Store an import path of the form :/import/path as qrc:/import/path which is expected by other parts of the code. Update documentation for QQmlEngine::addImportPath() to explicitly state what types of paths are supported. Add auto tests to check that importing a module from a Qt resource works. Change-Id: If0e75c75078a608b20d7a5c4080bccf6241e97f6 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Add SnapPosition mode to positionViewAtIndex() in List/GridView.Martin Jones2012-07-274-393/+250
| | | | | | | | | | 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>
* Fix resolution of cursor when items are overlapping.Andrew den Exter2012-07-262-0/+176
| | | | | | | | | | | | If MouseArea with cursorShapes are overlapping then cursor shape of the foremost item under the mouse cursor should be shown, but because the hover events are delivered to the foremost items first the opposite is occuring. This makes QQuickWindow responsible for correctly setting its own cursor instead of relying on items to work it out amongst themselves. Change-Id: Iedf144c583dfa3d1ff441e19db9601b5e171902a Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Ensure params listed after unnamed params are available in QML.Glenn Watson2012-07-251-1/+0
| | | | | | | | | | | If a parameter in a bound signal had no name, it was excluded from the metaobject created by the bound signal expression. Change this so that unnamed parameters are still added (with an anonymous name). This means that subsequent parameters can be accessed from QML. Task-number: QTBUG-24481 Change-Id: Ia3403fb3bdc3da0c7e58baf7e891b67ed413bebd Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Add waitForRendering() function for qmltestCharles Yin2012-07-251-1/+1
| | | | | Change-Id: I6357412d84fdb4a8b6bd8603baba7d10a2bcc245 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Add tests for QQuickItem::childAt and antialiasing.Andrew den Exter2012-07-251-0/+68
| | | | | Change-Id: I5dc26eaf27c201be05147c7bab4d6f0b0c926aed Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix inconsistent playing / paused property setting and signalsDamian Jansen2012-07-252-3/+71
| | | | | | | | | | | | | | Playing should only indicate false if it has been set as such in code, or in the event of a valid image but non-movie being used. Noted the edge case in documentation. Signals were not being emitted for playing/paused in the cases where an image was not loaded. Paused property was also being incorrectly assigned, which supressed pause behavior. Task-number: QTBUG-26478 Change-Id: I1aaab9b7c495811114b30b491a900804a75d590f Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Empty JSON files are not needed for the plugin systemAlan Alpert2012-07-2511-11/+9
| | | | | Change-Id: I8df57ed1ced8128723d790c30c00ccaba0a2787d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Remove QListModelInterface.Andrew den Exter2012-07-2510-518/+251
| | | | | | | | | | 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-2414-25/+25
| | | | | Change-Id: I722e20b2fb8d8c6c19c6f3f2cb16910d7433e9a4 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix restoration of cursor position and selection after undo/redo.Andrew den Exter2012-07-241-4/+142
| | | | | | | | | If a text selection was deleted, the selection should be restored by an undo, but not if the selection was part of an atomic operation like the DeleteStartOfWord key sequence. Change-Id: Ia37f29c78f6367c60377c539c4e394e014485a49 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Fix value-type semantics in variant propertiesChris Adams2012-07-243-0/+87
| | | | | | | | | | | Previously, variant properties storing value-type values would be treated as value-type-copy values rather than value-type-reference values. This caused inconsistency in behaviour with value-type subproperty assignment. Task-number: QTBUG-26562 Change-Id: I524ee06ab8e02bf9582c1a88f3317278199225e0 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Changing model after componentComplete should reset currentIndexMartin Jones2012-07-232-11/+32
| | | | | | | | 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>
* Add methods to PathView: positionViewAtIndex(), indexAt(), itemAt()Martin Jones2012-07-232-1/+119
| | | | | | | These methods are already present in ListView and GridView. Change-Id: I3777fccdecd77c8ab756a0062c71c6e1bfb749ef Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Add tests for QQuickPaintedItem.Andrew den Exter2012-07-233-5/+501
| | | | | Change-Id: If7645cc417b862d4d47da56e67035488fa83ede7 Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
* Changing PathView model after componentComplete should reset positionMartin Jones2012-07-232-8/+94
| | | | | | | | If the model is changed after the component is completed, the offset and currentIndex should be reset to 0. Change-Id: Ie36eb0c17ce6602c6ae15b5ee7aeb8b1a6e7854b Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Don't run pinch area test in parallel.Andrew den Exter2012-07-231-2/+0
| | | | | | | | The tests require window focus, and therefore cannot be run in parallel with other tests that spawn windows. Change-Id: I3fc89054689779382cc42a26323756257b618192 Reviewed-by: Damian Jansen <damian.jansen@nokia.com>