aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Stabilize Loader test.Michael Brasser2012-07-101-2/+4
| | | | | | | | Wait for Loader to load its item, rather than using a fixed timeout value. Change-Id: I97ee56d0d7161c9c71a5524f108b0f56d92cc3f3 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Remove unwanted whitespace from test URLsMatthew Vogt2012-07-101-2/+6
| | | | | Change-Id: Ia39c7bc458f46a8a32c1e54a8963b1f89dbbf271 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Use qWaitForWindowActive() where it is required.Friedemann Kleint2012-07-098-22/+24
| | | | | | | | | | | Prepare a change in qtbase in which the implementation of qWaitForWindowShown() will be changed to qWaitForWindowExposed() instead of qWaitForWindowActive(). Try to stabilize further tests by introduing wait functions instead of calls to qApp->processEvents(). Change-Id: I9825885430d78be1610a3fe20023fad24aaacba9 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Speed up TextEdit construction time.Andrew den Exter2012-07-091-3/+5
| | | | | | | | | | | | Defer setting content on the QTextDocument until componentComplete() to avoid unnecessary layouts and move one time setup for the text document from setContent to the constructor. Reduces the construction time of a TextEdit with RichText textFormat by about a third. Change-Id: Idde0772063bf769cde984efddd68589c55a7431a Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Do not permit excessive recursion in component creationMatthew Vogt2012-07-094-0/+68
| | | | | | | | | | Limit recursion during component creation to prevent infinite recursion resulting in a crash. Recursion results from invoking createObject() in the Component.onCompleted handler. Task-number: QTBUG-25439 Change-Id: Ica2ba099d82b5747c938501af04e67f7ace8402e Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Use V4 binding for non-final properties where possibleMatthew Vogt2012-07-0910-0/+210
| | | | | | | | | When a property referenced in a binding is not marked as final, do not automatically abort optimization. Instead generate both V4 and V8 binidngs, and only fall back to the V8 binding if necessary at run time. Change-Id: I1bcc7e2b495935c5d519a9a223f640c1972cdb4e Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Reduce the number of unnecessary layouts on geometry changes.Andrew den Exter2012-07-091-0/+260
| | | | | | | | | | | | | | | | | Improve checks for geometry changes that don't affect layout, i.e width increasing when the previous layout didn't wrap or elide. Set implicit sizes just once during layout rather than setting the implicit width during and the implicit height after to limit the when an implicit size change can change geometry. And if there are multiple layouts of the same text/font combination re-use cached layout data as much as possible by guarding against unnecessary property changes on the layout, and not creating a new layout for calculating the implicit size of truncated text. Change-Id: Ia05e52e9170e1f5d3364896ab119e00d8a318299 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Expand test case for qrc:/ URLsMatthew Vogt2012-07-068-7/+70
| | | | | Change-Id: Ibf8a04efbcb9d39938201f65c1fc0f236243a287 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Allow all explicit margins to override margins.Andrew den Exter2012-07-062-7/+104
| | | | | | Task-number: QTBUG-24515 Change-Id: Ibfc657dec9fd0c8e71cf3686a04ea7b00ad72c11 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Use unique port numbers for http servers in auto tests.Andrew den Exter2012-07-058-25/+30
| | | | | | | Prevents conflicts when tests are run in parallel. Change-Id: Ic1652d963da291c7c41b31e2621874824fa575cb Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
* Fix QQuickApplication::activate test.Andrew den Exter2012-07-051-22/+13
| | | | | | | | | ApplicationActivate and ApplicationDeactivate events are now delivered. Task-number: QTBUG-21573 Task-number: QTBUG-23331 Change-Id: I58e8d7c7730c66ec210f04a74a945d3eece61e01 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* PathView needs drag events similar to FlickableMartin Jones2012-07-041-0/+40
| | | | | | | | Added dragging property and dragStarted() and dragEnded() signals. Task-number: QTBUG-21740 Change-Id: I718835ff7e46af615951ec5f248eba41bac31071 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Improve mouseWheel() functionCharles Yin2012-07-041-3/+3
| | | | | | | Use new angleDela() API and update the documentation. Change-Id: Ie01c979d8c411e81165caedc7e020e39f9d64371 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Improve wheel event handling.Michael Brasser2012-07-041-2/+5
| | | | | | | Use new angleDelta() rather than deprecated event data. Change-Id: I28d0a1ff1bc99b35e1ce3d553e5cb9bdc9362f4c Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Report correct mouse position when made visible with hoverEnabled.Michael Brasser2012-07-041-1/+0
| | | | | | Task-number: QTBUG-24282 Change-Id: I778b2db18c28e2b33690531ec19eb24ecf444a38 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Refresh the TextInput.acceptableInput property when validator changes.Andrew den Exter2012-07-041-0/+10
| | | | | | Task-number: QTBUG-26260 Change-Id: I404640d9a2f000976887dcc2119f971c17a71c7e Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Make Behaviors work correctly with value types.Glenn Watson2012-07-046-0/+127
| | | | | | | | | | | | | | When a value type is referenced by sub-component a grouped property is built. This code path did not handle behaviors being declared on the entire value type. Add support for value interceptors in this code path. Also issue an additional write to the value type property before calling the interceptor on components that are not being intercepted, so that the other sub-components don't get stale values during write back. Task-number: QTBUG-22625 Change-Id: I3365f422dfa1ab2e536e19575efcceceffb85e10 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Add tests for triple click text selection in TextEdit.Andrew den Exter2012-07-042-46/+114
| | | | | | | | | | | Includes a minor behavioural fix for selectedText and getText so that they return plain text strings for plain text content rather than the raw text from QTextDocument which substitutes line break characters with unicode line or paragraph separator character. Rich text documents still return the unicode characters. Change-Id: I19a3a5bba2e4ebb0e6607e19c915a588a9a6c7db Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Section headers ignore list delegate size changes when "colliding"Martin Jones2012-07-041-2/+16
| | | | | | | | Make section header updates part of the layout process. Task-number: QTBUG-23298 Change-Id: I4586bc58bc195fcc47f6db79346727eb6e3d3845 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Allow mouse interaction with 0 opacity items.Andrew den Exter2012-07-042-14/+14
| | | | | | | | | | | Don't filter event delivery to items with 0 opacity, and update the documentation the for opacity, visible and enabled properties and how each affects event delivery. Task-number: QTBUG-19193 Change-Id: Id48e4af763c9a7bbcc13b303342d303155dcadc9 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove QSKIP() for polishOnCompleted() testBea Lam2012-07-031-4/+0
| | | | | | | | The test passes reliably now on Mac. Task-number: QTBUG-21590 Change-Id: I99b9d73cd8bbdd3f0b7df19e148bc02be6227289 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Suppress QWindowSystemInterface inclusion warningsGirish Ramakrishnan2012-07-035-5/+5
| | | | | | | | QWindowSystemInterface is now part of QPA API and should be included using <qpa/*>. Change-Id: I90c71e193d77765b4ec7b92fdbe611b387b2ae4a Reviewed-by: Andrew Stanley-Jones <andrew.stanley-jones@nokia.com>
* Allow resetting a Rectangle gradient.Martin Jones2012-07-034-0/+120
| | | | | | | | | | | | If a gradient and a color are set on a rectangle, the gradient is used. This means that if you wish to override the gradient on a component with a color, you have to unset the gradient. Also remove the unused QQuickGradient::gradient() method. Task-number: QTBUG-23238 Change-Id: Ibd43cfe1bd4b867e4f6103f1d0dc0ed6176ab5c1 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Add nativeScanCode to KeyEvent.Glenn Watson2012-07-032-1/+19
| | | | | | | | | Allow the Qt nativeScanCode value to be passed through to the QML event handler. Task-number: QTBUG-18590 Change-Id: If598e0d65adc0e9bc29cca773a0bda2c8037b661 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add tests for QQuickListCompositor debug output.Andrew den Exter2012-07-031-0/+75
| | | | | Change-Id: I7abb00a28ad4939f95ca743cb35f6947c2ab1010 Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
* Fix crash in QQmlXmlHttpRequestChris Adams2012-07-026-1/+117
| | | | | | | | | | | | | | | | | | If an onreadystatechange handler of a QQmlXmlHttpRequest uses code which requires the engine->callingContext() to be valid, a crash could previously occur (since the callingContext() would be null if the handler was called due to a network request finishing. This commit saves the calling context on send, so that on dispatch we can create an activation scope from that context and use it. Note that even in this case, if the original context had previously been deleted (e.g., by a loader deleting the item context on source change) the saved context could be invalid by the time the dispatch function was invoked. In that case, we simply do nothing as the function call cannot succeed (invalid context). Change-Id: Iba357829a69433c11cc279e6cc9fdc0bedaa31fb Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Use QQmlDataTest to resolve qqqmlanguage test data paths.Andrew den Exter2012-07-022-133/+112
| | | | | | | Fix failures in shadow builds. Change-Id: I008b76cfc0934e87edf07e79aec32bdeedf7d015 Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
* section.property cannot deal with nested propertiesMartin Jones2012-07-022-1/+44
| | | | | | | | Handle nested property names in section.property. Task-number: QTBUG-24569 Change-Id: I0ea6003313108b8232bcd3a3015a4dbbd0753cec Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Use the convential form for the selectedText notify signal name.Andrew den Exter2012-07-021-7/+7
| | | | | | | | | Rename selectionChanged to selectedTextChanged to address an apparent difference to API between TextInput and TextEdit. Task-number: QTBUG-19732 Change-Id: Ibc589c8b43567cb8d2f8c13f7366e2859c7f09d7 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* anchors.mirrored should not exist in QtQuick 2Martin Jones2012-07-021-2/+2
| | | | | | | | | | anchors.mirrored was removed from QtQuick 1.1 before release, however QtQuick 2 was branched before it was removed, so it currently exists in QtQuick 2. Task-number: QTBUG-26369 Change-Id: Iab85f66f6c5f0ebadc5962cc6962cec15203d55d Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Work around test failure for pixmap cache.Glenn Watson2012-07-022-4/+10
| | | | | | | | | | A deadlock condition can occur in the qtbase network management code. Added a work around for the bug, and marked the test as significant for CI on Ubuntu 10.04 LTS. Task-number: QTBUG-25307 Change-Id: I6c11645d29dfd34b564f0a811c6f3470b8f31312 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Adjust MouseArea autotest to check mouse events with transformationsAdriano Rezende2012-06-302-0/+80
| | | | | | | Tests mouse events with graphical transformations applied to the element. Change-Id: I4b69e35cde4125aa047fa18357b22b898da92c20 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Rename speed -> velocity in the particle systemAlan Alpert2012-06-2925-48/+48
| | | | | | | | Matches the convention set in the QtQuick module, for example by ListView and Flickable. Change-Id: I8df57ed1ced8128723d790c30c00cc1b2062787d Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Propagate synthesized mouse events in parallel with touch.Shawn Rutledge2012-06-2814-101/+1543
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old way of event propagation inside QQuickCanvas was to send the touch event through all elements, and if it was accepted along the way, stop. Otherwise generate a mouse event and propagate it through the items in the same way. With this patch the behavior is changed instead to do the propagation in parallel. The idea is to first send a touch, then a mouse event to each QML item (in paint order) that can potentially handle the events. When items filter their child elements, the same logic applies. Other changes/clarifications: - mouse events no longer get synthesized for more than one touch point - TouchPoints can be distributed to multiple Items - if an item accepts a touch point, it always gets updates, even if the point is stationary - events containing only stationary TouchPoints are discarded - PinchArea must accept any initial single TouchPoint in order to receive subsequent updates, even though it's not pinching yet. This means if PA is on top, items underneath don't get touches. New unit tests showing this behavior were added. This patch was written by Frederik Gladhorn, Laszlo Agocs and Shawn Rutledge. Due to the complexity of the logic some refactoring was done. QQuickMouseEventEx has been removed because it inherently relied on using the QEvent d pointer. Change-Id: If19ef687d7602e83cc11b18d2fecfbbdb4e44f5c Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Merge "Merge branch 'buildsystem'" into refs/staging/masterOswald Buddenhagen2012-06-272-3/+2
|\
| * Merge branch 'buildsystem'Oswald Buddenhagen2012-06-262-3/+2
| |\ | | | | | | | | | Change-Id: I230e776290761be7c811c3aec4d915367012fc99
| | * remove pointless qmltest conditionalsOswald Buddenhagen2012-06-261-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | it is a module within this repository, and consequently the flag is always set. Change-Id: I8ffdd6903b1b0835725b824a9deb961d0124ce11 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
| | * don't reference $$QT_BUILD_TREE - it's unavailable hereOswald Buddenhagen2012-06-261-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: Iafef42747b07c900ae22f202c7dfc5c49a1b0f67 Reviewed-by: Alan Alpert <alan.alpert@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* | | Changing PathView offset doesn't set currentIndex appropriatelyMartin Jones2012-06-271-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the highlightRangeMode is StrictlyEnforceRange then the currentIndex should always be updated when the path offset changes. Task-number: QTBUG-19835 Change-Id: I2371e5abd430e770bbb8f9f9d5f4e1d17e0d8ff5 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* | | Implement QAbstractDeclarativeData::isSignalConnected hookKent Hansen2012-06-272-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQml_isSignalConnected is no longer needed, since QObjectPrivate::isSignalConnected will now call the declarativeData hook. Change-Id: I0685b0fa909d6c6c2d275bfa8d41100d9926a046 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* | | Add enum values from related typesMatthew Vogt2012-06-279-0/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If moc marks a type as being related to another type (by using that type's enums or properties), then include the enum values exported by the related type in those exposed by the dependent type. Task-number: QTBUG-22675 Change-Id: I78e72791a4f470200a9ba986a865ffac6c873725 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* | | activeWindow is deprecated, use focusWindow.Thiago Macieira2012-06-272-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | This complements commit 2753e9a795537df10c5a3b64ec9f6d8d81381837, which had begun fixing this issue, but not completed the entire module. Change-Id: I2d167e467c5553cfa49e04410aec9a7d98c7fc6e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | | Do not depend on indirect inclusions: #include and forward-declareThiago Macieira2012-06-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QObject is now no longer indirectly included by qpair.h, so let's make sure it's forward-declared before use. qpair.h also no longer includes qdatastream.h, so #include "qdatastream.h" before using QDataStream. Change-Id: I698b905cb55d9dce0637f534dc5efeffe5ff882e Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* | | Support JS Date object in ListModel with static roles.Glenn Watson2012-06-261-0/+36
|/ / | | | | | | | | | | | | | | | | | | ListModel uses static roles by default for performance reasons. Add JS Date object to list of supported types in this mode, via implicit conversion to QDateTime. Task-number: QTBUG-24456 Change-Id: Ifaa1a8d16290e87b61239ed351a949d66a02990c Reviewed-by: Martin Jones <martin.jones@nokia.com>
* | Rename ListView *speed properties to *velocityBea Lam2012-06-267-12/+12
| | | | | | | | | | Change-Id: I63c02d186b1832e7bf890a00caad150d5bf136cb Reviewed-by: Martin Jones <martin.jones@nokia.com>
* | Fix section delegates not updating when changed.Andrew den Exter2012-06-262-0/+102
| | | | | | | | | | | | | | | | | | Delete all allocated section items before doing an update when the section delegate is changed. Task-number: QTBUG-24899 Change-Id: I09dc7a1c602a49ad7bb37512a7e5116392259457 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* | Position section headers correctly when section property changes.Andrew den Exter2012-06-262-8/+31
| | | | | | | | | | | | | | | | | | | | Schedule a new layout after the section property is changed to correct item positions if section headers are added or removed. Task-number: QTBUG-24900 Change-Id: I7e46ec6dc00e5a810029396a4c5ca4e87ee1d94d Reviewed-by: Martin Jones <martin.jones@nokia.com>
* | Isolate unstable testBea Lam2012-06-261-8/+34
| | | | | | | | | | Change-Id: Id534dc7ff7146799bdb989d8bcf56ca4c0fbeffa Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* | Fix crash in tst_qquicklistview.Andrew den Exter2012-06-263-1/+20
| | | | | | | | | | | | | | | | Destroy the shared canvas before QGuiApplication is destroyed. Task-number: QTBUG-26244 Change-Id: I9aa59bae5314f51c84a61821af2fb3c7a1c77941 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* | Add warning if defining a ListModel with no roles.Glenn Watson2012-06-261-0/+37
| | | | | | | | | | | | | | | | | | | | | | When static ListElement types are declared, the role names are inferred from them at compile time. If they are all empty, it's not possible to add roles to the model, so warn the user of this case. Task-number: QTBUG-21438 Change-Id: Ib4ac30e160c44a5a57ebd1c49fccc2b3db5f0977 Reviewed-by: Bea Lam <bea.lam@nokia.com>