aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Update var property to null on object deletionMatthew Vogt2012-07-205-0/+193
| | | | | | | | | When a var property contains a pointer to a QObject-derived instance, ensure that object deletion causes the property to be updated. Task-number: QTBUG-26542 Change-Id: I67a59ffd7f09063328d45dc84889add55a5428e4 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* QtDeclarative: Remove usage of deprecated qWaitForWindowShown().Friedemann Kleint2012-07-1918-103/+100
| | | | | | | | | | | - Replace by qWaitForWindowExposed() or qWaitForWindowActive() where applicable. - Use QVERIFY to verify success. - Stabilize some tests by checking for 'active', add missing call to show(). Change-Id: I6cae063e44a3839760ed9f61dacb26cd1717118d Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix include of QWindowSystemInterface.Stephen Kelly2012-07-191-1/+1
| | | | | | Change-Id: I58e2cc04b74f81f3ff5a57f1d86cd5f38f7e4836 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Test that the package configs for QtDeclarative work.Stephen Kelly2012-07-195-1/+104
| | | | | Change-Id: I514e2c6bb1ad7f3d7b72f58e335e3d3dcf0f1542 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add test for large file codepathAlan Alpert2012-07-193-0/+81
| | | | | | | | All black images are stored efficiently enough to not bloat the repo while still hitting this codepath on desktop. Change-Id: Id4b76bec1036849deca096bb8741b186cf18deb3 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Allow QQmlPropertyMap property updates to be controlledMatthew Vogt2012-07-181-0/+44
| | | | | | | | | | Allow clients to control updates made from QML to types derived from QQmlPropertyMap, by overriding the updateValue() function. Task-number: QTBUG-23183 Change-Id: I0169093779ebfe50dc9349f5aaac08ed85c80a8f Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: abcd <amos.choy@nokia.com>
* Add fuzzyCompare() to qmltestCharles Yin2012-07-182-0/+8
| | | | | Change-Id: I4834f4af0839fb89424ed25f0addfb618e5374f8 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Don't double reference items created following a model reset.Andrew den Exter2012-07-173-0/+87
| | | | | | | | | If the model was reset then regenerate and exit immediately rather than processing the change set. Task-number: QTBUG-26536 Change-Id: I9d4f20d450a5116957c9468ba6088caad026a497 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* QQuickCanvas renamesAlan Alpert2012-07-1744-4020/+4019
| | | | | | | | | | | | | | | | QQuickCanvas is now called QQuickWindow QQuickCanvas::rootItem is now QQuickWindow::contentItem QQuickItem::canvas is now QQuickItem::window QQuickItem::ItemChangeData::canvas is also renamed window QQuickCanvas::grabFrameBuffer is now QQuickWindow::grabWindow The functions related to the color property have dropped the clear from their names. The first three changes have interim compatibility measures in place to ease the transition. Change-Id: Id34e29546a22a74a7ae2ad90ee3a8def6fc541d2 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Select appropriate version for located module componentsMatthew Vogt2012-07-175-0/+72
| | | | | | | | | When a located module is imported with a version specifier, ensure that the components resolved from that module use the appropriate version. Task-number: QTBUG-26473 Change-Id: I33209ddef3fe9bb0ab9d096dfe19aff233744afc Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Improved error message wordingMatthew Vogt2012-07-171-2/+2
| | | | | | | | | When a qmldir contains multiple definitions with the same name and version numbers, the error message should indicate that the problem is localized to that qmldir file. Change-Id: I02cd4862c9ead2fd7ed1c75d0fa6949ab3eda6f6 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Remove unneeded mac specific code in QQuickTextYann Bodson2012-07-161-8/+0
| | | | | | | | We don't need to relayout in painting thread. Task-number: QTBUG-26361 Change-Id: Idfad1b90e2772e72411df821d02ea596a094f508 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Skip svg related test that is ASSERTing through no fault of declarative.Toby Tomkins2012-07-161-0/+1
| | | | | | | Task-number: QTBUG-26528 Change-Id: Id4a610ede0a9cbb8e58d8d8f4ff98cde3c27a6ec Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Support remote import pathsMatthew Vogt2012-07-1616-1/+196
| | | | | | | | | | | Probe for installed modules in import path elements which are not local to the machine. Note that all local paths in the import path list will be tried before any remote locations are probed. Task-number: QTBUG-21386 Change-Id: I4f7b9e54e54c1d62a5e7cb7f059ee1e9319ef054 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Fix horizontal alignment of unwrapped text in TextEdit.Andrew den Exter2012-07-165-5/+105
| | | | | | | | | | When the actual width of the text in a QTextDocument exceeds the specificed textWidth it is aligned left irregardless of the text alignment. Compensate by doing our own alignment of the laid out document. Change-Id: I7df900316ffb3ecdf01ddb053480a60a8258182d Reviewed-by: Martin Jones <martin.jones@nokia.com>
* MouseArea: use current value of drag.axisAlberto Mardegan2012-07-162-0/+85
| | | | | | | | | | | | | If the drag.axis is changed while a drag operation is in progress, put it into action immediately. This allows, for example, start a dragging operation out of an item in a scrollable ListView to anywhere on the screen. See the linked bug number for an example. Task-number: QTBUG-26440 Change-Id: Id4219d44d1066dd962319086ac1f2a2a75bb2525 Reviewed-by: Damian Jansen <damian.jansen@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix auto test for tiling image.Glenn Watson2012-07-162-2/+1
| | | | | | | | | | The test was using a resolution that was too high for some of the CI machines. Changing the height to 480 is still high enough to test the tiling functionality. Task-number: QTBUG-26480 Change-Id: I40c731ae316471aeeafc8762a2d258adb2239c7b Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* Adjust Flickable autotest to check mouse events with transformationAdriano Rezende2012-07-142-0/+91
| | | | | | | Tests mouse events with graphical transformations applied to the element. Change-Id: I767a40ca0d5ed748bcb27ad23212ddbc22272fc5 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Remove unneeded qpa/qwindowsysteminterface.h includesShawn Rutledge2012-07-135-5/+0
| | | | | | | They caused a build failure. Change-Id: Id83623f079c80c59067a5b3fb3488ba8572ea453 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* MultiPointTouchArea autotest checks touch events with transformationsAdriano Rezende2012-07-132-0/+87
| | | | | | | Tests touch events with graphical transformations applied to the element. Change-Id: Ie070ed2dc0ab64249455b95c382f920b3cd7b7b2 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Adjust PinchArea autotest to check pinch events with transformationsAdriano Rezende2012-07-132-0/+98
| | | | | | | Tests pinch events with graphical transformations applied to the element. Change-Id: I35810d9859678d4c468c0c1e8614f0928d52775b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Fix signal emission for the Image based items when loading.Damian Jansen2012-07-136-21/+381
| | | | | | | | | | | StatusChanged signals are now always emitted. Other properties only emit when altered. AnimatedImage local and remote loading was also unified in this fix. BorderImage duplicated loading code is streamlined. Task-number: QTBUG-26405 Change-Id: Ib412d5879e0007229a8098e1fa960003051508de Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Fix TextEdit and TextInput test failures.Andrew den Exter2012-07-132-163/+123
| | | | | | | | | | | | | Use qWaitForWindowActive and instead of qWaitForWindowShown where focus is required. Also send events directly to the tested item, instead of getting a pointer to the same object from QGuiApplication::focusObject() which can return null and crash the test if focus is stolen. Change-Id: I6b8956a3afc8ffa58394a957a35b64b1c0924596 Reviewed-by: Damian Jansen <damian.jansen@nokia.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Update multiple value type properties despite interceptorMatthew Vogt2012-07-132-0/+46
| | | | | | | | | | When an interceptor is present on a value type, ensure that multiple properties of that value can be updated simultaneously. Task-number: QTBUG-25139 Change-Id: I3042b9883d404aed4b6507e6d2f38a76caee1196 Reviewed-by: Glenn Watson <glenn.watson@nokia.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Re-enable commented out tests.Andrew den Exter2012-07-121-12/+10
| | | | | | | The dependent task has now been resolved. Change-Id: I6880b9c9240ffdbab6f39845ce700aab4c774f6f Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
* Re-enable tests dependent on QStandardItemModel.Andrew den Exter2012-07-121-21/+4
| | | | | | | | | These were disabled when QtWidgets was not available, but that is no longer necessary following QStandardItemModel being moved to QtGui. Change-Id: I7ed133d9fd5ae6daa5ed9df180f7745fc3f368b1 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
* Enable tst_qqmlpropertycacheChris Adams2012-07-122-6/+4
| | | | | | | | | Due to the lazy metaobject initialization change, the property cache's append method is now private. Instead, it offers a copyAndAppend method which the test should use. Change-Id: I1279eb997832244593aa11d5644d14b31ea68dd2 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix, test and document animation started/stopped signals.Michael Brasser2012-07-112-0/+84
| | | | | | | | | | Rename completed to stopped (as it is not only emitted on completion). Ensure that the started and stopped signals are emitted at the right times. Document the signals. Task-number: QTBUG-14968 Change-Id: Icd3babcef2c9e544476592a26e6b9e58a21ebe95 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* pressed and pressedButtons don't work when multiple buttons are pressedMartin Jones2012-07-112-0/+140
| | | | | | | | | | | | | | | The pressed property would react to any mouse event, regardless of whether it was in acceptedButtons, or there were other buttons still pressed. It will now remain true while any button in acceptedButtons is pressed. The pressedButtons property could contain buttons not in the acceptedButtons mask. It will now only contain buttons that are in the acceptedButtons mask. Task-number: QTBUG-26458 Change-Id: I6b25cc36a58c113de062d530761dc179d7ef4a5a Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Allow color to be explicitly compared to a stringMatthew Vogt2012-07-112-0/+165
| | | | | | | | | | Add the Qt.colorEqual() function which compares any combination of two supplied color and string arguments, by converting the string arguments to colors as necessary. Task-number: QTBUG-18754 Change-Id: I75baef9a2edd30a5f8b9cb5e151e4adba6f6a371 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Add tests for instantiating cursor delegates in the Loading state.Andrew den Exter2012-07-117-4/+114
| | | | | | | | | Components created by QML are usually (always?) ready when assigned to n property, but it possible for an externally supplied component to still be loading, as in the test and the code handles it. Change-Id: I2058e3479e2e711b52af2a0128e6e4c4c3ff7504 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove insignificant flag because test is passing reliably.Toby Tomkins2012-07-111-1/+0
| | | | | Change-Id: I373a013d22a71695399b1d3f03c602eaf68409fe Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix test for value type interceptors.Glenn Watson2012-07-111-2/+14
| | | | | | | | | In release mode, floating point inaccuracies can cause this test to fail. Use a fuzzy compare since it doesn't affect what the test is actually trying to check for. Change-Id: I5e3d073614090450216c33fcc561a7454cf44ac3 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Specify platform that test is insignificant, has flaky behaviour.Toby Tomkins2012-07-111-1/+1
| | | | | Change-Id: If18aaabdb68967a0396c84fe1410b820828acc7f Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Remove superfluous DEFINE no longer used in source code.Toby Tomkins2012-07-111-3/+0
| | | | | | | Task-number: QTBUG-23385 Change-Id: I9115139e62d89db525e79c1800754b7df80d39d6 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Don't provide typehint in QQmlExpression::evaluate()Chris Adams2012-07-112-8/+8
| | | | | | | | | | | | Previously, the result returned by QQmlExpression::evaluate() was converted from the actual JavaScript result with a default typehint of QList<QObject*>. This commit removes that typehint so that the engine's conversion code will choose the most appropriate return type for the result JavaScript value, instead. Task-number: QTBUG-17082 Change-Id: I368a018b235e9e001b1b92db3699de377748b74f Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Improved error messages for malformed .import statementsMatthew Vogt2012-07-1124-0/+173
| | | | | | | | | Report errors in .import statements, rather than pass them through to V8 to yield 'Syntax error'. Task-number: QTBUG-24867 Change-Id: I111b3bd3d198e97f42b29591f61753e86295aeb2 Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Fix broken value-type support by allowing property definitionChris Adams2012-07-1116-13/+967
| | | | | | | | | | | | | | | | | | | | | In QtQuick 1.x the "variant" property type was supported, which could be used to allow value type properties to be defined in QML. In QtQuick 2.0, we have deprecated the "variant" property, but its replacement ("var") is not suited for defining lightweight C++ type values (such as QColor, QFont, QRectF, QVector3D etc). This commit allows those QML basic types to be used in QML once more, by supporting them in the property definition syntax. Note that since some value types are provided by QtQuick and others are provided by QtQml, if a client imports only QtQml they can define but not use properties of certain types (eg, font). Task-number: QTBUG-21034 Task-number: QTBUG-18217 Change-Id: Ia951a8522f223408d27293bb96c276281a710277 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* 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>