aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Fix the evaluation of JS switch statements in QML bindings.Roberto Raggi2011-11-296-0/+264
| | | | | | | Task-number: QTBUG-17012 Change-Id: Ic132cf63ed08592fec9c759df1b8b4d5830acea6 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Properly protect access to pixmap reader thread with mutexChris Adams2011-11-296-0/+85
| | | | | | | | | | | | | | | | | | Previously, access to the reader thread wasn't guarded properly, causing a crash when the reader thread was deleted prior to QDeclarativePixmapData (which then attempted to dereference the thread pointer to cancel the request). This commit adds locking to ensure that access to the reader is protected properly. This commit also fixes an issue where if a QDeclarativePixmapData was deleted after its QDeclarativePixmapReply was removed from the jobs queue but prior to processing, a pointer to the data could be dereferenced as part of processing, but caching the required information in the reply. Task-number: QTBUG-22125 Change-Id: I32aa2ca41a297b48e68cb358f4aa4fafd999f215 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add a length property to TextEdit.Andrew den Exter2011-11-291-1/+9
| | | | | | | | | | This returns the length of the unformatted text in a TextEdit which should be cheaper to query than the length of the text property and meaningful in the context of the selection and cursor properties. Task-number: QTBUG-18949 Change-Id: Ia25c4553693923f97d299f1fdb8bfcf7f5937b13 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add indexed deleter to sequence wrapper, implement length setterChris Adams2011-11-292-6/+47
| | | | | | | | | | | | | | | | | | Previously, elements could not be deleted from sequences directly without reassignment. This commit adds an indexed deleter which allows elements to be deleted by specifying an index. A deleted element will be replaced with a default-constructed element in the sequence (slight departure from ECMA262r3 which specifies that it should be replaced with Undefined). This commit also implements the length property setter according to the requirements on Array [[Put]] by ECMA262r3 which allows removal of elements from a sequence (required for proper behaviour of Array.prototype methods such as splice() and pop()). Task-number: QTBUG-22808 Change-Id: I62511b3edc2ec35f92d2a2bd719278e129c98547 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Initial window implementationAlan Alpert2011-11-292-0/+44
| | | | | | | | | Includes adding a color property on QQuickCanvas. Note that most Window related properties come from the QWindow inheritance. Task-number: QTBUG-19799 Change-Id: I00f6c90a1e2a5c85d787793d6edac2cd7d5309ab Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Fix test cases including headers with fixed Qt versionPekka Vuorela2011-11-283-3/+3
| | | | | | Change-Id: Id6a8e9bf732d3eab69f1ef337dde626845125507 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Remove unused QTBUG_21691 macrosJoona Petrell2011-11-282-8/+0
| | | | | Change-Id: I481fe67d1511d927da805e3fafe5ddd55b0ad0c7 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* QtDeclarative: Fix warnings in tests.Friedemann Kleint2011-11-2810-15/+21
| | | | | | | | | | | - Unused parameters - Missing interfaces - tst_QQuickListView: Fix call canvas->rootContext()->setContextProperty to use a QVariant (instead of implicitly converting to QObject*) which was apparently intended. Change-Id: Idc95d9408051e6f5b7005a7eccd764ac218ff867 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add a getFormattedText function to TextEdit.Andrew den Exter2011-11-281-1/+112
| | | | | | | | The same as getText except it include formatting tags if the TextEdit has a rich text format set. Change-Id: I601e8d396254ab6105aa7d105e25b14fcf69c4e5 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove obsolete include from QDeclarativePixmapCache testJason McDonald2011-11-281-3/+0
| | | | | Change-Id: I5583bb8c4f98b7e1b8a7daec7a3ab53a1d931f56 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix multiline eliding and support eliding when height is set.Martin Jones2011-11-282-0/+54
| | | | | | | Task-number: QTBUG-22920, QTBUG-22116 Change-Id: Ibe78ce1b0b438eec32955b986a8740f173cd082f Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* qdeclarativedebugclient: Fix flaky autotestKent Hansen2011-11-281-1/+1
| | | | | | | | | The connectToHost() call can try to establish the connection directly (synchronously), in which case the warning message will be output before the subsequent ignoreMessage() call, causing the test to fail. Change-Id: I08a6a7d4d090cbb942c348e0787b586c71318f99 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* QtDeclarative: Fix building of tests on Windows.Friedemann Kleint2011-11-252-2/+3
| | | | | | | Export inner classes, add missing module. Change-Id: Iabc69ac5f08b70ade994c26d36bd08359fa71137 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* QtDeclarative: Remove obsolete qmetaobjectbuilder-test.Friedemann Kleint2011-11-253-1279/+1
| | | | | | | The test now lives in qtbase. Change-Id: I50166795d8cae039272bc9448b9e1fc64248e10f Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Fix crash calling VisualDataGroup.setGroups during initialization.Andrew den Exter2011-11-251-1/+45
| | | | | | | | A VisualDataModel's meta type is constructed in componentComplete(), avoid accessing it before then. Change-Id: Ic9fdfa3c458d5da3014289b777f74df87aa97103 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix searchs for insert positions in QDeclarativeListCompositor.Andrew den Exter2011-11-251-0/+47
| | | | | | | | | | | | When scanning for a start range don't stop on ranges that don't have an group flags unless that range is the terminal range. This fixes a couple of issues where moving an item to the end of the list would position it after a prepend only range instead of before it, or would miscalculate the iterator offset resulting in invalid indexes in the insert range. Change-Id: Ic4aa001edf43ec86a65d432cd8f80abf0b44d276 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove ints from mouse event handling.Martin Jones2011-11-251-5/+4
| | | | | Change-Id: Icda13ae3644dc274e08e626545df75d3e561cf87 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Add getText(), insert(), and remove() functions to TextEdit.Andrew den Exter2011-11-251-0/+539
| | | | | | | | | | The getText() function provides access to the plain text content of a TextEdit, and the insert() and remove() functions allow the text content to be edited inline instead of having to assign an edited string to the text property to make any change. Change-Id: Id4edf0312358e2d2db45e4c649b7bd3d22f02ffa Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Improve performance on touch event delivery.Martin Jones2011-11-244-1/+141
| | | | | | | | | | | | We continuously constructed and sorted the paint ordered items for every touch event (and paint), even though the list in most cases is identical to the childItems list, and when it is different it rarely changes. Detect when we can just use the childItems list directly, and otherwise cache the ordered items list. Change-Id: I5db0f19fc021d0c95aa6f8372ae47e6ce138d5ad Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Make the particles benchmarks compile againKent Hansen2011-11-242-2/+2
| | | | | Change-Id: Ia56fcb06ee1ef73d81288358f584cb65e3242254 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Added test for input method selection in TextInputPekka Vuorela2011-11-241-0/+13
| | | | | Change-Id: I4438625f9bb82e53bbdf173c9148f587984d7f81 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* TextInput elements not to have tentative commit in inputMethodQueryPekka Vuorela2011-11-242-0/+44
| | | | | | | | Tentative commit should not be part of surrounding text, it's already a property of the input method. Change-Id: I64aec9763fb20770b6729f7f59dcbe23cf5a6718 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* ConsoleAPI: Use environment variableAurindam Jana2011-11-2410-54/+193
| | | | | | | | | Show detailed information, such as file and line number, for console.log, console.debug and print when the environment variable QML_CONSOLE_EXTENDED is set. Change-Id: I8f660f58d0fd08971ce9706b4a418ed60f312980 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Get rid of unused inputMethodQuery and inputMethodEvent functions in ↵Joona Petrell2011-11-242-17/+47
| | | | | | | | | | | | QQuickCanvas * in Qt5 input method events and queries are meant to be sent directly to QInputPanel::inputItem() instead of the focused QWindow * protected inputMethodEvent was actually never called by QWindow::event() like it called other specialized event functions Change-Id: I68cced106808098c320841d6a17a0cc170a8369f Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Skip tst_QQuickListView::resizeFirstDelegate unstable testMartin Jones2011-11-241-0/+2
| | | | | | Task-number: QTBUG-22872 Change-Id: Ie77701f4f2ab5c56106f9c58b9ace869868e3452 Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
* Debugger: Extend v8 debugger autotestsKai Koehne2011-11-233-49/+179
| | | | | | | | Add a few test cases for attaching to a non-blocking process (using the new timer.qml test file). Change-Id: I480fb358411b5b19e22bc9875e1809f1faad5514 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Debugger: Re-enable autotests for v8 debuggerKai Koehne2011-11-232-2/+1
| | | | | | | The crash in getScopes has been fixed in qtbase (commit ecd31946789) Change-Id: I853d2567701ac986b30fc9013dac4c05eb450c9a Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
* Debugger: Make registration of services explicitKai Koehne2011-11-232-3/+3
| | | | | | | | | | Services now have to call registerService() themselves in the constructor. This fixes a race condition where the empty implementation of messageReceived() was called instead of the one in the subclass because the object wasn't fully constructed yet. Change-Id: I590ec8b76e906bdb6b5cdcb18680938edde283ee Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Don't crash when importing script with syntax errorKent Hansen2011-11-236-0/+66
| | | | | | Task-number: QTBUG-22843 Change-Id: I2b1ed6cbbc7a566f54b441359941ea121a9033ba Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Fix PathView insertion/removal/move item offsetMartin Jones2011-11-231-0/+314
| | | | | | | | | | Fix item positioning post model changes and add auto tests. Also fixes crash when inserting items before currentIndex, causing offset to increase beyond item count. Task-number: TBUG-22785 Change-Id: I17000ba497a190554c8b137a72b7e6551e8a0e56 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* tst_QQuickGridView::unaligned() was failing on macBea Lam2011-11-231-1/+1
| | | | | | | | Failing when threaded renderer is enabled. Ensure remove is applied before testing the result. Change-Id: I156efb43735ee0efd6a6f0b9a721979aafe17605 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Stabilize Behavior tests.Michael Brasser2011-11-231-4/+7
| | | | | Change-Id: I6ef68fa5f8fd7731c3e683de517ec3a2cb05365b Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Don't disconnect mid binding evaluationAaron Kennedy2011-11-222-0/+30
| | | | | | Task-number: QTBUG-22816 Change-Id: I7a958203945a051322228b6fade9e1d49d5f4c4a Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Debugger: Move server into it's own threadKai Koehne2011-11-222-9/+23
| | | | | | | | | | | | | | So far the debugger infrastructure was running in the GUI thread, which required e.g. nested event loops to implement blocking behavior. The server and networking code are now running in their own thread, while the services are still running in the main thread. Because v8 isn't thread safe, we're adding two new JSEngines + isolates to qv8debugservice: One to decode JSON messages in the debugger thread, and one in the GUI thread. Change-Id: I746f5e203968f7bcc510fb66118c88ef0fd0cd14 Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
* Fix inserting before the visible area into cache bufferBea Lam2011-11-222-0/+182
| | | | | | | | | | Items being inserted after the visible index must be created, even if they aren't in view (e.g. are in the cache buffer) otherwise they will not appear at the correct index in the visibleItems list. Task-number: QTBUG-22772 Change-Id: I235dc766a6abf4988872bb70aa40cdc767df8c96 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Try again to fix currentIndex() testBea Lam2011-11-221-0/+1
| | | | | | | | | | Seems that if the threaded renderer is disabled, updatePolish() isn't called on the view until after setCurrentIndex(), so then the view starts at the wrong position and never moves upwards when setCurrentIndex(0) is executed. Change-Id: I74da9de8ac432d27189416287e7ea5937c1d6299 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Move path with highlightMoveDuration: 0Martin Jones2011-11-221-0/+13
| | | | | | | Task-number: QTBUG-22786 Change-Id: I10043bfa5d8c622fc4e7a25bcb1f96ef43d23890 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Qt.locale() and JS locale type extension.Martin Jones2011-11-227-0/+1270
| | | | | | | Task-number: QTBUG-17129 Change-Id: I69cbbe858735b750b4e37ce489f2fa1ad5d8b5d3 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Emit destruction signal before child contexts are destroyed.Glenn Watson2011-11-223-0/+31
| | | | | | | | | | | | | | | | | Verbatim comment from bug report: When using a QtObject inside an item, and then we call a function in the Component.onDestruction handler of that item, we get a crash. This happens because the QDeclarativeContextData engine has been invalidated before reaching QDeclarativeExpressionPrivate::evalFunction. Change code to emit the onDestruction signal before the child contexts are invalidated. Task-number: QTBUG-22535 Change-Id: Ic4983ae5fdf104ae977189c21dc202c9b02bc2bc Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Fix default property preventing signals from being emitted.Glenn Watson2011-11-222-0/+35
| | | | | | | | | | | | Change the way connectAlias works so that even if the target for the connection is not available immediately, anything that is bound to it is notified when the target is changed. (Fix is authored by Aaron). Task-number: QTBUG-21580 Change-Id: Ida23c0e620069c50b123c71b5078929d4c7ec4e4 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix failing openInputPanel autotestsJoona Petrell2011-11-222-2/+59
| | | | | | Task-number: QTBUG-21946 Change-Id: I605aca3ba5b01414c9533ca9673f1b51917df755 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Debugger: Fix Qt library dependencies for autotestsKai Koehne2011-11-219-10/+9
| | | | | | Change-Id: Icf5465a60c7b76d5b80d0ecb40a2bd7eaa2a3689 Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com> Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Debugger: Fix QDeclarativeDebugTrace autotestKai Koehne2011-11-211-3/+3
| | | | | Change-Id: Ic17c42b6a6e388b92729fd2f653515b714f765b0 Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
* Fix GridView currentIndex test stabilityMartin Jones2011-11-212-0/+4
| | | | | Change-Id: Ib3a8efdc4447712f9877b70338027efcceff558f Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Fixed compile of tst_qdeclarativelistcompositor with -qtnamespace.Rohan McGovern2011-11-211-0/+2
| | | | | | | This operator== must be in the Qt namespace. Change-Id: I28cece2b5f54efc3b2b5aed2ef675ff1b6056370 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Don't leak objects when a VisualDataModel is destroyed before a view.Andrew den Exter2011-11-215-0/+121
| | | | | | | | | | If an item is still referenced by a view when the VisualDataModel is destroyed delete it, otherwise it will leak as the view have no interface to release it and deleting the item won't delete the package. Task-number: QTBUG-22672 Change-Id: I7b89962d724d7a391c97722638e03b7a186b8a8f Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* GridView sometimes lays out one less column than expectedMartin Jones2011-11-212-0/+75
| | | | | | | | | | If the cellWidth/cellHeight was not a whole number the wrapping was unreliable. Calulate column positions more robustly, i.e. avoid comparing values subject to rounding errors. Task-number: QTBUG-21846 Change-Id: Ic3a90b36d542ce8af49461bd524e4405c74aece5 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Rewrite signal handlers at compile time.Michael Brasser2011-11-201-2/+11
| | | | | | | Task-number: QTBUG-22726 Change-Id: If2c3c00c646b2ed6b6899573a0b487c8deeaad3f Reviewed-by: Kai Koehne <kai.koehne@nokia.com> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Un-skip Positioners testAlan Alpert2011-11-181-1/+0
| | | | | | | | | This test was skipped because it inexplicably led to a crash on exit, but this crash is now fixed. Task-number: QTBUG-21995 Change-Id: I439a410a7f36adef9924d163941a79a39886a5d1 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Mark unstable test to be ignoredAlan Alpert2011-11-181-0/+1
| | | | | | | Task-number: QTBUG-22807 Change-Id: I59b4d49c049756d2d133d1455165d16218042663 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>