aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickitem
Commit message (Collapse)AuthorAgeFilesLines
* tests/quick: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-07-271-39/+39
| | | | | | | | | | | | - Replace Q[TRY]_VERIFY(pointer == 0) by Q[TRY]_VERIFY(!pointer). - Replace Q[TRY]_VERIFY(smartPointer == 0) by Q[TRY]_VERIFY(smartPointer.isNull()). - Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) and add casts where necessary. The values will then be logged should a test fail. Change-Id: Ib9f4c2486af23c47990be4b9e004b965de226dcc Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Mark tests as unstable/flakeySimon Hausmann2015-06-081-0/+2
| | | | | | | It failed for example in http://testresults.qt.io/logs/qt/qtdeclarative/baa4a85dbdc4de7d2b4b02b829729dfb46e51305/windows8x86_64windows8x86_64msvc2012developer-build_release_qtnamespace/5aeb8542aafa40f84e974d7ee6346df2b97d1725/testlog.txt.gz while trying to integrate a 100% unrelated doc change. Change-Id: I6b0b8e76d6cdc72e1343ac42a8277b22e3759c50 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Return the correct type from Item::mapToItem/Item::mapFromItem.Mitch Curtis2015-04-082-0/+71
| | | | | | | | | | | | | | | | | | | | | Previously we were returning a JavaScript object with x/y/width/height properties, instead of a point/rect. This meant that the type couldn't be converted to a point/rect because we don't support duck typing, where we would deduce the type based on the properties. One example of a broken use case that this patch fixes is when QML is unable to convert the return type to a point in a property declaration: property point p: mouseArea.mapToItem(child, mouseArea.mouseX, mouseArea.mouseY) Another is using the result of the function to pass to another function: child.contains(mouseArea.mapToItem(child, mouseArea.mouseX, mouseArea.mouseY)) Change-Id: I3ce82f10175f904dd02c8af6b5e42cee14b2ebb2 Task-number: QTBUG-41452 Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | 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>
* Fix performance regression caused by SG signals in QQuickItem.Gunnar Sletta2014-09-031-8/+13
| | | | | | | | | | | | | For a testcase with thosands of items, I measured an increase in shutdown time from 800ms to 7500ms, all spent in disconnect(). This is not acceptible, so we're choosing a different approach. If items implement a invalidateSceneGraph slot, this function will be called during shutdown. It should be made a proper virtual in Qt 6. This approach costs very little. Change-Id: I5970143cc0a0744955687e17586f0bb00c9afb26 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove references transforms have to items in QQuickItem's destructor.Mitch Curtis2014-08-252-0/+44
| | | | | | | | | | In case they try to remove themselves from our list of transforms when that list has already been destroyed after ~QQuickItem() has run. Task-number: QTBUG-40877 Change-Id: Ie57f5dd1e8b791846f08629183974c771553c4bf Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - 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>
* Introducing QQuickItem::sceneGraphInvalidated/sceneGraphInitializedGunnar Sletta2014-07-291-0/+34
| | | | | | | [ChangeLog][QtQuick][QQuickItem] Added signals sceneGraphInitialized and sceneGraphInvalidated Change-Id: Idaea88bc743f0637d093cf1ba7ac4f78acd7e6ad Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-102-2/+76
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Follow QOpenGLContext API renamingLaszlo Agocs2014-04-251-1/+1
| | | | | | | | | | | | Task-number: QTBUG-38564 Change-Id: Ice1170339f7d650fcb6accfccf325471629343d6 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
| * Fix visual parent ownership with scenes that create windowsSimon Hausmann2014-03-282-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 39540124dd0900e0c99dcda8c0ebdf4f3cea8d5e introduced the concept that a visual parent marks its children, by recursively marking the children of the root item in a QQuickView. This allowed for the removal of an ugly hack in QtQuick Controls. Unfortunately that fix is incomplete in the sense that it makes the incorrect assumption that a QQuickView is always used. The use-case in the bug report is to have child items inside a QtQuick.Window (a regular ApplicationWindow in fact). That window - implemented by QQuickWindowQmlImpl - also needs to mark its children, so this patch introduces the use of the same GC marking helper class (which now operates on a QQuickWindow instead of a QQuickViewPrivate). Task-number: QTBUG-37711 Change-Id: Id788e84dbb041ac8ba6ff23dc4ef56f6fe9e465a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * Dynamic GL in QuickLaszlo Agocs2014-03-181-2/+3
| | | | | | | | | | | | | | | | | | | | The counterpart to I716fdebb. Implements the dynamic path in scenegraph. Task-number: QTBUG-36483 Change-Id: I2dc613ba84560b7b8e36d3cd1da61c050ab08db0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
| * Revert "Fix item polishing"J-P Nurmi2014-02-281-61/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This caused items like positioners and itemviews to not relayout or update as appropriate when items were hidden, and therefore caused problems all over in eg. controls. This reverts commits - 43f983350a548b1b663ea07a0e87e4cc58834214 - 01e609e9fa0ca1317e0f4eff4802a79584450357 - 439f31f128e70ecae16544ee7041695c60e0b2d6 Task-number: QTBUG-36954 Task-number: QTBUG-36934 Task-number: QTBUG-31830 Change-Id: If04cdce51206568c360a45e24efc0bd04764750b Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| * Fix item polishingJ-P Nurmi2014-02-201-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After "Dont call updatePolish if an item is not visible" (439f31f) and "Fix polishItems bug" (01e609e), desktop style animations for QtQuick Controls were no longer running. This was because QQuickItem::polish() no longer polished a _visible_ item when there were other _hidden_ items in the queue to be polished. This change restores the old logic that QQuickWindow only keeps track of visible items to be polished, whilst the idea of hidden items not being polished still remains valid. QQuickItem is made responsible for polishing itself if necessary when it becomes visible. Task-number: QTBUG-36934 Change-Id: I4d48d3a3e2c841d337cd52ec4fd27092f84a8626 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Compress touch events in QQuickWindow.Gunnar Sletta2014-05-052-0/+5
|/ | | | | | | | | | | | | | 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>
* Fix interaction of QQuickItems with the garbage collectorSimon Hausmann2014-01-062-0/+79
| | | | | | | | | | | | | | | | | The QObject ownership of QQuickItem objects is not accessible / mutable in QML, because the parent property maps to the (dynamic) visual parent. There are use-cases of creating QQuickItem objects without a QObject parent and to support this, the visual parent needs to mark its visual children in order to provide intuitive semantics. [ChangeLog][QtQuick][Import Behavior Changes] A QQuick Item is now strongly referenced by its visual parent item, so it doesn't require a QObject parent to stay alive. Task-number: QTBUG-35913 Change-Id: Ief2d40ac76298a0cf241ca73ff654c4ecfa12748 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix touch to mouse synthesis/propagation.Robin Burchell2013-12-131-3/+12
| | | | | | | | | | | | | Having mouse events synthesised from both QtGui and internally in QtQuick is not a great way togo about things, especially when QtGui doesn't have the same degree of knowledge as QtQuick about the items in the scene. Thus, we now accept all events inside QtQuick to block QtGui synthesis, which should fix a significant amount of edge-case touch breakage/bad behavior. Change-Id: I14e1c87761c8f43160049b5e6f9da15b4e5edbb7 Done-with: Martin Jones <martin.jones@jollamobile.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix assert after giving focus to a disabled item.Andrew den Exter2013-11-221-1/+24
| | | | | | | | | | | | | If an item has focus stolen by another item remove activeFocus from it even if the item that gains focus doesn't gain activeFocus. Otherwise the focus tree will enter a state where an item that is not the subFocusItem of its focus scope has activeFocus which is invalid and will trigger an assert in QQuickWindowPrivate::clearFocusInScope(). Task-number: QTBUG-34779 Change-Id: I72408ec0e4fd9b05ef595147ef1ef95b6aed1c16 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Remove insignification of the test on Windows.Friedemann Kleint2013-09-061-2/+0
| | | | | | | | | | The failing test is excluded by adba828504c498944d244c5d17576f4542dd0c15 . Task-number: QTBUG-32664 Change-Id: I5030fbbe8d1c2bc93da9649b22223a6278b71ea0 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Merge branch 'stable' into devSergio Ahumada2013-09-061-0/+3
|\ | | | | | | | | | | | | | | | | Conflicts: src/qml/debugger/qv8debugservice.cpp src/qml/qml/v8/qv8engine.cpp tests/auto/quick/qquickitem/qquickitem.pro Change-Id: Ic4a1dcdd8b8a84155d2f2abefdf1da5c3a56af31
| * tst_qquickitem: Make exclusion more fine-grained.Friedemann Kleint2013-08-232-2/+3
| | | | | | | | | | | | | | | | | | Revert 764bd1cb0f8f2db4f84018890b9ebb8b42741789 . Task-number: QTBUG-32664 Change-Id: Idbe476a3e34b584b12e653f23a36d58028a2bf21 Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-191-0/+3
|\| | | | | | | | | | | | | | | Conflicts: tests/auto/quick/qquickgridview/qquickgridview.pro tests/auto/quick/qquickitem/qquickitem.pro Change-Id: Ic54cafbdda1ac22757d2ee65dcc63a1b167c7556
| * Merge remote-tracking branch 'origin/release' into stableSergio Ahumada2013-08-151-0/+2
| |\ | | | | | | | | | Change-Id: I3953f2473e3b2cf9768286fef1c5efd08c61c6f0
| | * Marking tst_qquickitem as insignificant in winSimo Fält2013-08-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This test haven't passed in WIN after the stage was made blocking. Task-number: QTBUG-32664 Change-Id: I0e84ff202d28a018e3e04dcf15f3a9ce6c66349b Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* | | Merge "Merge branch 'stable' into dev" into refs/staging/devSergio Ahumada2013-08-061-85/+82
|\| |
| * | Stabilize tst_qquickitem.Friedemann Kleint2013-07-311-85/+82
| |/ | | | | | | | | | | | | | | | | | | | | Instantiate windows and views on the stack or add QScopedPointer. Add waitForWindowExposed() after show(). Add diagnostic message. Task-number: QTBUG-32664 Change-Id: I190f2a0490b8333a7886a23e26582c6cb615df94 Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@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>
* Reenable tst_QQuickItem::simpleFocus and fix warnings.Gunnar Sletta2013-01-311-4/+2
| | | | | | | | | | | As a result of 1512835ee1425a3e874d2f2dd2b01f1a1ea7b763, the simpleFocus test now passes on Mac and can be reneabled. I also took the liberty of making sure windows have a valid geometry, so that we don't get tons of warnings. Task-number: QTBUG-24094 Change-Id: I5b8bc82f3f5397110f6e487898d511e810bae59d Reviewed-by: Alan Alpert <aalpert@rim.com>
* Merge branch 'stable' into devGunnar Sletta2013-01-171-1/+1
|\ | | | | | | | | | | | | | | Conflicts: src/qml/doc/qtqml.qdocconf src/quick/doc/qtquick.qdocconf Change-Id: I087fa14720995a5e53c43567dc4a3c29eb9992a9
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | | | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* | Do not force focus for non-focused windows.Gunnar Sletta2013-01-171-1/+1
|/ | | | | | | | | | If a QQuickWindow comes to screen but is not the focus window, such as if it is a child window of another window, it should not have focus by default. Change-Id: If9015bbc179bb101178b3bc8de176a1c71c46023 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Renamed QQuickItem::pos property to positionShawn Rutledge2012-11-291-1/+1
| | | | | | | | | Abbreviated property names are less descriptive so we don't have many of them. Might as well be consistent. QWindow::pos was already renamed. Change-Id: Ib52673e68e7dc902b2f8942dba6b899074b2538b Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* All QWindow properties that have "window" in them have been renamed.Shawn Rutledge2012-11-081-1/+1
| | | | | | | Depends on patch Ie4424ec15fbdef6b29b137f90a2ae33f173edd21 in qtbase. Change-Id: I9614cc2c7ed119c663b3f6f99267483e291e529c Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Remove interim compatibility measuresAlan Alpert2012-10-161-41/+41
| | | | | | | | Also update some variables in qtdeclarative which failed to update rootItem->contentItem. Change-Id: Id34e29546a22a74a7ae2ad90ee3a8def6fc541d3 Reviewed-by: Alan Alpert <416365416c@gmail.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Don't use compatibility headersPaul Olav Tvete2012-08-031-1/+1
| | | | | | | Cleaning up after the QWindowSystemInterface header change. Change-Id: Icc2df3cfd441bf6b113602f17d9b843fbc8c75ba Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Set the Qt API level to compatibility mode in all tests.Thiago Macieira2012-08-011-0/+1
| | | | | | | | | | Qt 5.0 beta requires changing the default to the 5.0 API, disabling the deprecated code. However, tests should test (and often do) the compatibility API too, so turn it back on. Task-number: QTBUG-25053 Change-Id: I6988c2360e9d88916311374a0c910bfc5b607439 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Add includes for QWindowSystemInterfacePaul Olav Tvete2012-08-011-0/+1
| | | | | | | QWindowsystemInterface will no longer be a public class Change-Id: Ibd815d377cbd553e8c3e99e99b337a9854647001 Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
* QQuickCanvas renamesAlan Alpert2012-07-171-189/+189
| | | | | | | | | | | | | | | | 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>
* Remove unneeded qpa/qwindowsysteminterface.h includesShawn Rutledge2012-07-131-1/+0
| | | | | | | They caused a build failure. Change-Id: Id83623f079c80c59067a5b3fb3488ba8572ea453 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Use qWaitForWindowActive() where it is required.Friedemann Kleint2012-07-091-1/+1
| | | | | | | | | | | 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>
* 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-031-1/+1
| | | | | | | | 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>
* Add tests for clicking and dragging with right and middle buttons.Andrew den Exter2012-06-221-0/+63
| | | | | | Task-number: QTBUG-24461 Change-Id: I2c8b3455cb3aead5df7dfd85f65eb633a552b881 Reviewed-by: Martin Jones <martin.jones@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>
* Removed CONFIG+=parallel_test from suspected parallel-unsafe testsRohan McGovern2012-05-221-1/+0
| | | | | | | | These tests have failed a parallel stress test and may contribute to instability in test runs. Change-Id: I8d82e9df7df6cac374b8b2eda43de8e96b676972 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* include QWindowSystemInterface explicity when neededGirish Ramakrishnan2012-04-191-0/+1
| | | | | | | | QtTest will not include QWindowSystemInterface anymore. See https://codereview.qt-project.org/#change,23440. Change-Id: Icad9f04fa748ad938925716b0012bc4cf1b3f154 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Fix crash when changing the grandparent of an item with focus.Andrew den Exter2012-04-021-0/+29
| | | | | | | | | | | When an item was reparented it's sub focus item was cleared and those of it's children were cleared along with those in the tree the item was removed from. Since we now rely on the focus state of an unparented tree to be correct we need to restore the sub focus items of the unparented tree. Change-Id: I236c512751b99092c7e9a39194f4680304bfacc5 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix warnings in qtdeclarative.Friedemann Kleint2012-03-301-0/+1
| | | | | | | | | | - QString from ASCII conversions - Unused variables - Pointer mismatches Change-Id: I5f76dce4f2ba481c2c2bce8681cf8107bd629566 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix forceActiveFocus() with multiple items having focus: trueAndrew den Exter2012-03-302-0/+124
| | | | | | | | | | | Ensure focus is cleared from an item if it is parented to an item that already has a sub focus item. Checking scopedFocusItem() didn't allow for the case where an unparented item is the root of the focus tree but not itself a focus scope, checking the unguarded subFocusItem member will. Change-Id: I482779e8077e9f282d22bd0090e669840764e52a Reviewed-by: Bea Lam <bea.lam@nokia.com>