aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* TextEdit to honor input direction on neutral textPekka Vuorela2012-04-271-0/+10
| | | | | | | | Text with neutral direction, such as e.g. plain spaces, do not need to make text left aligned on arabic input method. Change-Id: I9aab5244ec47cf80fb2ba0f83e7087430eb2c7bb Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Fix TextEdit with right aligned text when size changesPekka Vuorela2012-04-272-0/+24
| | | | | | | | | | | Geometry change was avoiding updating size of the QTextDocument, thus it was not able to right align before something else triggered size change, e.g. a modification to the text. Also removed unnecessary cursorRectangleChanged signal that was emitted when moving focus with mouse. Change-Id: I293fd5119473eb3def5acd1b3fbb951c12e14412 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* QQuickTextInput aligment to follow input method on neutral contentPekka Vuorela2012-04-271-0/+9
| | | | | | | | | | | | Earlier input method was followed only on empty editor. This made inputting one space character with arabic to be visualized left to right. As related change arabic numbers are aligned right even though the flow goes left to right. Change-Id: I36448949569f6290faad69de14df424575d8b97e Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Avoid calling gc in QQmlEngine destructor.Jędrzej Nowacki2012-04-273-8/+62
| | | | | | | | | | | | | | GC may be expensive. GC call in QQmlEngine doesn't have much sense because V8 will destroy all objects living in a current context. The only problem is that V8 may decide to not invoke weak callbacks which may cause a memory leak. To avoid that we track all QObjects that have JavaScript ownership set and we delete them explicitly. The change reduce time of destroying QQmlEngine by 75%, which is really visible in qquicklistmodel test. Change-Id: I2a3668fd23630669114baee8c241a7ecc4100e33 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Removed parallel_test from parallel-unsafe autotest.Rohan McGovern2012-04-271-1/+0
| | | | | | | | This autotest passes when run alone, but sometimes fails when run concurrently with other tests. Change-Id: Iaaedd29eea994bbf31344957ba24488936451ecc Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Fix bounding rects of text items.Andrew den Exter2012-04-274-47/+360
| | | | | | | | | | Ensure the rectangles are correctly positioned with right and center aligned text, not just sized correctly. Also add padding to the clip rects so the cursor and styled text aren't clipped at the item boundaries. Change-Id: I03ef140589154ebd49b600b0a4c4fbeff845c10f Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Propagate left key presses to the parent item when TextInput is empty.Andrew den Exter2012-04-272-1/+21
| | | | | | | | Don't overwrite the ignore value once it's been set to true. Task-number: QTBUG-25447 Change-Id: I7284147bc525d0971564570f0dd0599cec190905 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* api: remove references to inputPanel.Girish Ramakrishnan2012-04-261-17/+0
| | | | | | | | Qt.application.inputPanel is now Qt.inputMethod. Also, QGuiApplication::inputPanel is being removed. Change-Id: I0033183235fe0fda6adff13cf5eaf4b8206d91fb Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QmlDebugJS: Re-enable autotest on macAurindam Jana2012-04-261-4/+0
| | | | | | | | Execute getScripts() which was previously skipped. Task-number: QTBUG-23475 Change-Id: I8e64b112fe6fa2d032b386f477594c3c21286431 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Debugger: Re-enable autotest on macKai Koehne2012-04-261-1/+0
| | | | | | | | Remove insignificant test after recent changes. Task-number: QTBUG-25288 Change-Id: I4ec6237ede78dee4f362abe3135fcec32031fb75 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* QmlDebugging: Exchange supported QDataStream versionsAurindam Jana2012-04-263-5/+72
| | | | | | | | | Since the client and service needs to pack/unpack datastreams, they need to encode/decode using the lowest common QDataStream version. Change-Id: I3b4886fece59b24950ba618da07a0fefd41a5637 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Specialize for QJson types in the QObject meta-call bindingKent Hansen2012-04-262-0/+102
| | | | | | | | | | | Avoid falling back to QVariant conversion; make the overload handling consistent. Also make the MaxSizeOf template helper class actually compute the correct size needed for the argument storage. Change-Id: I04afb378bd89743d542973cc3bb0ceb729b400d9 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Re-enable qmltest on non-Mac platforms.Jason McDonald2012-04-261-1/+1
| | | | | | | | The test only fails on Mac, so only make it insignificant on Mac. Task-number: QTBUG-25306 Change-Id: If8ca4422ad1db38392397770ef3004ed4a0e8274 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Use fixed font size in testAlan Alpert2012-04-261-0/+1
| | | | | | | | | Otherwise, system defaults can lead to different wrap points on different platforms. Task-number: QTBUG-25306 Change-Id: I4082fb2f9a805982e7c8d076154983af0a393226 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Remove relative directory elements in import pathsMatthew Vogt2012-04-263-6/+53
| | | | | | | | Avoid unnecessary conversions to/from QUrl. Change-Id: If52e78cfdaf4fe344f34d961e300b21dd4a11fb2 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Debugger: Change name and protocol of QDeclarativeObserverModeAurindam Jana2012-04-251-21/+25
| | | | | | | | | Rename QDeclarativeObserverMode to QmlInspector service. This is because the current protocol has been changed completely and just a version change is misleading. Change-Id: I3b72f081f6ab77eac474dcef7a84375ef69e20dc Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Debugger: Fix warnings about declarative_debug in autotestsKai Koehne2012-04-257-7/+13
| | | | | | | declarative_debug is deprecated and will be removed eventually. Change-Id: I1f5a61c91c25e37ff39e9154bcaa3cd74d60e109 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Debugger: Improve output of autotestsKai Koehne2012-04-259-50/+101
| | | | | Change-Id: Ib938d2f39d8a0928c257ef923df5d5fcfa85c4cf Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Make touch event delivery in the canvas reentrantLaszlo Agocs2012-04-251-1/+51
| | | | | | | | | | | At the moment the unlikely case of spinning the event loop from a QQuickItem event handler for TouchBegin is not handled properly: It will end up not delivering the subsequent TouchUpdate and TouchEnd events to the item, leaving it in a state that should not normally happen. Change-Id: I668d065c9cf1a299bfd9268a9125d7a7e32f6786 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Debugger: Make sure stateChanged is called from debugger threadKai Koehne2012-04-243-2/+18
| | | | | | | | | | Make sure stateAboutToBeChanged(), stateChanged() is always called from the debugger thread. This matches how messageReceived() is called. On exit, run an event loop until all stateAboutToBeChanged calls have returned. Change-Id: I9cd6199cc80552ad97e4b7d504ea91aa116a6a34 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Mark all Latin 1 strings with QString::fromLatin1 or QLatin1StringThiago Macieira2012-04-241-8/+8
| | | | | | | | | This is in preparation of QString's constructor using UTF-8 by default Change-Id: Ibd0a585342af572e3f74636deb97c1b6b3afeb9a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Verify that QML can reliably receive datetime info from C++Matthew Vogt2012-04-2410-0/+395
| | | | | | | | | | | | | | Since a JavaScript Date object does not contain any information about the timezone in which it is specified, a C++ module that exports datetime information to QML must also provide the relevant timezone data so that clients can correctly interpret the datetime value. Provide an example of exporting datetime information to QML, verifying that the data can be correctly interpreted in JS. Task-number: QTBUG-25262 Change-Id: I732797da225861470e6b034f2e3d89a43df36cf7 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Record current status of date conversion from QMLMatthew Vogt2012-04-249-15/+246
| | | | | | | | | | | | Ensure that the qqmlecmascript test is not broken by changes in the time zone of the test environment. This test documents the existing situation with convertibility of date information between QML and JS. Task-number: QTBUG-25262 Change-Id: I42716e0b34ef26daa391fdb4aebc1f31340fcea0 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Add support for var properties in V4Matthew Vogt2012-04-242-0/+76
| | | | | | | | | | | | Support initialization of var properties in V4. Var properties, which can only be manipulated by V8, are constructed directly into the form in which they will be stored. Task-number: QTBUG-25022 Change-Id: I27c6af9f8a310e7baec91bef2593c8518ec1e462 Reviewed-by: Chris Adams <christopher.adams@nokia.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>