aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Introduce a new constructor to QQuickViewCharles Yin2012-05-231-0/+38
| | | | | | | | Make it possible let QQuickView use an existing qml engine and multiple QQuickView objects can share one QQmlEngine instance. Change-Id: I035d1c15155be22f1131b504c40cf4ffb5da0f45 Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Add unit tests for SVG pathCharles Yin2012-05-231-0/+57
| | | | | Change-Id: I4358416ccf973940fbd54633254274ba0a18e777 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Removed CONFIG+=parallel_test from suspected parallel-unsafe test [2]Rohan McGovern2012-05-231-2/+0
| | | | | | | | | This test has failed a parallel stress test and may contribute to instability in test runs. Change-Id: I7db5313078f3b3b9a7ae59facd5dbcb03777e7b8 Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Add completeToBeginning()/completeToEnd() to animation controllerCharles Yin2012-05-231-0/+43
| | | | | Change-Id: I1abac96754cc82c8e0e00c58a27c09b68c5075c1 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Use the default timeout for tryCompareCharles Yin2012-05-232-12/+12
| | | | | | | | Even with this fix, the test still fails in CI, so mark this test as insignificant until we figure out the real reason. Change-Id: Idd07820c63b0c9627c86ed87f97b5ade6a552f7e Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Accessibility: Implement invisible and checkable stateJan-Arve Saether2012-05-221-0/+8
| | | | | Change-Id: I3a079b4171e611b0136ef1582f6f16f71cf8f340 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Removed CONFIG+=parallel_test from suspected parallel-unsafe testsRohan McGovern2012-05-2221-36/+0
| | | | | | | | These tests have failed a parallel stress test and may contribute to instability in test runs. Change-Id: I8d82e9df7df6cac374b8b2eda43de8e96b676972 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Qml : Resetting binding correctedSimjees Abraham2012-05-211-15/+46
| | | | | | | | | Resetting the binding for property corrected in case the property is nested (eg: font.bold) Task-number: QTCREATORBUG-6294 Change-Id: I39cca54c17860c4e6df1cf864cc2f70214d50c8f Reviewed-by: Christiaan Janssen <christiaan.janssen@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>
* Ensure repeated compilation does not failMatthew Vogt2012-05-213-0/+56
| | | | | | | | | Failure could result from the allocation of an address previously used for the same class. The test is repeated for a surprisingly large count of repetitions to increase the chance of this occurring. Change-Id: I045902c50021f23adbbd61fccf41b9c38657387a Reviewed-by: Chris Adams <christopher.adams@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>
* Allow the existence of a VME metaobject to be assertedMatthew Vogt2012-05-211-3/+3
| | | | | | | | | Test for the existence of a VME metaobject. Otherwise, assertion of a static cast result is not meaningful. Change-Id: Ic9e9c38e5dce65c41d20e405c33e179334c37b00 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Remove QSKIP from test.Andrew den Exter2012-05-181-1/+0
| | | | | | | | | Fix merged in qtbase. Task-number: QTBUG-24801 Change-Id: I41de3b20938bd63861fba14a43b23ed8d91414d5 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Remove unnecessary exportsMatthew Vogt2012-05-181-3/+4
| | | | | | | | | Reduce library load time by removing any exports which are not required by existing clients. Task-number: QTBUG-24768 Change-Id: Ia5754d6f97bb2ed46e290820a5b092f85a4bc5b0 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add optional width and height arguments to mapToItem()/mapFromItem()Yann Bodson2012-05-182-0/+152
| | | | | | | | | When specifying the width and height from QML, mapToItem()/mapFromItem() will use QQuickItem::mapRectToItem (and mapRectFromItem). Task-number: QTBUG-25755 Change-Id: Iae87671913623969d7428dd008afaa6faf3faf33 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Optimize type resolutionMartin Jones2012-05-172-1/+16
| | | | | | | Faster qmlType() and resolveType() lookup. Change-Id: I096439f23bf6071e8bfdf0cda366cc71e00293ba Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Improve composite property type unit testChris Adams2012-05-171-13/+60
| | | | | | | | | | | | | | | | Previously, the test ensured that the (variant) value returned by QQmlProperty::read() was identical to that returned by QMetaProperty::read(), which isn't the case if an engine is passed to the QQmlProperty constructor. This commit expands the unit test to ensure that the actual QObject-ptr value is identical, rather than the variant value (which may have differing type information), regardless of whether an engine is passed in or not. For list properties, the individual values are (in general) not able to be accessed, and so the unit test for list properties is relaxed. Change-Id: Iec40dca147a0bb793359b28facbcae69cc49c1ad Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Add QQmlEngine::trimComponentCache()Matthew Vogt2012-05-1762-3/+1874
| | | | | | | | | | | | Allow unused data in the engine's component cache to be safely discarded so that the memory can be freed for other purposes. Unloading of scripts that are no longer required after trimming unused components is not yet supported. Task-number: QTBUG-25653 Change-Id: I37bc9d5592eeb5edceeb34d010a555dcffd11cea Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix signal handlers for signals with default arguments.Michael Brasser2012-05-173-0/+56
| | | | | | | | | | For cloned signals, connect to the index of the original. This was a regression caused by the switch to QQmlNotifierEndpoint for signal handlers. This change also makes parameters with default arguments available from QML, while previously they were unavailable. Change-Id: I1feb3412c3e9b0f2a5d6644c404c56d53c5544ac Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Skip failing test.Andrew den Exter2012-05-171-4/+1
| | | | | | | Fix in qtbase can't be merged until the QEXPECT_FAIL's are removed. Change-Id: Id416627cce3074549eda13331b7a88cc0313a910 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Fix incorrect text alignment in TextEdit.Andrew den Exter2012-05-172-0/+102
| | | | | | | | QTextDocument always spans the full width of a TextEdit so the text node shouldn't be offset by the x position of the bounding rect. Change-Id: I882a44baeea4d054279cadc5632df6d8863caea1 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Ensure that we don't attempt to dispose handle twiceChris Adams2012-05-1610-0/+159
| | | | | | | | | If a weak ref callback causes disposal of a v8object associated with a qobject, the later qqmldata::destroyed() handler could cause a double dispose, due to 753d9f4be5960be8b11ad067b29fc87c168ee663. Change-Id: I07c1c8e2e7b444a7e873da26bc4d0c19bcfe57b5 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Fix composite type property supportChris Adams2012-05-164-0/+111
| | | | | | | | | | | | | | | | The metatype changes caused a regression in composite type properties for which there was no autotest. In particular, declarative previously used the transitional QMetaType::registerType() function, whose implementation specifies a zero-size, which means that accessing a property of that type via QObject::property would fail. This commit adds some unit tests to track the issue, and also fixes the implementation of QQmlEnginePrivate::registerCompositeType to use the updated metatype registration functions. Task-number: QTBUG-25697 Change-Id: Ic4abc1711aee8cf4a50a2ef1769465ef73f5d022 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Revert "Allow function assignment to cause binding for non-var props"Chris Adams2012-05-152-7/+2
| | | | | | | | | | | | | This reverts commit 92b1f9981d225ecee28da1f0a88fb3046000cb5e. Conflicts: src/qml/qml/v8/qv8qobjectwrapper.cpp Also remove XPASS tests from qjsonbinding Change-Id: Ibc9da28d5f0bdffbf62e7e20f12bb55ff36ae271 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Inspector:Modified Apply changes on Save for unsync. changesSimjees Abraham2012-05-142-2/+50
| | | | | | | | | | Changes done to reload the view if the user opts to do so after making unsynchronizable changes. Inspector informs the QmlEngine about the changes which caches it. The cache is used to load the files which were changed when reloading the view. Change-Id: I22d476cace294d6ecf4e428dac104a557c3f7dde Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Removed CONFIG+=parallel_test from parallel-unsafe testsRohan McGovern2012-05-143-6/+0
| | | | | | | | These tests are marked with CONFIG+=parallel_test, but are observed to fail sometimes if run concurrently with other tests, and pass otherwise. Change-Id: Id59209ca80c7449bdc0689af522c82ff00c4b588 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* PathView was moving view too soon on dragMartin Jones2012-05-141-0/+5
| | | | | | | | In order to allow gesture grabbing to work correctly, the view shouldn't react to a drag until the event after the one that triggered it. Change-Id: I3b84e501aa0f82da821498fa26abe8bbf66a6252 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Avoid accessing sprites until they finish loadingAlan Alpert2012-05-142-0/+87
| | | | | | | | | | Because sprite properties are not valid until image assembly finishes, some features of the sprite engine cannot work until sprite assembly is finished. In these circumstances, we shouldn't crash. Task-number: QTBUG-24797 Change-Id: I2701f9302620c2cfd5b7bc5ce1cb9f31be4d4e19 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* End the deprecation period of SpriteImageAlan Alpert2012-05-147-250/+13
| | | | | | | Also remove the stale files left around. Change-Id: I2f275f23ebfb65045cc683ccd542cbc451b767fb Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix setting drag properties in mousePress.Andrew den Exter2012-05-142-0/+67
| | | | | | | | | Cache the dragX and dragY properties after the onPressed signal has been emitted to allow for deferred creation of the drag object or changes to the axis property in the handler. Change-Id: If154e661359c82e957fcf0cbc11ccc1f75bee919 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Handle Var instructions in instruction dumperKent Hansen2012-05-141-0/+41
| | | | | | | They would show up as "XXX UNKNOWN INSTRUCTION" in instruction dumps. Change-Id: I3bebfe7519ddfb75c413a067ef05867cc07cd71b Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Text benchmarksYann Bodson2012-05-142-0/+135
| | | | | | | | | Benchmarks to compare the cost of creating 42 text items in a grid vs. using a single text item with 42 lines and laying them out using onLineLaidOut. Change-Id: I4c11e23a3fd04bb8b52b5566fb120d336614c98b Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* AnimatedSprite system testsDamian Jansen2012-05-1413-0/+453
| | | | | | | Basic sprite tests to validate frame rate and source changes Change-Id: I0279e89c55a4b5da5a0ee00a40c53ede1e27390a Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Add more benchmark tests for ItemAdriano Rezende2012-05-1413-0/+657
| | | | | Change-Id: I603df39d75a5eddb02a39ab08755991a0655ff19 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix xOrigin and yOrigin to always be top-left posBea Lam2012-05-144-31/+75
| | | | | | | | | | Currently xOrigin is reversed for right-to-left and yOrigin is reversed for bottom-to-top. This is wrong since xOrigin and yOrigin come from Flickable so they should keep that meaning, i.e. the top left corner of where the content begins, in ListView and GridView. Change-Id: I88c77fadd1cf784f4b4d62677168b84675e921b0 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Defer construction of TextEdit/TextInput delegates.Andrew den Exter2012-05-146-3/+25
| | | | | | | | | | | | | | | Don't create instances of the delegate components until the item gains focus, or the cursorVisible property is set to true. Cursor delegates are typically small and relatively fast to create and so won't have a significant cost during a one off focus in event, but that cost can still add up when creating a number of TextInputs or TextEdits at once. If a delegate that is instantiated immeditately is required it is possible to instead create a child item and bind to the cursorRectangle and cursorVisible properties. Change-Id: I5ec2b5b6a30e534aee3dd5a58c6a5ac0686f5ce2 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* QQmlDebugService: Fetch Objects for location infoAurindam Jana2012-05-123-0/+134
| | | | | | | | Fetch Objects for given filename, line number and column number. Change-Id: I9a81e4c7fa75faaf87f02453026c5320b7f86003 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Permit signals to be emitted in a different threadAaron Kennedy2012-05-114-1/+49
| | | | | | | | | | | | The QQmlNotifier approach to connecting to signals did not support the cross-thread signal/slot model used elsewhere in Qt. This change allows one specific case of that - emitting a signal in a different thread than the one the QObject lives - to work. Task-number: QTBUG-25647 Change-Id: Ia8fdaf4c7d7e2ccd7ff7657bb1d8e26277eb60aa Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Allow image providers to force their loading to be asynchronousTor Arne Vestbø2012-05-111-3/+22
| | | | | | | | | | | | | | | | | | The request methods of an image provider are assumed to be synchronous, but sometimes the provider will be implemented in an async manner, eg. through network request or doing the I/O on a different thread. In that case, the provider can't expose this async behavior to clients, but needs to block in the request method. This is less then ideal for clients, since the default behvior of an image element is to load synchronously, so we introduce a new flag to image providers that let's the provider force the loading to happen on the async image loading thread. Similar to network requests (which are always async), this does not affect the 'asynchronous' property of the image element. Change-Id: I9542abbcc594b9aab565210bc3005a95592c1e9c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com> Reviewed-by: Michalina Ziemba <michalina.ziemba@nokia.com>
* Don't use QtDeclarative compat moduleKent Hansen2012-05-114-4/+3
| | | | | | | Use QtQml instead. Change-Id: If899ebc1e0b4ea86f0f8d4369fbd3eb5cbb2181c Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Make unaligned centered alignment optional.Martin Jones2012-05-113-3/+16
| | | | | | | | | | Centered alignment was recently made unaligned by e99c5a3f113bbc1b8f8db996b4b0d5715eea2d89. This has the side-effect of sometimes making items appear fuzzy due to sub-pixel alignment. Since we have two conflicting goals, make this behavior configuarable. Change-Id: I5ed0e9532a64f4a986d148044f5871a7ec970f5f Reviewed-by: Bea Lam <bea.lam@nokia.com>
* QQmlEngineDebugService: Query ExpressionAurindam Jana2012-05-093-1/+72
| | | | | | | | If the scope object is null or if there no QML context for the scope object, try to use the root context of the engine. Change-Id: I0068ea36f18a179b44791b81a2f6b8ec5423f615 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Fix potential crash and leak in Binding.Michael Brasser2012-05-092-0/+68
| | | | | | | | | | | With this patch, Binding will always correctly restore the original binding when it becomes inactive (previously it would sometimes restore a deleted binding). In the future we may want to consider changing to retore the most recently set binding instead (it's currently unclear whether either is a better model). Change-Id: Iddde49de0815b2334ec3369963048554d1c8e105 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* ScriptAction without scriptName shouldn't match a StateChangeScriptMichael Brasser2012-05-092-0/+30
| | | | | Change-Id: Idfce9b25fd2396771f45fc2487bc363edb56ddd6 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Fix weak reference callback in test caseChris Adams2012-05-091-1/+0
| | | | | | | | | | Previously, the handle reference management weak-reference callback would cast the data pointer to a class instance ptr, and clear that instance's handle. This is invalid if the callback gets called after the instance is deleted. Change-Id: I3f77bffa1cb05f8b625c69f08d85662cc3b2e5e1 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Emit runningChanged() signal after running count updatedCharles Yin2012-05-091-1/+4
| | | | | | | | Otherwise, in onRunningChanged handler, the running property won't be updated. Change-Id: I3dccfb346a66c67d455f66f4af3ee8d2b9d8e33a Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix qmltest failure on macBea Lam2012-05-091-2/+2
| | | | | | | | | Increase font size of text content Task-number: QTBUG-25306 Change-Id: I1932389416290cb206818b98df79597690a2992a Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Fix edge case in signal emission semanticsChris Adams2012-05-097-0/+201
| | | | | | | | | | | | | | Signal emission triggered by property changes during an onDestruction handler was previously not well tested. This commit adds several unit tests to ensure correct behaviour in that situation. Those unit tests showed a problem in signal emission related to when children objects are cleaned up. This commit also ensures that if such children own their own context, their onDestruction handlers are called prior to marking the child as deleted. Change-Id: Ibf84ae56ba1134e5d6402b742aee1bdc0e5e4e15 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Stop flicking on a full pixel.Martin Jones2012-05-091-2/+10
| | | | | | | | | When the user flicks/moves the view, stop on a full pixel. This ensures optimal presentation when static without affecting the smoothness of animation. Change-Id: I2d8ae084151f56d8e569fde35fb498866ad60f9c Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Remove QQmlData::objectNameChanged callback.Michael Brasser2012-05-093-0/+38
| | | | | | | | | The objectName property now has a proper NOTIFY signal. Also remove the objectName accessor, as it is no longer required. Task-number: QTBUG-23526 Change-Id: Ib18ba7335bf62a2fe2a9e489cb4c0f1fb142d74c Reviewed-by: Chris Adams <christopher.adams@nokia.com>