aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/shared
Commit message (Collapse)AuthorAgeFilesLines
* Move initView() to tests/auto/quick/sharedJan Arve Sæther2019-02-112-0/+31
| | | | | | | | | | | | According to our "Coin - Flaky Tests" dashboard on our grafana, initView() in tst_qquickmousearea seems to have very few flakiness issues in actually exposing a QQuickView. It is therefore a good idea to share this implementation so that it can be used by other tests too. Change-Id: Ie83cbf7d00fa02bdd4699757471fa180945851e3 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Tests: Un-crash image comparison testsFriedemann Kleint2018-12-202-13/+19
| | | | | | | | | | | | When (naively) running the tests with High-DPI scaling active, the test would assert on mismatching image sizes caused by the scaling. Add an error message parameter to QQuickVisualTestUtil::compareImages() for use with QVERIFY2, return false instead of asserting on format/size mismatches and adapt the usages. Remove duplicate code in tst_qquickwindow. Change-Id: I76564f4125798fa1e065a0202b686bc7f5ec5680 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQmlDelegateModel: even for QAIM, only use first column by defaultRichard Moe Gustavsen2018-06-212-1/+10
| | | | | | | | | | | | | | | | | | | In 2f9afadd5d9b4899397dca, we introduced a change in QQmlAdaptorModel so that a QAIM model report that it contains "rows * cols" number of model items, and not just "rows". This was needed, otherwise TableView would only display the first column of such models. It turns out, however, that also ListView will now detect that a QAIM contain more items than just the items in the first column. The result will be that it ends up adding all the other columns underneath the first column in the view. To avoid this unforseen change, this patch will revert this logic, and instead add a private variable that can be set if the new behavior is wanted (e.g by TableView). Change-Id: I8c13da99f05e2f922362e498d1fa1779cdbd0d72 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Update to new QRandomGenerator APIThiago Macieira2017-12-051-2/+2
| | | | | | | | | | To get latest qtbase dev integrated in qt5 dev again without qtdeclarative 5.10->dev merge. Change-Id: I6905649aca2b06302df8cee2f660f1f92398d36a Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> (cherry picked from commit ee00fa01dc41deaaedfa0d1d5cc6cd750bfe75f4) Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-063-0/+94
|\ | | | | | | Change-Id: I1ed923d72566af663555898c3ec708191eef8ae9
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-243-0/+94
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlimport.cpp src/qml/qml/qqmlimport_p.h src/qml/qml/qqmltypenamecache.cpp Done-with: Ulf Hermann<ulf.hermann@qt.io> Change-Id: I41ba7a592b2659ddf53da6952ea3b456a7bba319
| | * Extract QSizeChangeListener from tst_quickview to shared test utilsAlexandr Akulich2017-10-203-0/+94
| | | | | | | | | | | | | | | | | | | | | The class is useful for other tests Change-Id: Iea287ee7659a7504800763c45ae5dc744360eaa0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | | Replace Q_NULLPTR with nullptrKevin Funk2017-09-271-1/+1
|/ / | | | | | | | | Change-Id: I0c01862dbb475494c84e39c695cb563df8cbcfa8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* / Use QRandomGenerator instead of q?randThiago Macieira2017-08-231-3/+3
|/ | | | | Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Get rid of most QT_NO_FOO usagesLars Knoll2016-11-291-1/+1
| | | | | | | | Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Introduce BorderImageMesh.Michael Brasser2016-05-062-0/+37
| | | | | | | | | | | | | BorderImageMesh provides an optimized way to use BorderImage-type images with ShaderEffect. [ChangeLog][QtQuick][ShaderEffect] Add new mesh type BorderImageMesh. BorderImageMesh provides an optimized way to use BorderImage-type images with ShaderEffect. Change-Id: I73bdc8318a0facba6edc2634b5f4614996b39c1b Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-192-0/+102
|\ | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickitem.cpp tests/auto/quick/qquickgridview/tst_qquickgridview.cpp tests/auto/quick/qquicklistview/tst_qquicklistview.cpp Change-Id: I3cf47faa2fe567d62fffd985aeecbefe5811cc42
| * Factor out testing code for QTBUG_48870_fastModelUpdatesGabriel de Dietrich2016-02-132-0/+102
| | | | | | | | | | | | | | This is going to be reused for QQuickGridview's counterpart. Change-Id: I3eaf272229b0e45dfc8c0b78ba94d57c72f9cc5d Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-204-68/+48
| | | | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I04760a0801837cfc516d1c7c02d4f503f6bb70b6 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2015-10-141-2/+2
|\| | | | | | | Change-Id: I11ea57222ba5aa683b7bfd7735fbc1d2cf86e875
| * Tests: Fix single-character string literals.Friedemann Kleint2015-10-131-2/+2
| | | | | | | | | | | | | | | | Use character literals where applicable. Change-Id: Ib0e618752fbc762a73a0a91c43efab61ef2c9687 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Tests: Remove QT_DISABLE_DEPRECATED_BEFORE=0 for simple cases.Friedemann Kleint2015-09-022-4/+9
|/ | | | | | | Fix usage of API that is marked deprecated. Change-Id: Ia887437f99b9ce207891ca19bc49294acb7d629d Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
* Fix flickable autotestUlf Hermann2015-06-052-2/+16
| | | | | | | | | | | | | | | | * Make sure we always wait for window activation, not only exposal. * When clicking or releasing, first move the mouse to the right place. * In returnToBounds() show() the window before we rely on its event loop. * In rebound() reduce the delays as mouse events get delivered earlier now and the movement might stop and restart if we wait for too long between subsequent mouse moves. Most of these problems have been exposed by commit 66050f2ac875d451bec31e0d8ff507795b5b18d6 in qtbase. Change-Id: I5a3bc1e4ba92362d69180c8fde33eca47b4b9375 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* qquickwindow: ensure we delete the correct delayed touch event after deliveryRichard Moe Gustavsen2015-05-221-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delivering a delayed touch event from QQuickWindow can cause the event loop to recurse (e.g if it starts a drag'n'drop). This again can cause new touch events to be delivered to QQuickWindow, and new delayed touch events to be stored. This results in the following: (1) Receive new touch press event in QQuickWindow, and set delayedTouch to be a copy of it (2) Deliver delayedTouch to items. This can cause an event loop recursion. (3) While inside the recursion, QQuickWindow receives another new touch press event. We then redeliver and delete the current delayedTouch event created in (1), and set delayedTouch to be a copy of the new event. (4) Later we return back from (2), and try to access delayedTouch (or actually a reference to the touchpoints inside it, qquickwindow.cpp:1958). Since the event was deleted in (3), we have a crash. This patch will ensure that we set delayedTouch to 0 before delivering it (so it cannot be redelivered), and that we safely delete it afterwards when it goes out of scope. By converting delayedTouch to a QScopedPointer we also ensure that the event is not leaked upon destruction. Task-number: QTBUG-45877 Change-Id: Ic372a39a0eb127abfd12cec2d51b3743ad83194d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-124-28/+28
| | | | | | | | | 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>
* Update license headers and add new licensesJani Heikkinen2014-08-254-76/+44
| | | | | | | | | - 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>
* Compress touch events in QQuickWindow.Gunnar Sletta2014-05-052-0/+27
| | | | | | | | | | | | | | Instead of sending multiple touch updates per frame, we store the last one and flush the pending events just before we enter into the scene graph sync phase. [ChangeLog][QtQuick] QQuickWindow will compresses touch events and delivers at most one touch event per frame. Done-with: Robin Burchell <robin.burchell@jollamobile.com> Change-Id: Ia0169bc4a3f0da67709b91ca65c326934b55d372 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Merge branch 'stable' into devSergio Ahumada2013-09-062-2/+29
|\ | | | | | | | | | | | | | | | | Conflicts: src/qml/debugger/qv8debugservice.cpp src/qml/qml/v8/qv8engine.cpp tests/auto/quick/qquickitem/qquickitem.pro Change-Id: Ic4a1dcdd8b8a84155d2f2abefdf1da5c3a56af31
| * Stabilize tests using utilities from QQuickViewTestUtil.Friedemann Kleint2013-08-262-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | Change QQuickViewTestUtil::createView() to center the window on the screen to avoid taskbar areas. Add routine to move the mouse away and use that in tests using QQuickViewTestUtil::flick() and other mouse interaction since the mouse cursor can interfere with it. Affected tests: qquickgridview, qquickpathview, qquickflickable, qquicklistview, qquickrepeater and qquickpositioners. Task-number: QTBUG-33017 Change-Id: I540c0efb54a231dcb44c8fd5ad9573a2d4d4b9df Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Fix compilation with built-in v4vm JS engineSimon Hausmann2013-04-151-1/+1
|/ | | | | Change-Id: Ieda9267e296acf6392a5461f4cfb9233a7a409a0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-104-4/+4
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-234-96/+96
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add tests for VisualDataModel watched roles.Andrew den Exter2012-08-021-0/+2
| | | | | Change-Id: Idc84d0f833fe2ec4ed29bbda62def17ec20a3a8b Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
* Fix handling of changes to the root index of a VisualDataModel.Andrew den Exter2012-08-022-27/+28
| | | | | | | | | | Store the root index as a QPersistentModelIndex so the index remains valid as the model changes, and in the case the root index is removed from the model invalidate the contents of the VisualDataModel until a new root index or model is set. Change-Id: I1cbc27f2068f99a02ff3d43373905dec7e35e900 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove QListModelInterface.Andrew den Exter2012-07-252-198/+6
| | | | | | | | | | Implement ListModel and XmlListModel using QAbstractListModel instead. Task-number: QTBUG-15728 Change-Id: I14e03d90883d341f4b1d89c1e9fc9dc1534fde78 Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Don't double reference items created following a model reset.Andrew den Exter2012-07-172-0/+8
| | | | | | | | | 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-172-8/+8
| | | | | | | | | | | | | | | | 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>
* Performance should always be better with cacheBufferMartin Jones2012-06-082-2/+8
| | | | | | | | | | | | | 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>
* Fix PathView not updating after all items are removed from the model.Andrew den Exter2012-05-283-2/+9
| | | | | | | | | | | | Always clear the layoutScheduled flag on a refill even if there are no items to create, otherwise future layouts won't be scheduled because it appears one is already pending. Fixes an issue in the dragselection example where items that should have moved to the PathView instead disappeared. Change-Id: I4302b5b43184c697a78f5c09dc3811326e2271ca Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Properly copy all event parameters in deliverMouseEvent()Laszlo Agocs2012-04-051-6/+2
| | | | | | | | | | | Timestamp and capabilities were missing. One of the very special flick test cases needs to be fixed, because setting the proper timestamp will now generate correct velocities. A potentially dangerous, legacy implementation of flick() has also been updated to match how QTestLib works in Qt 5. Change-Id: Ibc99f7212ba21d41a419eaadac2fdda730658dc6 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Buffer changes received during layout()Bea Lam2012-03-271-2/+2
| | | | | | | | Otherwise, changes received by a view during layout() may override the changes that are currently being processed. Change-Id: Iabc4db682f85ceb7d04c3f7442fb6c98ebdb94f1 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Merge master <-> api_changesMatthew Vogt2012-03-051-0/+2
| | | | Change-Id: Iad2f07b989b25349fd2d4fff010e24dcd5a1688f
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-245-0/+863
Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>