aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick
Commit message (Collapse)AuthorAgeFilesLines
* Prospective fix for flakey "network" related QML testsv5.4.2Simon Hausmann2015-04-2518-160/+192
| | | | | | | Replace hard-coded server ports with dynamically allocated ports. Change-Id: Iab8f9a88343a9f2c49af3cd700c954c13c3bf121 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* tst_qquickapplication: change test case 'state' to be more stableRichard Moe Gustavsen2015-04-081-8/+7
| | | | | | | | | | | | | | Qt-5.4 integration can sometimes fail on this test. We have not succeeded reproducing it, but from reading the test code, it seems likely that the problem might come from already pending state events queued before the test starts. Since the test cannot know if the platform will queue state events while spinning the event loop (waitForEvents), this patch will instead only flush already queued events, which should be less prone to side effects. Change-Id: I134f98ba35faa4d9213ee658ebcbe76b390b5516 Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
* Blacklist QQuickWindow::testWindowVisibilityOrder for OS XFrederik Gladhorn2015-03-301-0/+2
| | | | | | | | | | | | The failing test is a regression introduced by 5bf9528b9164bd888e991552b66d6237e84a7ee2. Since that patch had several side effects, we will not revert it but blacklist the test function for now. Task-number: QTBUG-45318 Change-Id: I3e28a21c8b056c1c8f2fd5d6d3ffe32d5f44b0e5 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
* Replace blog.qt.digia.com with blog.qt.ioSergio Ahumada2015-02-061-2/+2
| | | | | | Change-Id: I2518576bbe2ca9f68928973ea83b9e58084b91e3 Reviewed-by: Tero Kojo <tero.kojo@theqtcompany.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Fix Text wrapping when growing from 0 width.Michael Brasser2015-02-032-0/+27
| | | | | | | | The fix for QTBUG-30896 caused a regression in the test case. Now check both width and implicit width validity before resetting widthExceeded. Change-Id: I4aba2aad299746906cfe20e288fa60cfe2acc64f Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
* Verify context creation in Quick tests.Friedemann Kleint2015-01-293-10/+24
| | | | | | | | Verify initialization steps and initialize pointers to avoid crashes. Change-Id: I2d3a53c6719727aed56e673d0d8cf5a02ae0f0f6 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Ensure that Canvas has the correct size with complex bindings.Mitch Curtis2015-01-281-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | When a Canvas is a child of an item with certain width and height values (as described in the bug report), it won't paint correctly. For example, the order of events might occur like so: 1. Canvas width set to 1 2. Canvas height set to 1 3. Canvas width set to 32, which causes the height to also be set to 32 Every size change causes QQuickCanvasItem::geometryChanged() to be called, but the third event above causes it to be called recursively, such that the most nested call results in the size being 32x32, but then the execution returns to the first call and 32x1 is used instead, overwriting the correct size. We fix this by setting the new canvas size to width() and height(), ignoring the recursion and instead using the latest size of the item. Change-Id: Iebbcbfaa3217319b32b97f6b68f7a8af197a0e89 Task-number: QTBUG-42878 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Canvas: don't crash when getContext("2d") is called on destruction.Mitch Curtis2015-01-262-0/+51
| | | | | | | | | | | | | | | | | | | | We'd assume that a Window existed when that's not always the case. For example: import QtQuick 2.4 import QtQuick.Window 2.2 Window { Loader { sourceComponent: Canvas { Component.onDestruction: getContext("2d") } Component.onCompleted: active = false } } Change-Id: I5f30876e21ced5658adfa3bac494fd4196e0a7e3 Task-number: QTBUG-42222 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* TextEdit: fix construction time text cacheJ-P Nurmi2015-01-081-0/+12
| | | | | | | | | | | QQuickTextEdit does not apply cached text to the underlying document until component construction is complete. However, if text() was called during the construction (eg. because of a binding), it would blindly overwrite the cached text with (still) empty document content. Task-number: QTBUG-41583 Change-Id: I6c5c1b6283d70d8a5ec2c8bd986095ee3c35a14c Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Change Qt bugtracker URL to qt.ioAlex Blasche2014-12-161-1/+1
| | | | | | Change-Id: I3dde034b2a36c324df9f4e1fd2e05a07a7237c04 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* QML: fix warning in testsErik Verbruggen2014-12-091-1/+7
| | | | | | | | Mark unused fields as Q_UNUSED. They are still "used" to check if the compiler will generate warnings/errors (which it shouldn't). Change-Id: I38e1668e88d94ab8f26a92a06f5207b77369e136 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* QML: fix warning in testsErik Verbruggen2014-12-091-23/+0
| | | | | | | Remove unused function that wouldn't be emitted anyway. Change-Id: I623d5d44bca9a1358cf9e66ff557992aba9ae451 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge "Merge remote-tracking branch 'origin/5.4.0' into 5.4" into ↵Simon Hausmann2014-12-0910-10/+10
|\ | | | | | | refs/staging/5.4
| * Merge remote-tracking branch 'origin/5.4.0' into 5.4Simon Hausmann2014-12-0510-10/+10
| |\ | | | | | | | | | Change-Id: I5978bab8a4fde4c2ee33907fd81f49cb69e4fb26
| | * 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>
* | | Quick: fix testErik Verbruggen2014-12-091-1/+1
|/ / | | | | | | | | | | | | | | | | /Users/erik/dev/qt5-stable/qtdeclarative/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp:1561:60: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int] items << qMakePair(QString("new item " + j), QString::number(j)); ~~~~~~~~~~~~^~~ Change-Id: I94bd952abf82a8f174772482330b5fdd636578ad Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Merge remote-tracking branch 'origin/5.4.0' into 5.4Simon Hausmann2014-12-021-0/+5
|\| | | | | | | Change-Id: I89bbb2977350a03c156d531f810d08a5560ffbb3
| * 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>
* | Stabilize tst_qquickflickable.Friedemann Kleint2014-11-281-4/+20
|/ | | | | | | | | - Use one engine per test - Use QQuickView for the margins test - Verify QWindow cleanup. Change-Id: Id2a10b56101832c362822963a2a7bd1d66daa143 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>