aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* doc: fix some typos in .qml filesSergio Ahumada2012-09-078-8/+8
| | | | | Change-Id: Ice5d60b06ec9ab81fbd98fd1679c8834f3018938 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* 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>
* Delete weak JS objects on exit right awayThomas McGuire2012-08-313-3/+50
| | | | | | | | | This reduces memory leaks on exit when the engine is destroyed after exec() has finished. Change-Id: I917d103966d55b4dd3ba4e986ff902e29d8fb0ac Reviewed-by: Chris Adams <christopher.adams@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Evaluate bindings more intelligently during constructionAaron Kennedy2012-08-292-2/+1
| | | | | | | | | | | | | | | | | Instead of just evaluating bindings in a fixed order, and possibly having to evaluate a single binding multiple times, prior to reading a property, we check if there are any bindings "pending" on it and evaluate them then. A pending binding is one that has been assigned to the property, but not yet evaluated. To minimize side effects we only do this for "safe" bindings. A safe binding is one that has no side effects, which we currently define as not calling functions or otherwise assigning values during its evaluation. This isn't an entirely foolproof way to ensure that the evaluation has no side effects, but it should be good enough. Change-Id: I98aa76a95719e5d182e8941738d64f8d409f404a Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Only test qtdeclarative examples for naming conventionAlan Alpert2012-08-291-3/+10
| | | | | Change-Id: Id34e29546a22a74a7ae2ad90ee3a8deabccddddd Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Test metatype registration errors with non-metatypes.Stephen Kelly2012-08-283-12/+22
| | | | | | | | | QList<QPoint> is to become automatically registered with https://codereview.qt-project.org/#change,32897 and https://codereview.qt-project.org/#change,33031 Change-Id: I455028e226c15e922162bae21db7e5e9de07063b Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Console API: Print JS objectAurindam Jana2012-08-282-5/+7
| | | | | | | | | Calling console.log(), console.debug(), print() etc would only print out "Object" if a JS Object was passed as an argument. This patch calls the toString() on the object. Change-Id: Iadf8b4d1fe81c3e2c7bd65e3c153a930fd994bef Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Add cacheItemCount property to PathViewMartin Jones2012-08-282-1/+84
| | | | | | | | | | | | cacheItemCount specifies the number of items to cache off the path when pathItemCount is specified. This allows up to cacheItemCount items to be kept alive when they move off the path, and also to asynchronously create items off path in preparation for display when the path offset changes. This is the equivalent of cacheBuffer for other views. Task-number: QTBUG-23931 Change-Id: I03497537d3f929e5e3579536850dd43eb2724c38 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Refactor singleton type registration codeChris Adams2012-08-2812-106/+138
| | | | | | | | | | | Previously each singleton type was registered as an implicit separate import. This commit changes the code so that these types are treated just like any other type in the registration sense. It also ensures that singleton types are instantiated per-engine. Change-Id: I5c81c4ca5bf65210f7125d74a62a282a21838068 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Use the new antialiasing property for canvas paintingCharles Yin2012-08-281-1/+0
| | | | | Change-Id: I76f21d055696978f2f6936006eea038dd73cce6c Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Restrict v8 property lookup to the execution contextMatthew Vogt2012-08-2711-37/+279
| | | | | | | | | | | | | When resolving property names, only properties known to the current context of execution should be available. If a property name has been overriden by a component extension, code executing in the context of the base component should resolve the property name to the property available inside the base component or its bases. Task-number: QTBUG-24891 Change-Id: I9687cc28e108226d5a939627a901c8254344b598 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Don't put JavaScript-owned objects on the stack.Thomas McGuire2012-08-243-381/+385
| | | | | | | | | Only the fact that the object wrapper uses deleteLater() instead of delete made this not crash. Change-Id: I034d8c7f24b963be9e031446ffdfa33e6bc266cc Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com> Reviewed-by: Chris Adams <christopher.adams@nokia.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>
* Avoid dynamic lookup of signal handler argumentsMichael Brasser2012-08-249-24/+149
| | | | | | | | | | | Rewrite signal handlers to include the parameters in the rewrite. Also check whether parameters are actually used when possible, and if not don't provide them to the expression. Change-Id: I7d65c05f4639979dd61035cf7478119ef7647c25 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Increase test coverage for V4Matthew Vogt2012-08-2312-21/+506
| | | | | | | | Add test for integer operations, Math functions and exercise some previously uncovered code. Change-Id: Idff3f3672498775ac117ca98bf34b0fe96cbf760 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Port away from qWaitForWindowShown.Stephen Kelly2012-08-222-3/+3
| | | | | | | It is deprecated. Change-Id: Icf29b1f5ab6cb06ee7fd375fb96242df7ee3083e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Make connectNotify() work with QMLThomas McGuire2012-08-224-0/+383
| | | | | | | | | Call connectNotify() and disconnectNotify() in QQmlNotifierEndPoint, which works for QML signal handlers and for QML bindings. Task-number: QTBUG-11284 Change-Id: Ic9a08ee6687e5c7e606f315c8fb30eec1493cd83 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Trim trailing whitespace.Stephen Kelly2012-08-222-34/+34
| | | | | Change-Id: I3d268d3ce8d73c7287f51abe9a28c165cb75acb9 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Fix V4 calculations that vary from V8 resultsMatthew Vogt2012-08-223-27/+36
| | | | | | Task-number: QTBUG-24706 Change-Id: I4475a772c5cd92776f2cb73dab9bc06ae4c019fa Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Stabilize QQuickWindow tests a bitGunnar Sletta2012-08-173-32/+36
| | | | | Change-Id: I11a28e203c978e5675b088a5bb999c34b46f80da Reviewed-by: aavit <qt_aavit@ovi.com>
* Fix crash in signal change notification overrideChris Adams2012-08-1613-0/+214
| | | | | | | | | | | | | | | Manual overrides of automatically generated property change notification signals can cause crashes. They also don't work properly in the situations where they don't crash. This patch ensures that it is now a compile error to attempt to override a signal with a manual signal or slot. Note that this includes signals defined in superclasses. Task-number: QTBUG-26723 Task-number: QTBUG-26818 Change-Id: I4ecf448ce9de5d97526606126991e280debea2d6 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Reduce memory consumption of source coordinatesMatthew Vogt2012-08-162-11/+13
| | | | | | | | | | Reduce memory consumption by storing source location coordinates as 16-bit variables (in run-time structures). Also modify qmlmin to restrict line lengths so that the column bound is not normally exceeded. Change-Id: I08605626ffbdf081b6da2aea1116bdfe24998572 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Fix build with QT_NO_ACCESSIBILITY.Frederik Gladhorn2012-08-131-1/+1
| | | | | Change-Id: I52e4f54e0308d9fef4b9a19586d3e2ff696f0a5b Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Only build accessibility test when a11y is enabled.Frederik Gladhorn2012-08-131-0/+2
| | | | | Change-Id: I4f3012801b2775c75cf84b640c7a9821a6b21075 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Permit value types with metatype IDs >= QMetaType::UserMatthew Vogt2012-08-102-0/+206
| | | | | | | | | Remove the assumption that value types must be types defined by Qt, having metatype IDs below QMetaType::User. Task-number: QTBUG-26352 Change-Id: Ib5a56ff2e7892e82adf17a3a1e7517a0c9fe0534 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* 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>