aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick
Commit message (Collapse)AuthorAgeFilesLines
* qttest: make findChild available only for QtTest 1.1Fawzi Mohamed2014-12-0510-10/+10
| | | | | Change-Id: I4ceb1a969bd4296b82f899088b02b5e8cf100bcd Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Skip tst_qquickwindow::headless() when using ANGLE/Windows.Friedemann Kleint2014-12-021-0/+5
| | | | | | | | | The test crashes frequently. Task-number: QTBUG-42967 Change-Id: Ic17c6187bfa657154a9b04eb9c5b9a3de291cb1e Reviewed-by: Andrew Knight <andrew.knight@theqtcompany.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* QQuickWindow autotest: verify that onClosing can block close()Shawn Rutledge2014-11-071-0/+20
| | | | | | Task-number: QTBUG-40093 Change-Id: I800259f45d95736172d500494e68042180178e93 Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* Stabilize tst_QQuickAccessibleJan Arve Sæther2014-11-061-4/+0
| | | | | | | | There is no reason to wait for the window to activate Task-number: QTBUG-42355 Change-Id: I5faaff5bddd367e6dd57a6a922011c87c847148e Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
* Add attached Window::contentItem propertyJ-P Nurmi2014-11-052-0/+4
| | | | | | | | | This is essential to the Qt Quick Controls for implementing floating text selection handle popups. Change-Id: Ibae65110a5db6d65dacd197fef3ad567d11342dc Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* text input: always let cursor rect have a width == 1Richard Moe Gustavsen2014-10-301-0/+21
| | | | | | | | | | | | | | | | Instead of using a cursor width of null when a cursor delegate is set, we should to use a value of 1. Otherwise the rect we e.g return from cursorRect() will be invalid. An alternative would be to use the width of the delegate, but that was found to be controversial. On iOS we saw a bug with this when telling iOS to position text spelling popups underneath the cursor. Since the cursor rect we got was invalid (zero-width), no popup would show. Change-Id: Ice51b9a1bd33f331183e3acec61b7d9c0f5163cd Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* Repeater & itemviews: fix setModel() JS array handlingJ-P Nurmi2014-10-294-0/+114
| | | | | | | | | | | | QVariant comparison in setModel() started failing because JS arrays are now passed as a QJSValue. Re-assigning the same array content should not trigger a model change. This change restores the old behavior it had before, when JS arrays were passed as QVariantLists. Change-Id: I1882b3531f2893b116dbd817edeecab1ae812ce8 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove mouse grabber if touch used for mouse emulation has been grabbedDaniel d'Andrada2014-10-292-10/+97
| | | | | | | | | | | | | | | | | | | | If an item grabs a touch that is currently being used for mouse pointer emulation, the current mouse grabber should lose the mouse as mouse events will no longer be generated from that touch point. Example of what happens without this patch: -User touches a MouseArea. It gets pressed. -Some other item grabs that touch. -This touch eventually ends. -The MouseArea would still be pressed. And what will happens instead after this patch: -User touches a MouseArea. It gets pressed. -Some other item grabs that touch. -The MouseArea gets canceled and released -This touch eventually ends. Change-Id: I24114f18be564553a4a768243bb20379affe7a8f Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix crash in SpriteSequenceAlex Blasche2014-10-243-0/+146
| | | | | | | | | | When QML declares sprites and goalSprite in wrong order the goalsprite attempts to set it on null spriteEngine. This patch ensures that the order doesn't matter anymore. Task-number: QTBUG-40595 Change-Id: I57f1c8754b2e2af91e0c7f72d1d67fec3ad4ede5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Relayout rich text when width increasesEskil Abrahamsen Blomfeldt2014-10-231-0/+29
| | | | | | | | | | | | | | | | | | | In updateSize() we were trying to force relayouts for RichText when the width changes by always setting widthExceeded to true. But further down in the same function, we overwrote this with textWidth() < idealWidth(), which doesn't work, because both properties are the wrapped width of the document and should only differ if the text cannot be wrapped properly. The result was that when increasing the width of a Text element, we would hit the optimization and skip the relayout. [ChangeLog][Text] Fixed Text with the RichText format to correctly update wrapping when the width of the element grows. Change-Id: I5fd87052a5ba7e8ee2549be0cfac4adc8ddf8290 Task-number: QTBUG-33020 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Screen attached property: expose devicePixelRatio propertyShawn Rutledge2014-10-232-0/+3
| | | | | | | Change-Id: I08b22766b3e389b7d27ca4c56729f550b0647a08 Reviewed-by: Jens Bache-Wiig <jensbw@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Support Accessible.ignored on non-leaf itemsJan Arve Saether2014-10-214-4/+166
| | | | | | | | | | Ignoring items with children will make the children appear as children of the parent of the ignored item. Since setAccessibleFlagAndListener now only sets the flag we also rename the function to just setAccessible Change-Id: I79fc311509a3e454b4698274c63ad0e879fb93e3 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Make test more robust against ignored children.Jan Arve Saether2014-10-204-33/+84
| | | | | | | | With the upcoming change that changes the semantics of Accessible.ignored, some assumptions in the test does not hold anymore. Change-Id: I9b34f1ecc61fc0d4e8abe5a5505a5bcff44501d4 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Fix tst_qquickpositioners on OS XFrederik Gladhorn2014-10-201-0/+3
| | | | | | Done-with: Jan Arve Sæther Change-Id: Iff66f62167a5977354319aac311d2cb81d9f3842 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
* PathView: Fix QML engine thinking currentItem is null when it's notSérgio Martins2014-10-102-0/+42
| | | | | | | | QML didn't re-evaluate any bindings using currentItem because a notification was missing. Change-Id: Icdaa3022e0b01644a060e577d87f011b4ea9fabb Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Temporarily skip tst_qquickframebufferobject when using ANGLE.Friedemann Kleint2014-10-091-0/+4
| | | | | | | Task-number: QTBUG-41815 Change-Id: I5c6ec36a4f8830d95e1d4904d1be41d752757339 Reviewed-by: Andrew Knight <andrew.knight@digia.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* QQuickWindow autotest: focus transferred to parent on window closeShawn Rutledge2014-10-091-3/+0
| | | | | | | | | | | These bugs were fixed so XFAIL is no longer necessary in the autotest (change da0c74550f0e8a21239896d6aead6e05f85eb695 in qtbase). Task-number: QTBUG-33423 Task-number: QTBUG-39809 Change-Id: Ia89554b9f54aca7ef6c6ac6b474ca2bb9c0f5629 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Add orientationUpdateMask to QQuickScreenAlex Blasche2014-09-302-0/+4
| | | | | | Task-number: QTBUG-38699 Change-Id: I173b7e53c27dba336351572859f7c9aeafe07ef9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Revert "Temporarily mark grab()/item.layer tests insignificant under ANGLE"Andrew Knight2014-09-302-36/+0
| | | | | | | | | This reverts commit 6b31418a1b5d9be47df5ed61747e8a5fb225acfa. These tests now pass with the latest ANGLE. Change-Id: If812d430e69f0d39a970e9119ebc1f2e5b4886dc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Partially revert "Disable tests on failing ANGLE config"Andrew Knight2014-09-301-3/+0
| | | | | | | | | This partially reverts commit fa29df24bd2792f5eb64e4ff21a116b2c5f5384c. The sprite sequence test now passes in CI under MSVC2010. Change-Id: Ie8f7abdd2ff00db377b1ef3f221c5048c430c067 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix cleanup of non-threaded render loops.Gunnar Sletta2014-09-241-11/+19
| | | | | | | | | | | | | | | | | | | | | | They would unconditionally call cleanupNodesOnShutdown on hide(), but QQuickWindow::sceneGraphInvalidated would only be emitted if this was the last window being hidden, leading to an inconsistent state in the application. Since the non-threaded render loops do not support releasing resources (there is one OpenGL context and one QSGRenderContext shared between all windows) we delay cleanup until the window is destroyed. This change also make the render loops track the windows until they are destroyed, similar to what the threaded one does. The purpose of this is to, in the case of dangling windows, only trigger invalidation of the scene graph when the last QQuickWindow is destroyed through QSGRenderLoop::cleanup(). Task-number: QTBUG-41210 Change-Id: I7e12a4f726ebb3e7935c822b6046abb3590c583a Reviewed-by: Ulf Hermann <ulf.hermann@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Fix clip state tracking in Context2DMatt Fischer2014-09-221-1/+1
| | | | | | | | | | | | | | | | | | A recent change (f45fe58ad2aa741c90b756643da75f1a6bc2fdf6) introduced the concept of clipping being disabled for a context, so that it can start with no clip path set. However, this state is not properly tracked, so an attempt to restore a context state which has no clip path does not work properly. This change adds this information to the Clip command, so that it can be properly restored. This patch also re-enables a test case which was supposed to check this behavior, but had been disabled. Task-number: QTBUG-40312 Change-Id: I3fd5626ecfcc1298a81931828cbb590290098a92 Reviewed-by: Ulf Hermann <ulf.hermann@digia.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Make tst_qquickanimations more reliableUlf Hermann2014-09-191-30/+37
| | | | | | | | | As we usually don't get realtime guarantees we cannot rely on exact sleep times. This change relaxes our expactations in that regard. Task-number: QTBUG-29062 Change-Id: I54dfb7a28d6bb46479aedb9f943f5ff4db2df701 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Remove tst_dialogs - moved to qtquickcontrolsJ-P Nurmi2014-09-184-207/+1
| | | | | | | | QtQuick.Dialogs were moved from qtdeclarative to qtquickcontrols already in Qt 5.3, but the auto test was forgotten. Change-Id: I5c74e45b9ee2302f1d20fb476af6a93879913a28 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Fix QQuickText::lineLaidOutRelayout autotest on OS XJan Arve Saether2014-09-171-5/+6
| | | | | | | | QTextLine::height() can be different that QTextLine::rect().height() Task-number: QTBUG-37829 Change-Id: I7fa93d50e29397237220ba111baa3bd1a56b88f2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Make Canvas test case independent of chosen font.Ulf Hermann2014-09-161-1/+6
| | | | | | | | | 0/0 is not always a red pixel after rendering "Hello" in red. The chosen font has an influence on that. Looking for some red pixel in row 0 is pretty safe. Change-Id: I669548c3c9d8cd25d720998fd9ba31c1f480e4e3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Wait longer for image to be loaded in canvas item testUlf Hermann2014-09-161-1/+1
| | | | | | | 200ms can be too short if the system is busy Change-Id: I4f9c6bcbec93d511b5b5e9d531450f3ffd22cb0c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* autotests: fix build on iOSRichard Moe Gustavsen2014-09-111-1/+1
| | | | | Change-Id: Idf854ad4f868e873582731dfa6b0253ac5b17c5c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Disable tst_QQuickListView::programmaticFlickAtBounds()Eskil Abrahamsen Blomfeldt2014-09-101-0/+2
| | | | | | | | This test gives false negatives blocking CI consistently. Change-Id: Id904f147b720a183167f335ee4db856d7e3ca94d Task-number: QTBUG-41228 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* MouseArea: Fix cancelling the double click when the windows loses focusOlivier Goffart2014-09-032-8/+53
| | | | | | | | | | Without this, the next click is not received after the windows loses focus while we double clicked but not released the mouse. This may happen if the onDoubleClicked opens a new window Change-Id: I86742de2bb1ea4c9657b9d5e90472d093293177d Reviewed-by: Alan Alpert <aalpert@blackberry.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>
* tst_qquickcanvasitem: Setting as insignificant.Simo Fält2014-08-291-0/+1
| | | | | | Task-number: QTBUG-41043 Change-Id: Ib438ddc890e9a1ede16731b950b195d4341b8fd0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Added QSGPainterNode abstraction to QSGAdaptationLayerAndy Nichols2014-08-272-4/+4
| | | | | | | | | This allows the scenegraph backend to customize how QSGPainterNodes are rendered. Change-Id: I640dcf121d0be6bda615cf30591d502329fc89d0 Reviewed-by: Lars Knoll <lars.knoll@digia.com> 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-1/+4
|\
| * Merge remote-tracking branch 'origin/5.3' into 5.4Simon Hausmann2014-08-261-1/+4
| |\ | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlobjectcreator_p.h Change-Id: I60858ddb46866a8fa1a8576bb05b412afeeb4e41
| | * tst_dialogs: verify that rootObject is validRobin Burchell2014-08-151-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | if there's an error during loading, it's much easier to spot if this fails rather than crashes. Change-Id: If0106729e18768819da8a877959a095398af8547 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| | * tst_dialogs: QTRY_ on the expression (spyVisibilityChanged.count) not the ↵Robin Burchell2014-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | variable. We only assign to the variable once, so the value may not change in time. Change-Id: I54ac7faad60d3984bfde4606aaf7e30a2340ba3e Reviewed-by: Shawn Rutledge <shawn.rutledge@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-25117-2206/+1270
| | | | | | | | | | | | | | | | | | - 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>
* | Downscale textures which exceed the GL texture limitGunnar Sletta2014-08-234-0/+77
| | | | | | | | | | | | | | | | | | | | This way they will at least render. [ChangeLog][QtQuick] Images exceeding GL_MAX_TEXTURE_SIZE will be downscaled to fit so they will still show. Change-Id: I169ecac768036812b8e14265ec1a0a8902655666 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-08-141-3/+2
|\| | | | | | | Change-Id: I2e06c2fcd8aa9d5d090f0568be75272ec82f7b20
| * Silence harmless compiler warning.Gunnar Sletta2014-08-121-3/+2
| | | | | | | | | | | | | | | | AlignJustify is not a tested value, but the compiler warning can throw you off, so best to keep it quiet. Change-Id: I0b3d717dfe2c11fc4367e7eceb5b83009c4e0a30 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Ignore extra arguments passed to Context2D functions.Mitch Curtis2014-08-141-0/+343
| | | | | | | | | | | | | | | | | | | | | | This is in line with what Chrome, Firefox and IE do. This is also how most JavaScript functions in Qt behave by default (for example, TableView::resizeColumnsToContents()). Task-number: QTBUG-40703 Change-Id: I087221e305dcb5fd6709ad4a99a5163d641faac6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Remove QQuickWindow::glslVersion & glslIsCoreProfileJ-P Nurmi2014-08-131-35/+0
| | | | | | | | | | | | | | | | | | Superceded by the OpenGLInfo attached type => remove the API before it gets released Change-Id: I7511fd28eb375eb3cd3cdd4bda6d82c1883e3094 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Merge remote-tracking branch 'origin/5.3' into 5.4Simon Hausmann2014-08-123-4/+137
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4include.cpp src/quick/items/qquickrendercontrol.cpp src/quick/items/qquickrendercontrol_p.h src/quickwidgets/qquickwidget.cpp Change-Id: Ib2dc0051a38cd283a37a7665eb4a76f6f7ec8b15
| * Synchronize PathView gesture grabbing with other items.Martin Jones2014-08-063-4/+137
| | | | | | | | | | | | | | | | | | | | | | PathView didn't attempt to grab the gesture at the same event as other items. This prevented PathView from rightfully claiming the gesture before lower items in the stack. Use the same threshold test for PathView as used elsewhere. Task-number: QTBUG-37859 Change-Id: Ic57cb805ac979e41c3e35d86b2e7db781e61d69d Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* | Add OpenGLInfo attached typeJ-P Nurmi2014-08-114-0/+109
| | | | | | | | | | | | | | | | | | [ChangeLog][QtQuick] Introduced OpenGLInfo attached type that provides information about the currently used OpenGL version. Change-Id: Ibdf365decf9d6331cf91c0bf541e493ced02a417 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Remove setDefaultFormat() from QQuickWindowLaszlo Agocs2014-08-111-5/+11
| | | | | | | | | | | | | | Replaced by QSurfaceFormat::setDefaultFormat(). Change-Id: If4e37b75ccb55d556d80b0079be89e5a521f6dbb Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Add Window attached property on ItemShawn Rutledge2014-08-082-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An Item sometimes needs to know a few things about the window in which it is being displayed; this attached property can expose them without needing to go up the heirarchy to find the window. Instead of adding the QQuickWindow pointer as a property on Item as in 8f49f50a169db85401eb37daf4fe3a0fc3280603, having an attached property means that it will not be found by introspection; and it solves the problem that Window is in the QtQuick.Window module: you must import the module to use the attached property, instead of having access to a pointer whose type might not be defined if you didn't import it. The Window attached property is created on-demand (so the memory cost adds up if you use it in too many places); the tradeoff is that it can exist even when the item is not yet being shown in a window, so bindings at startup work. The API is purposely incomplete compared to that in QQuickWindow so that we can introduce what is needed in a controlled fasion over time. For now we know of use cases for visibility, active and activeFocusItem. [ChangeLog][QtQuick][Window] Added Item.Window attached property Change-Id: I649404cbd1383326678aa2144f790b2f2542dbbc Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Merge "Merge branch '5.3' into dev" into refs/staging/devGunnar Sletta2014-08-087-6/+400
|\ \