aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qmltest
Commit message (Collapse)AuthorAgeFilesLines
* Send the mouse events to the correct windowAlbert Astals Cid2015-08-031-0/+84
| | | | | | | | | | That is the window with the item, not the window that contains the TestUtil Item Change-Id: I13f5bfd0556e594843d499d014e92bcc41850f45 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Jason McDonald <macadder1@gmail.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fixed a QQuickListView crashLiang Qi2015-06-291-0/+71
| | | | | | | | | When an ObjectModel item is removed and destroyed. Task-number: QTBUG-46798 Change-Id: Ia41dd359d9f3ec5b7af85498dc798f7ab55dca3c Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* QuickTest: Enable use of BLACKLIST fileCaroline Chao2015-06-152-0/+31
| | | | | | | | So qml test functions can be blacklisted. Qml test functions have the following format: TestCaseName::functionName. Change-Id: Ifcaa8d77d8f0956472aa568dc6dbfcbdde4e5063 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* ObjectModel: add API for dynamic changesJ-P Nurmi2015-06-101-0/+100
| | | | | | | | | | | | | | | | Following the ListModel API: - object get(index) - append(object) - insert(int index, object) - move(int from, int to, int n) - remove(int index, int n) [ChangeLog][QtQml][ObjectModel] Added get(), append(), insert(), move() and remove() methods. Change-Id: I592e55b7c4c933a1100191bf5a9405944b347172 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* TestCase: add equals() function to QuickTestImageObject.Mitch Curtis2015-04-211-0/+58
| | | | | | | | | | | | | | | | | | This allows for comparison of image objects returned from TestCase's grabImage() function using QImage's operator== function. Doing pixel by pixel image comparisons in QML is extremely slow. This functionality is useful for checking that an item was redrawn after a property change, for example. [ChangeLog][QuickTest][TestCase] Added equals() function to image object returned from TestCase's grabImage() function. Change-Id: I0ece9df6effe2b1b9d8e1ee8ac011115d9367ef2 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Merge remote-tracking branch 'origin/5.5' into devSimon Hausmann2015-03-171-0/+18
|\ | | | | | | Change-Id: I6033aba359ac551f450ad517d20a0986bf4655f6
| * testlib: Fix qml objects not deleted between data testsCaroline Chao2015-03-091-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | Call wait(0) after the cleanup() function and not only at the end of the test run (wait(0) is used to call processEvents()). Otherwise, eventual destroy() calls in test function are not executed between data tests. Task-number: QTBUG-30523 Task-number: QTBUG-42185 Change-Id: I1d588ee28c61cda835e25307bc1c565d68b741fe Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* | Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/devFrederik Gladhorn2015-03-031-0/+35
|\|
| * testlib: Introduce MouseDoubleClickSequence() methodCaroline Chao2015-03-021-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing method MouseDoubleClick() emulates the mouse double click event only. The added method MouseDoubleClickSequence() emulates the full sequence of mouse events a physical double-click would generate: Press-Release-Press-DoubleClick-Release Introducing a new method in order to provide convenience when a test requires to simulate a complete double-click action without changing the behavior of MouseDoubleClick() and risking to break existing tests. Add autotest. Task-number: QTBUG-42185 Change-Id: I1cdddd9e21d3b1d8a818f6d4e3717b06b7d70e08 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | TextEdit: add editingFinished signalLiang Qi2015-03-031-0/+89
|/ | | | | | | | | | | Autotest is included. [ChangeLog][TextEdit] add editingFinished signal Task-number: QTBUG-44734 Change-Id: Ib632e589419758bea09442e6efcf4d977b9a13e8 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fixed license headersJani Heikkinen2015-02-1713-39/+39
| | | | | Change-Id: I4d5640ff95e1361ec7e65fb3e87d7726d8185ff5 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* QuickTestResult: Try a bit harder when stringifying a valueGabriel de Dietrich2015-02-121-0/+47
| | | | | | | | | | Q_GADGETs are not always QVariant::toString()-convertible but they probably have their own toString() function that we always try to call. This may still lead to false posi- tives, but in a much smaller proportion. Change-Id: I80547a9e773e97410fe5d4723efcac6b010046f9 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-1268-475/+451
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Resolve type names inside guard property of SignalTransitionNobuaki Sukegawa2014-12-201-0/+98
| | | | | | | | | | | | SignalTransition's guard is evaluated against ad-hoc QQmlContext because it needs signal args added to its contextProperty. Since QQmlContext created this way does not have import type cache, we could not use type names inside guard. To avoid this problem, this patch makes guard's context inherit parent's type cahce. Change-Id: I4ddd559779681b53d4ee42f4820d05438addb5ac Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* qttest: make findChild available only for QtTest 1.1Fawzi Mohamed2014-12-0561-61/+61
| | | | | Change-Id: I4ceb1a969bd4296b82f899088b02b5e8cf100bcd Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* qmlstatemachine: Rename StateBase to StateKevin Funk2014-10-218-34/+34
| | | | | | | | | | | | As discussed with Brett Stottlmyer and Alan Alpert. Add a section about the implications when importing both QtQml.StateMachine and QtQuick in one single QML file. Change-Id: I8755f4b578e2a6ff4c2377c7a8a0b996ba9b7129 Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Stabilize and fix comparisons in animator tests.Gunnar Sletta2014-10-1011-64/+60
| | | | | | | | | | | | | compare() will compare properties of objects and neither Qt.rgba nor image.pixel created objects has enumeratable properties so compare is pretty much useless. Use verify + == which will rely on toString() which is ok. A few of the tests relied on execution order of signals emitted on animation.running being changed and would occasionally fail. Change-Id: I531c7f21b58a922a6be9ca2b6de120a68209a6d6 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Fix memory leak and crash with transform animators.Gunnar Sletta2014-10-091-0/+77
| | | | | | | | | | | | | | | | | | Every time initialize() was called, we would increment the ref on an item. However, initialize is called every time the job is started, so the ref would increase and only decrease once, leading to a leaked helper. Change it to only increment the first time. A different problem was that when an item was destroyed, we could run the risk of the QQuickTransformAnimatorJob destructor being called with the helper's item being null. This would lead to the helper not being removed from the cache and a dangling helper would remain in the transforms cache. Now change it so that when a target is destroyed, we explicitly destroy the helper as well (as no animation can happen then anyway) and reset all pointers in the job. Change-Id: I1ce76db134bbc1871d32f1224ba5b68a4a4eeafa Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Compare doesn't work for colors, so compare the channels explcitily.Gunnar Sletta2014-10-091-1/+3
| | | | | Change-Id: I7a21328700c85b5b79dbb4342817e28833dece70 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Relax ShaderEffectSource's sourceItem vs window handling.Gunnar Sletta2014-10-091-0/+82
| | | | | | | | | | | For dynamically loaded items, the window may not be set on either the source or the item, so we need to be a bit more relaxed in our checking. This fixes a regression for dynamically loaded GaussianBlur. Change-Id: I3e888405a95058ca79ecd2dff42c0ed4c8fff065 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Also search for visual children in TestCase::findChild().Mitch Curtis2014-09-291-1/+36
| | | | | | | | | It previously used QObject::findChild(), which won't work in all cases, because items like ListView don't seem to make their delegate items QObject children, while simple nested Items do. Change-Id: I1a8ed1fb55493212cb25abf595d016437812a80f Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* QDSM: Nested statemachines are supportedSebastian Sauer2014-09-242-2/+72
| | | | | | | | | | | | | | * Remove wrongly printed info that nested statemachines are not supported. * Added autotest for nested statemachines. * Re-enable commented out testcase in the nestedInitalStates autotest. The reason why the test was disabled was fixed a while ago. Change-Id: I921483fa49d751d14c877f8f63335fa88cf2ce7b Reviewed-by: Brett Stottlemyer <bstottle@ford.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* prevent crash when set ShaderEffectSource::sourceItem nullTasuku Suzuki2014-09-121-0/+57
| | | | | | | | Regression introduced in 81ba77d736f07efac37d284cd741d71f9dad4149 Task-number: QTBUG-41241 Change-Id: I9a65af6915325e1cbf9205c7da94273d5b91b310 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix a typo and a warning in qmltest::shadersource-from-other-windowTasuku Suzuki2014-09-121-1/+4
| | | | | Change-Id: I60d0494ff8d619cb9be8d7a5db712c1316450b97 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Simon Hausmann2014-08-261-0/+103
|\
| * Merge remote-tracking branch 'origin/5.3' into 5.4Simon Hausmann2014-08-261-0/+103
| |\ | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlobjectcreator_p.h Change-Id: I60858ddb46866a8fa1a8576bb05b412afeeb4e41
| | * The cached objects can be deleted, so keep them in a QPointer.Gunnar Sletta2014-08-141-0/+103
| | | | | | | | | | | | | | | | | | Change-Id: Ieaebd2e7b9823cbe22efc331e42ceab8fbbda0e8 Task-number: QTBUG-40201 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | | QSM: Reintroduce guard argument evaluationSebastian Sauer2014-08-251-0/+109
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | Implements the suggestion from Simon Hausmann (codereview 89716 from 08-05 14:46) to use QQmlScriptString rather then the previous used MetaObject-manipulation. This also introduces comparison operators for QQmlScriptString to be able to determinate if a QQmlScriptString changed what is needed cause there is otherwise no way to access (all) the needed details within QQmlScriptStringPrivate. Change-Id: I198479eac8fd37cbdd98a99aacdd8eebf7b75d21 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Update license headers and add new licensesJani Heikkinen2014-08-2548-897/+513
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* | Say hello to the Declarative State Machine FrameworkBrett Stottlemyer2014-08-086-0/+540
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Declarative State Machine Framework extends Qt's State Machine Framework (QSM) into QML to provide types for creating and executing state graphs in QML. This gives you the power of deterministic state machines, but declaratively and without having to write all of the boilerplate code. It is an alternative to the existing QML State type, intended for more complex models. [ChangeLog][QtQML] The Declarative State Machine Framework extends Qt's State Machine Framework (QSM) into QML. This gives you the power of deterministic state machines, but declaratively. Change-Id: I02390ba7f1baed50935364530925bd75087299cb Reviewed-by: Sebastian Sauer <sebastian.sauer@kdab.com> Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-291-0/+41
|\| | | | | | | Change-Id: Id95f7b01de36bccecbb7b73acc041654a1fe2ebe
| * Flickable: Cancel interaction on interactive changesAlbert Astals Cid2014-07-281-0/+41
| | | | | | | | | | | | | | | | | | | | | | Otherwise if you have a listview with a flickable inside with a mouseare inside the pressed is never set to false if you make the interactive property of the outer list depend on the moving of the inner flickable. This makes that when later you change currentIndex of the list and you have StrictlyEnforceRange set, the list won't move because it still thinks it is pressed Change-Id: I2c2021f486fc0a31840c3f2199bc7cb76dc01e3e Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* | Add findChild to TestCase.Mitch Curtis2014-07-041-0/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful for auto tests where it's necessary to have access to dynamically created child items. For example: property Component threeItemDelegate: Text { objectName: "delegate" + styleData.index text: styleData.value } ... function test_stuff() { ... var delegate0 = findChild(item, "delegate0"); // check delegate0 for some condition... } [ChangeLog][QtTest][TestCase] Added findChild function to TestCase. Change-Id: I04a8b07c9904768c07ec12f4b03f1afb1989e054 Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-06-041-9/+36
|\| | | | | | | | | | | | | | | | | | | | | | | | | The merge conflict is about the removal of "d1" from the register set on ARM, but that was already done in dev in commit ddb33ee9ba9e1344caa9be5dbf4b534c3ede692e The change in src/quick/scenegraph/coreapi/qsgrenderer.cpp with commit 2414f1675eab163b22dcc4e8ded80ed04d06369b was reverted to what it was before, per Laszlo's advice. Conflicts: src/qml/jit/qv4isel_masm.cpp Change-Id: I7bce546c5cdee01e37853a476d82279d4e72948b
| * Fix tst_textinput.qmlBernd Weimer2014-05-281-9/+36
| | | | | | | | | | | | | | | | On platforms that have QT_NO_CLIPBOARD defined copy/paste/cut functions are not available. Change-Id: I28be021f45cd5a5fe8aaad2752d379c3eebea8cf Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-05-221-0/+103
|\| | | | | | | Change-Id: I0dd91626837276f5811e4830f4a4e9f89bf1e1bd
| * Fix crash with running animators on re-shown windows.Gunnar Sletta2014-05-191-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-threaded render loops would clean up the nodes for a window when it was hidden, but the animators kept running and had a reference to the deleted nodes. This was not a problem for the threaded render loop as it would wipe the animator controller as well which would clean the jobs. Fix it by triggering a reset of all nodes in the animators when the window is told to clean up. If an animator is ticked when it doesn't have a node, it will simply do nothing. When the window is made visible again, we call initialize on all animators to find the new node. Task-number: QTBUG-37995 Change-Id: Ie5609d95db29f4b2b30ca5bf641dce901e528389 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-131-9/+38
|\| | | | | | | Change-Id: I24827851643247b938b3a1b7182864293e5c3fe7
| * Fix tst_textedit.qmlBernd Weimer2014-05-091-9/+38
| | | | | | | | | | | | | | | | | | On platforms that have QT_NO_CLIPBOARD defined copy/paste/cut functions are not available. Change-Id: Ia2c82d0d3910f89642b1c3ef719caee88da3999e Reviewed-by: Damian Jansen <damian.jansen@gmail.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-104-2/+239
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/plugins/accessible/quick/quick.pro src/quick/items/qquickpincharea.cpp src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp src/quick/scenegraph/qsgthreadedrenderloop.cpp Manually adjusted for TestHTTPServer constructor change: tests/auto/quick/qquickimage/tst_qquickimage.cpp Change-Id: I5e58a7c08ea92d6fc5e3bce98571c54f7b2ce08f
| * Fix qmltest/animators/tst_on.qmlBernd Weimer2014-04-301-1/+1
| | | | | | | | | | | | Change-Id: Ief27b20de100cc7517edab03d752e8eb4299a538 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
| * Testcase for mixing sequential, parallel with loops and animators.Gunnar Sletta2014-04-241-0/+179
| | | | | | | | | | | | Task-number: QTBUG-37246 Change-Id: I50c2d46f79fb79cb6eba856ba5b187358f1f2a52 Reviewed-by: Michael Brasser <michael.brasser@live.com>
| * Merge remote-tracking branch 'origin/release' into stableJani Heikkinen2014-04-232-0/+58
| |\ | | | | | | | | | Change-Id: I1214586499ab2876c8bc55a99367a0c938c8b919
| | * QQuickItemView/QQuickPathView: Fix creation of delegatesAlbert Astals Cid2014-04-182-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the delegate is set before the model and after the ItemView/PathView has been created Task-number: QTBUG-38368 Change-Id: I6963abe28087699cf4e8921153dc7641bae3b220 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
| * | Stabilize qmltest/animators/tst_on.qml.Friedemann Kleint2014-04-161-2/+2
| |/ | | | | | | | | | | Task-number: QTBUG-38290 Change-Id: I521c50db3ddc8053179f0acd421639e13754ec7d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Make item.layer and item.layer.effect work inside positioners.Gunnar Sletta2014-05-081-0/+207
| | | | | | | | | | | | | | Task-number: QTBUG-31269 Change-Id: Ic3bb76ea5a5055df614f2eaacd3031445f118ca7 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* | Say hello to QQuickItem::grabToImage().Gunnar Sletta2014-05-011-0/+160
| | | | | | | | | | | | | | | | | | [ChangeLog][QtQuick][Item] Added functions QQuickItem::grabToImage() and Item::grabToImage() to allow grabbing of items into system-memory images. Change-Id: I76cd73bb62f7440569c6fce63d63528559845721 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | Prevent crash when mixing shaders from different windowsGunnar Sletta2014-04-013-0/+246
|/ | | | | Change-Id: Iad9383ff02cb3130d725a215582400e7806df1dc Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Test: qmltest/fontloader were fixedLiang Qi2013-10-301-6/+0
| | | | | | | | | The commit 3745b0ca126f46eadfeeb7e3d1d53360dbf800cd resolved this issue. Task-number: QTBUG-32650 Change-Id: I084b326c19e7c0de303b05b2f3fb788c380a1ba0 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Mark qmltest as insignificant to get CI to pass againLars Knoll2013-09-281-0/+2
| | | | | | | The animator tests keep crashing randomly. Change-Id: I0d4b177238fc915931c3503b03e29f433ebf4950 Reviewed-by: Lars Knoll <lars.knoll@digia.com>