aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Fix compilation with GCC 4.7 (C++11)Thiago Macieira2012-06-234-6/+6
| | | | | | | | The error was: error: unable to find string literal operator ‘operator"" STR_PORT’ Change-Id: Id4b4e64e296ffc3624be15c20f74a964e6cd1087 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix crash when dragging items outside visible area.Andrew den Exter2012-06-221-18/+58
| | | | | | | | | | | | | | | | | | If asynchronous item creation finishes while the content area of a ListView has been dragged full outside the visible area a full refill is triggered which can overwrite the requested index and potentially result in a single delegate item being assigned to multiple view items and later being doubly released. Only create the view item object in the createItem function to prevent this from happening. Secondly only reset the visible items if jumping outside the buffer range rather than just the fill range to prevent churn when the list only contains buffered items. Task-number: QTBUG-26232 Change-Id: I5bce845898ef5f699f34afc268594ef38e01d6a3 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add gui-private to testsGirish Ramakrishnan2012-06-2225-25/+25
| | | | | | | QWindowSystemInterface will be marked as QPA API. Change-Id: Id174a24f8432219adf1425efe1eb59cf67d48bb9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Pass the right signal index in visualadaptormodel proxy meta-objectKent Hansen2012-06-222-1/+3
| | | | | | | | | | For QMetaObject::activate(), the index must be relative to the class's own signals (excluding non-signal methods). For QMetaObjectBuilder, the notifier index must be relative to the class's own methods. Change-Id: I22f55d1fc55d56c997135dc78f51b710b37bb01a Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Remove insignificant_test from DropArea test.Andrew den Exter2012-06-221-2/+0
| | | | | | | | The test has not been failing on recent CI runs. Task-number: QTBUG-24588 Change-Id: I9dd29bbf1a33d9fbf042693a0995dafd887c3064 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Remove the open and closeSofwareInputPanel functions.Andrew den Exter2012-06-222-16/+0
| | | | | | | | | Functionality is provided by the global Qt.application.inputMethod object. Task-number: QTBUG-21449 Change-Id: I75c082bcbe44c8834ccaf966a3f9a09ab91ec290 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Rename Flickable x/yOrigin to originX/YBea Lam2012-06-223-27/+27
| | | | | | | | This is consistent with the naming of other x/y properties, e.g. contentX/Y, relativeX/Y etc. Change-Id: I5159f8e54a6fda6a1f83a563ea9db47c3b8af238 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove properties related to highlight speedBea Lam2012-06-227-13/+0
| | | | | | | | | | ListView should only have duration-type properties (i.e. highlightMoveDuration and highlightResizeDuration) as it's unnecessary to have both duration and speed properties for the highlight animation. (PathView and GridView only have the duration-related properties.) Change-Id: I1b94599e3e89afe6488ce2a882c2802354a859fe Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add some tests for literal parsingMartin Jones2012-06-222-0/+68
| | | | | Change-Id: I3f3047cf27b1e5d230db0ed4154bac09e6adf087 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Handle enum values of -1 correctly.Michael Brasser2012-06-224-1/+14
| | | | | | | | | | This was already handled correctly most places; now the remaining cases (using an enum in ListModel, and assigning an enum to an integer property) should also work correctly. Task-number: QTBUG-21679 Change-Id: Ibff13f0b94da94b18e2e3bae4aa6ba44e0fa944b Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Clarify anchor error messages.Michael Brasser2012-06-221-3/+3
| | | | | | Task-number: QTBUG-24625 Change-Id: Icff9fe16f053f7e79039ef31bb56cae00cdf49d1 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Add tests for clicking and dragging with right and middle buttons.Andrew den Exter2012-06-224-21/+222
| | | | | | Task-number: QTBUG-24461 Change-Id: I2c8b3455cb3aead5df7dfd85f65eb633a552b881 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix locale test on Linux and skip it on Windows.Glenn Watson2012-06-222-7/+38
| | | | | | | | | | | The timezone that V8 internally uses was not being updated at the end of one test, causing failures in subsequent tests. This was only showing up on Windows because the test was being skipped on Linux due to a typo. Skip the test on Windows due to complexity of changing the timezone (added comments in code with details). Change-Id: I47c8542111e8ddfbdeff39815c50d98570b0c6c2 Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
* Support enum return types in Q_INVOKABLE functions.Matthew Vogt2012-06-223-2/+34
| | | | | | | | | Handle enums correctly when used as the return type of a Q_INVOKABLE function. Task-number: QTBUG-23543 Change-Id: I14a506ffee08f5ba6aa0fdf27d6104a3ae5c48b3 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Report clashing qmldir entries for components and scriptsMatthew Vogt2012-06-227-0/+22
| | | | | | | | | | If a qmldir contains multiple lines that install the same versioned property for a single component name or script qualifier, report an error rather than silently suppress one entry. Task-number: QTBUG-25834 Change-Id: I25d3a24102a5a4fa3d82f1d31d7e52505026fff7 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Put basic language types into QtQml importChris Adams2012-06-2110-0/+116
| | | | | | | | | | This import is automatically registered by the engine. It provides basic language types (Component and QtObject). Note that the QtQuick import still has these types registered into it, so this commit doesn't break existing code. Change-Id: I8ff190f057fc92969020cf8e896da1649ca3069b Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Disallow signal-handler-specification for non-signal methodsChris Adams2012-06-213-0/+13
| | | | | | | | | | | | | | Previously, the code which checked whether a signal handler specification was valid was incorrect, in that it only checked that a method of the appropriate name existed (rather than specifically a signal method). This commit ensures that the appropriate code is updated to check the method for signal-ness. Task-number: QTBUG-26223 Change-Id: I306f6622aaa710d86c01d5bbc5146eecce7cf2c3 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Enable literal Qt enum assignment to enum properties.Michael Brasser2012-06-213-0/+41
| | | | | | | | Assigning Qt global enums to enum properties was previously handled as a binding, rather than a literal assignment. Change-Id: If6bb65f63b34f4e10c0636221ddadb11f7025735 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Fix warnings in declarative tests.Friedemann Kleint2012-06-207-18/+22
| | | | | | | | | | | | - Unused variables and test data. - () around operator &&. - Conversion of false to 0-pointer where QVariant was intended. - Missing enumeration value. - Remove duplicated qqmlecmascript entry from qml.pro (has an internal check for no-widgets). Change-Id: Ie030167e22bce26e3988a4406c630fb460f61a3c Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Mark tst_qquicklistview insignificant for Mac.Friedemann Kleint2012-06-201-0/+1
| | | | | | | Task-number: QTBUG-26244 Change-Id: I314fa5293ffaa72dafa843d1a950d0abed5a4516 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Don't start running if a frame property is setAlan Alpert2012-06-201-1/+0
| | | | | | | | | | | | This fixes an error where running couldn't be reliably set, if a frame property was also being set during initialization. With this fixed, the autotest is no longer unstable. Also fixed is a related issue where start/stop/restart were active before componentComplete. Change-Id: I34c6d872f2f146d38c65167eda8c0a97525d7f4e Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Align windowShown flag with qml renderer stateCharles Yin2012-06-141-1/+0
| | | | | | | | | | Previously, we set windowShown to true once the window is active, this is not enough for some tests as the initial rendering may not be finished yet and will give the wrong result for some tests which require reading back pixels. Change-Id: Idd67329d207aaf1734a795b40a5bcc40093cf6b8 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Set a non-zero default cacheBuffer.Martin Jones2012-06-1330-1/+38
| | | | | | | | | | The likelihood of constant framerate when flicking is considerably improved by having a cacheBuffer. Since there is only a minimal cost in having a modest cacheBuffer, it is better to have a more optimal default value - 320 seems a good starting point. Change-Id: Id3c8a153821573b5b08c6fbd80d34152908d358d Reviewed-by: Bea Lam <bea.lam@nokia.com>
* tst_qquicklistview: further increase test timeoutKent Hansen2012-06-131-2/+1
| | | | | | | | | This test has timed out on a recent test run, but appeared to be making progress. Increase the timeout, and remove the insignificant_test flag. Change-Id: Ic3d5f0dbf43e5d0a284ae87c9fd21552b759cbad Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove non-templated qobject module api registration functionChris Adams2012-06-125-40/+11
| | | | | | | | | | | | | Previously, both templated and non-templated qobject module api registration functions were provided as public API. The non-templated version is identical to the templated version, except that bindings which access properties of module apis registered with that function cannot be optimized with v4. This commit removes the non-templated version of the function. Change-Id: Ic417aa241f1172bf6d055bdc7f528d7e9304097b Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add pixel comparation support to qmltestCharles Yin2012-06-121-0/+74
| | | | | Change-Id: Icdee3fab497cc46260bbb9af89f4402fdc027fef Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Allow setting horizontal and vertical tile modes in sci filesYann Bodson2012-06-125-0/+57
| | | | | | | | | It was still using the old 'tileRule' name. Also make sci file parser less strict with h/v tile mode values. Task-number: QTBUG-26022 Change-Id: I41b7571b42a0fb9bd2cfab8ce2e76e57addabefd Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Emit itemChanged when Loader fails to load a source.Alan Alpert2012-06-121-1/+1
| | | | | | | | | | | | As per the source comment, it is not actually tracked whether item was null before. This is consistent with the behaviour in loadFromSource, where setting a source to null always emits item changed. This is reasonable behaviour, because it only occurs in unexpected error states where the program logic likely expects a changed signal anyways. Change-Id: I160ab04dc1b5c578ee508f4adbca65e8da5b16be Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Fix view delegate parent binding regression.Martin Jones2012-06-122-0/+56
| | | | | | | | | | | | 762b4d90110465aeceb96f44cd06dcda229dfe89 introduced a regression by setting the item parent after completion. This was to avoid rendering an incubated object before completion. However this breaks bindings. Restore setting the item parent before completion, and ensure items are not rendered until completed. Change-Id: Ifc9d0c34ee62e687889c32ffab7c091b4c8cc470 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Check for null ptr in qmlobject_cast definitionChris Adams2012-06-121-0/+20
| | | | | | | | | Previously, the input object wasn't checked for nullness, and thus the qmlobject_cast could assert. Change-Id: I3552150953cef8411a860a381e28b1d681494b08 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Mark qquickanimatedsprite autotest as insignificantKent Hansen2012-06-121-0/+1
| | | | | | | Failed twice on macx-clang developer-build OSX 10.7 only. Change-Id: If6b4aa6b88c5db8eaa04dd241bc0b43808b3983a Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Mark qquicklistview autotest as insignificantKent Hansen2012-06-121-0/+1
| | | | | | | Flaky on macx-clang developer-build OSX 10.7. Change-Id: I4e8b7604dff9dd64efd6110e2cbde461d82b94d3 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Emit currentFrameChanged signal when neededAlan Alpert2012-06-122-0/+93
| | | | | | | Task-number: QTBUG-25039 Change-Id: I8bd5fd40a5fee1314f0401ed4708d73ed1cfad94 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Allow Loader to load non-Item types.Martin Jones2012-06-121-3/+8
| | | | | | | | | Loader has a more convenient API for loading/unloading components than the dynamic object creation APIs. Remove the Item-only restriction. Change-Id: I6f9ecc8514ff1e814f7e56a3386814ba211b7e4f Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Fix handling of a direct child stealing focus from a parent-less item.Andrew den Exter2012-06-081-1/+27
| | | | | | | | | | | | When an item gains focus it will remove focus from the previous item that held focus. Normally this is the sub-focus item of an ancestor item, however if the item with focus is at the root of the tree there will be no sub-focus item and the focus of root item needs to be cleared instead. Likewise if an item doesn't have a parent, focus still needs to be removed from any sub focus item. Change-Id: I0f192692e21e288c87ba0104f3d597363190f87c Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Performance should always be better with cacheBufferMartin Jones2012-06-084-109/+115
| | | | | | | | | | | | | Setting a cacheBuffer introduced more work for the scenegraph due to cached delegates' visibility being toggled. Changing visibility is expensive as it is proagated to all children. Introduce a cheap method of hiding a branch instead. Also avoid initiating incubation in the same frame as a completed creation. Change-Id: I573bcf37f441f96a7502d445be50ef4301f217d5 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Destroy incubated objects if they are not claimed when ready.Andrew den Exter2012-06-081-0/+282
| | | | | | | | | | If model data is removed while an object is incubating for it the view cannot cancel the incubation because the index is invalidated. So if the object has not been referenced after signalling it is ready assume it's been abandoned and destroy it. Change-Id: I32708e940cfbccbe0d330ad7822f29d3c1f39d13 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* rebound property for FlickableBea Lam2012-06-083-14/+185
| | | | | | | | This property specifies the transition to be used when the flickable snaps back to its bounds. Change-Id: I2bb9680dad219a4c7c911f0e4dda37ae739349c6 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Don't double emit threaded signalsAaron Kennedy2012-06-072-0/+19
| | | | | | | | | As the metacall event was posted to the object emitting the signal, it caused the signal to be *reemitted* on the object thread. If both QML and Qt connections were present, the Qt ones were run twice. Change-Id: I4bc1402ab0a43762ff6fef173ecc77fc20508bad Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Disallow parent changes for QML created objectsAaron Kennedy2012-06-063-48/+0
| | | | | | | | | Currently this is protected with a QML_PARENT_TEST environment variable to allow the rest of QtQuick to be updated before it is enforced. Change-Id: I4dd3644cbbce91d67f24c9556637f97eafb00638 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Don't emit moving and flicking signals unnecessarilyBea Lam2012-06-062-71/+365
| | | | | | | | | | | | | | | | The moving and flicking signals should only be emitted once when the view has been moved/flicked both vertically and horizontally. (This was already done correctly for the dragging signals.) Also changes QQuickFlickable::flick() to return bool instead of void. Subclasses no longer emit the flicking signals but call flickingStarted() instead. Also splits the tst_qquickflickable::movingAndDragging() test up into several tests. Change-Id: Ie527568a9702049dd0bcda18c2eb3e43d8938a18 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Restart a drag when the item canvas changes.Andrew den Exter2012-06-063-4/+135
| | | | | | | | | | | | | Likewise when a property that affects whether a drag event is likely to be accepted. Properties were locked in when a drag was started, but this means that if a drag was started by setting the active property in a state change or similar bulk change the properties that are locked in is undefined. And if an item changed canvases during a drag or the active property was set before a parent enter and leave events weren't sent as they should have been. Change-Id: Iefd22dcab4c5469904d8d8c5eaf91ec339540d9c Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix affected signal and docsAlan Alpert2012-06-062-0/+104
| | | | | | | | | | | | Signal wasn't being called in its primary usecase, which was to interact without altering the particles. Docs have been updated to clarify the usecase as well. This also updates the position properties of custom affector to more accurately specify if they caused changes. Change-Id: Ia411d9e81002443a56ed8bab9232f1aad49a4c5e Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Make sure we relayout on height change when onLineLaidOut is usedYann Bodson2012-06-062-0/+82
| | | | | Change-Id: I66e47682eba337562543a99eb576a7e24d00cdcf Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Do not lose timestamps in mouse press eventsLaszlo Agocs2012-06-051-7/+7
| | | | | Change-Id: Iaa7953cd2ea21f43a98f984b6aea43feb0c2fbed Reviewed-by: Martin Jones <martin.jones@nokia.com>
* tst_qquickgridview: further increase test timeoutRohan McGovern2012-06-051-1/+1
| | | | | | | | | This test has timed out on several recent test runs, but appeared to be making progress. Increase the timeout to 1100 seconds, approximately twice the test's runtime from the last successful run. Change-Id: I42ca4ae860fa22348a9f23343e2f5fef65dc4a86 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Allow the global JS UTC offset to be invalidatedMatthew Vogt2012-06-052-0/+92
| | | | | | | | | | | If the system timezone is changed, it is necessary to inform V8 so that the global offset-from-UTC value can be recalculated. This changes adds the 'timeZoneUpdated' function to the JS 'Date' class exported by QML, which allows QML applications to inform V8 when the timezone has been updated. Change-Id: Ic5898ca7bc640002a4a6fd5a52b8623d87ee8085 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Allow qtdeclarative to compile with -no-widgetsMartin Jones2012-06-0512-21/+68
| | | | | | | | We have no hard requirement for QtWidgets library, so we should build without it. Change-Id: I85c85cc1a52bf9daa7ab7916f19bf7cc3ad5845f Reviewed-by: Damian Jansen <damian.jansen@nokia.com>