aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Set test data directory correctly for QML profiler testsMartin Jones2012-05-092-2/+2
| | | | | Change-Id: I52f41aacb2963699394dc3ea22d6a4723b189a87 Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
* Adapt to _qpa file rename in qtbase.Girish Ramakrishnan2012-05-082-2/+2
| | | | | | | | | qtbase change 36547f4eff44361f7a6acd0cff107c0e47561f93 renamed qpa headers. Change-Id: I903b48d145837557d305366e2eb4eedd0ad32c14 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Minor optimizations and cleanupAaron Kennedy2012-05-041-5/+1
| | | | | Change-Id: Iecbd5c46af00f649b1f1d78cdf5f2b40a2844897 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* QQmlInspector: Use qmlscene in auto testsAurindam Jana2012-05-046-113/+19
| | | | | Change-Id: I2f265409439183861c0d6d164247348db6097cb3 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Initial bundle supportAaron Kennedy2012-05-0422-0/+429
| | | | | Change-Id: I095249f64ecf4ef1e3fbfb164e3d50edffab61e8 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Change uses of {to,from}Ascii to {to,from}Latin1Thiago Macieira2012-05-045-20/+20
| | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I03084595ddc425a988374b8352fd23e9504ffba6 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Ensure binding target has not been deletedMatthew Vogt2012-05-044-0/+60
| | | | | | | | | | | | Prevent the evaluation of bindings if the target has been deleted. Also, mark an item as queued for deletion at the beginning of the destructor call chain, so that bindings triggered by the operation of the destructor itself are not evaluated (after the context is destructed, if necessary). Task-number: QTBUG-25516 Change-Id: I587ef7923eb749eb7980156ad73822c1fb7c1ff3 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Emit Component.onDestruction before context is invalidatedMatthew Vogt2012-05-047-0/+139
| | | | | | | | | | | | When a component no longer has any live references, emit the destruction signal immediately so that handlers are run before the associated V8 resources are invalidated. Also, when the root context of the engine is destroyed, emit the destruction signal before destroying any resources needed to process the resulting binding invocations. Change-Id: I722dd6e4b60c499b533fc45e33b61e95bca6187f Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Refactor canvas item unit testsCharles Yin2012-05-0421-4931/+5122
| | | | | Change-Id: I99ba84889ce360d2def27834f15af43c2bdf29bc Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Change test size so there is enough detail on each platform.Glenn Watson2012-05-042-18/+18
| | | | | | | | Sometimes this test would fail if the window manager didn't create the window at the requested size. Change-Id: I97e0c139694040950b3ec116899fcf04a0194d55 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove QJS exception APIKent Hansen2012-05-034-62/+17
| | | | | | | | | | | | | | | | | This API has been deprecated for a while. It's legacy stuff from QtScript. Until someone proves that QJSValue::isError() isn't sufficient to handle JavaScript exceptions, we won't provide any additional API for that. Also removed QJSValuePrivate::lessThan(), which was using the exception mechanism, but the function itself wasn't used anymore (another remnant from the QtScript days). Change-Id: I3dffc6a7835874153f90d25ae2a72c93ea6db39a Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix alignment bug in QQuickText with multi-line text and implicit widthYann Bodson2012-05-032-0/+68
| | | | | | | | | | If the horizontal alignment is not left and the width of the text is not known during the first pass, we need to relayout once we know the maximum line width. Task-number: QTBUG-18617 Change-Id: I0cad100946beda151034067e23439185684de144 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Ensure the cursor rectangle is updated when preedit text changes.Andrew den Exter2012-05-034-8/+36
| | | | | | | | | Updating only when the cursor position changes isn't enough because changing pre-edit text changes the width of the pre-edit area and the x offset of all cursor positions within it. Change-Id: I3c0a5e4ad4714a903ca84c1a25374491f34d95a0 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Fix QQuickImage tiling_QTBUG_6716 and mirror tests.Yann Bodson2012-05-032-30/+16
| | | | | | | | | | QQuickView::grabFrameBuffer doesn't crash on mac anymore. Also update mirror test to reflect the way we handle tiling now (centered if no horizontal or vertical alignment set). Task-number: QTBUG-21688 Change-Id: Ifaa321ac0914840562ee61241c8f30d8fe8e8f04 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Port tst_qquickshadereffect to QMetaMethod-based connectNotify()Kent Hansen2012-05-011-6/+7
| | | | | | | The const char *-based API is deprecated and will be removed in Qt5. Change-Id: Ib265719c4314f260f2cf0ee478990658449ca7d5 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Improve QQuickText testsYann Bodson2012-05-015-70/+136
| | | | | | | | Test list support and make sure that we paint the text elements. This should also improve QQuickTextNode code coverage. Change-Id: I96c24cc452c6a4cf16064d580738e6764d859812 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Fix content pos adjustment when resizing first itemBea Lam2012-05-012-0/+160
| | | | | | | | | | | | If visibleItems.first() changes size in a ListView, the size change should be made in the direction of the content flow. This was not working correctly for layouts other than the default vertical+LTR layout. This patch fixes the issue for other layouts and also fixes resizing of implicitly sized delegates (e.g. positioners) within the default layout. Change-Id: Ib1d84ce000a3a341fe617cf644420dc5d589d577 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* More robust tracking of signal handler expression ownership.Michael Brasser2012-05-013-17/+62
| | | | | | | Reference count the expressions, and improve testing. Change-Id: I810509eae1c7608b367e9ff5f7891a294667a692 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Consolidate SignalSpy itemCharles Yin2012-05-012-3/+13
| | | | | | | | | | 1. Add signalArguments to track emitted signal parameters 2. Add valid property to track signal connection status 3. Make count, valid, signalArguments read only properties Task-number: QTBUG-18531 Change-Id: I08e99c1086786a0e5095bf0d04750dec33153fde Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Keep XMLHttpRequest response data after receiving a server errorTopi Reinio2012-05-014-13/+4
| | | | | | | | | | | | | | | | | Fix XMLHttpRequest.responseText being set to empty string whenever a server status code other than '200/OK' is received. XMLHttpRequest specification says that response entity body is to be returned unless the error flag is set, and the flag is set only in case of abort() or network error. This change enables clients to receive additional error information the server may return in the response body. http://www.w3.org/TR/XMLHttpRequest/#the-responsetext-attribute Task-number: QTBUG-21706 Change-Id: I7e44f481494dc7eddea3868d6f92ee45d7ab0c69 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com> Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Ensure context is valid before VME method creationMatthew Vogt2012-05-014-0/+41
| | | | | | | | | | Ensure that a valid context exists prior to evaluation of a VME method function. Invalid contexts can occur if a method's first invocation is triggered after the destruction of the component's context. Task-number: QTBUG-25516 Change-Id: I349a73c5713e178f920c44f5ddcaa1dc6eec199f Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Prevent object being delete by GC before object is fully createdCharles Yin2012-05-013-1/+40
| | | | | | | | | | Add a new flag inCreation to QQmlData. Set it to true when a top-level object begins creation, and back to false when initial creation is finished and the object has been marked indestructible. In the GC callback function, if inCreation is true, skip the GC and make a weak reference for next GC loop. Change-Id: I4ec82864c52f6be0c3e6ef892474dd77d835e152 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* populate transition for positionersBea Lam2012-05-015-20/+211
| | | | | | | | | | Fix positioners to apply a "populate" transition for initially added items. This is consistent with ListView and GridView and also fixes the behaviour from QtQuick 1.x where the positioners were instead running the "move" transition for initially added items. Change-Id: Ib43f1141ce3e7379df085c178b684f89b8567403 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Ensure external value types are initialized before writeMatthew Vogt2012-04-302-0/+39
| | | | | | | | | Ensure that the logic used when writing to a property having a value type provided by an external module matches that used for properties of internal value types. Change-Id: I925b8b30a211ef813e2a51134411a162b0b146b5 Reviewed-by: Chris Adams <christopher.adams@nokia.com>