aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick
Commit message (Collapse)AuthorAgeFilesLines
* Fix some compiler warnings in tests and examples.Christian Kandeler2014-01-152-4/+1
| | | | | Change-Id: Ia739c995005635caf6fd0bd4e495ed8567350e83 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Fix nodetest autotest.Gunnar Sletta2014-01-151-1/+3
| | | | | | | | | GL context was initialized with the wrong surface format resulting in warnings, and we did not clean up the render context properly. Change-Id: I19f748ca985a0becf1f7a6caa987f21567029cfd Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Alex Montgomery
* tst_qquickpathview: Use QCOMPARE instead of QVERIFY.Friedemann Kleint2014-01-101-7/+7
| | | | | | | | Attempting to get some diagnostic output for the failues. Task-number: QTBUG-35705 Change-Id: Iffebae89743c31e88125c0b1e21be172d3373b05 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Fix Flickable generated release event with pressDelay.Martin Jones2014-01-092-0/+37
| | | | | | | | | Map mouse position to grabber when forwarding release event due to release before pressDelay timeout. Task-number: QTBUG-34570 Change-Id: I7214077c9ac95f77407cf66f9dad52f577eccd79 Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
* Fix positioning of item when first cacheBuffer item is removed.Andrew den Exter2013-12-1914-31/+54
| | | | | | | | | | | | | When items prior to the first visible item are removed from the instantiated items list the first item is moved forward by the size of the item removed so it position remains correct relative to the visible items. But if the removed item is the first instanitated item then it's size shouldn't contribute to the offset as the next instatiated item is already offset by its size. Task-number: QTBUG-33619 Change-Id: I05c33f505e2856afa08cd9cd89d8eae97c20679d Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Fix touch to mouse synthesis/propagation.Robin Burchell2013-12-132-4/+111
| | | | | | | | | | | | | 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>
* Safeguard QQuickWindow::hide() against other GL contexts.Gunnar Sletta2013-12-123-1/+98
| | | | | | | | | If another GL context is bound to another surface on the GUI thread, we can run into issues while cleaning up the SG nodes. Task-number: QTBUG-34898 Change-Id: Ifa02b7cdbc7ab38b3a149a21452cc5071498a7d1 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* tst_qquickflickable: unskip rebound on OS XRobin Burchell2013-12-111-5/+0
| | | | | | | | | Out of 200 runs on 10.9 + stable branch, I have 0 failures. Task-number: QTBUG-26696 Change-Id: I84de15b68dfff2cb5f141c5f2a783154db16b77e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Set highlight size for both dimensions, irrespective of ListView orientationRobin Burchell2013-12-112-0/+44
| | | | | | | | | | | The assumption that all list delegates are the same size (dependent on ListView orientation) is not a correct one, even if it is correct most of the time. Task-number: QTBUG-31626 Change-Id: Iba6f3bc5f38d60e3be7632ab17d0c66ab8e73965 Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au> Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Stabilise and remove insignificant marker from tst_qquickflickable.Robin Burchell2013-12-112-11/+5
| | | | | | | | | | | | | A lot of work has gone into this test already since a79839dc5287de1448d1fd858db312a7bfa7b581, such as 6ba7d88df623df5bce85bfdae853fc49006e76f2. Everything passes for me locally, so let's skip specific tests if they break (or better: fix them) instead of having no test coverage at all. Change-Id: I29a7aeb26b106955c442da26df486cb6ce4bc92a Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Fix up listening for layout direction changes.Robin Burchell2013-12-101-1/+0
| | | | | | | | | | | | | | Change the event type to ApplicationLayoutDirectionChange. LayoutDirectionChange is sent for QWidgets only at present, and was wrong anyway: each widget may have a different layoutDirection, but the application instance only has one -- tied to ApplicationLayoutDirectionChange. Relies on I2d2ac7dc07f11be5c7e501a3575b1d0978d8ac31 from qtbase to actually function. Task-number: QTBUG-21573 Change-Id: Ibee25927b2213ae9145d46556698f54d5129bd06 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Fix crash in QQuickLoader when source component is garbage collectedSimon Hausmann2013-12-063-0/+32
| | | | | | | | | | It may happen that the QQuickLoader is the last entity left in the system holding a reference to the QQmlComponent *sourceComponent. We have to let the garbage collector know about that by keeping a persistent value for it. Task-number: QTBUG-35334 Change-Id: I715864440378fd9dd4f2d5ef8ff2f171c81ed7ef Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Only emit focusObjectChanged when an actual change occurs.Michael Brasser2013-12-062-0/+19
| | | | | | | Change-Id: If18b460a8773e5cac597c02c51836b79711c20f4 Done-with: Matthew Vogt <matthew.vogt@jollamobile.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Fix Flickable StopAtBounds drag over, back, over behavior.Martin Jones2013-12-052-1/+111
| | | | | | | | | | | | | | | A Flickable with StopAtBounds failed when: 1. position on a boundary. Without lifting your finger: 2. attempt to drag beyond the boundary -> doesn't drag 3. drag back to initiate dragging 4. attempt to quickly drag beyond the boundary. After 4, the view should be back on the boundary, but it could get stuck a little short of the boundary. Change-Id: I9bfbb4293f4d464bddb97c5c37e9bb91ed7d48e4 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-12-031-0/+20
|\ | | | | | | Change-Id: I894ad7b4888744833f487b481950c087fa960a5c
| * Ensure that QML Windows respect the default platform window stateTor Arne Vestbø2013-11-301-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'visible' property of a Window would be set on the baseclass QWindow like any other property during QML component creation, which would cause create() to be called and the platform window would be created. This left the 'visibility' of the QML window as Windowed, not respecting the platform defaults for how windows should be shown. The user would have to explicitly set "visibility: Window.AutomaticVisibility" for this default to apply, which doesn't make sense -- it should be the default. We solve this by deferring setVisible and setVisibility on the window until the component is complete and we have a full picture of its state. We then ask the platform for the default state based on the window flags (ensuring that eg "flags: Qt.Popup" will not result in maximized windows on iOS and Android), and apply the deferred visibility. The deferred visibility may still be 'false', but setting the window state makes sense anyways, so that a later "visible = true" will apply the default window state. Deferring platform window creation until the geometry has been potentially set from user code also has the benefit that the platform window can check the geometry and apply a default geometry if it's null. This was not possible when the 'visible' property was a regular property, as you could not know if the user's geometry changes would come after platform window creation. Task-number: QTBUG-35174 Change-Id: Icf3236187992048a85b2196c059f9b54699041a4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Set all attached section properties before emitting change signals.Martin Jones2013-11-302-0/+27
| | | | | | | | | | | | | | | | | | | | If we have bindings to the section properties, e.g. implementing manual section header creation, we want previousSection, section and nextSection to be set before emitting the change signals to prevent different results each time the binding is run. Change-Id: Id3a0b4a53419681f35102c9e7c620b5c6112ebb0 Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* | When the MouseArea loses grab, an active drag should be cancelled.Robin Burchell2013-11-301-0/+52
| | | | | | | | | | Change-Id: Icc784dd3265c211d9b077b692464591a41976354 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | tests: update tst_qquicktextinputLiang Qi2013-11-283-92/+140
| | | | | | | | | | | | | | | | | | * add signal_accepted() with validator * update signal_editingfinished() with validator * cleanup many qWait() and etc Change-Id: Ic0a8f1cdc4f1f811501c06513efff9b6217fc749 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | TextInput: call fixup() when appropriateJ-P Nurmi2013-11-271-0/+34
| | | | | | | | | | | | | | | | | | | | [ChangeLog][QtQuick] Fixed TextInput to call fixup() on its validator when being accepted or losing focus, and the validator reports that the input is in "intermediate" state ie. the input should be fixed up. Task-number: QTBUG-35128 Change-Id: I4b15406c584a9647bcf892badfaf6d845868fbf1 Reviewed-by: Liang Qi <liang.qi@digia.com>
* | Merge branch 'release' of ssh://codereview.qt-project.org/qt/qtdeclarative ↵Simon Hausmann2013-11-262-0/+58
|\| | | | | | | | | | | into stable Change-Id: I0bf06be69927d5961f1bdb4948c3572ef6111923
| * TextInput: add editingFinished signalLiang Qi2013-11-222-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Autotest is included. Task-number: QTBUG-34780 [ChangeLog][QtDeclarative][TextInput] add editingFinished signal Change-Id: Ib633daee67cd4e5f15739a6004adbe882ab3d3fc Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | Also update viewport size when header/footer size changesRobin Burchell2013-11-262-0/+49
| | | | | | | | | | | | | | Task-number: QTBUG-24292 Change-Id: I8e7f5abe077b6e8d2ce6625dcf43a34a7260934e Done-with: Martin Jones <martin.jones@jollamobile.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | Fix crash when assigning a null QObject or derived property as a ListView modelAndrew den Exter2013-11-242-0/+43
| | | | | | | | | | | | | | | | | | | | Fall through to the null case handler in the event of a QVariant of QObject or derived type with a null value, rather than asserting in the instance handler. Task-number: QTBUG-34999 Change-Id: I5eeffbe29a263c57e6157d516b138ddc8e2e7a95 Reviewed-by: Alan Alpert <aalpert@blackberry.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>
* Do not crash when one of group animation's children is nullJacek Całusiński2013-11-153-0/+38
| | | | | | | | | Check if pointer to QQuickAbstractAnimation for which we are setting group is valid. Task-number: QTBUG-34851 Change-Id: Iecb549f080804fd9489f884911fa51892def05a5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix stacking order bug in the rendererGunnar Sletta2013-11-152-0/+66
| | | | | | | | | | Since we are sorting batches based on the zorder of the first element it is crucial that we don't continue adding to batches once an overlap with a compatible element is found. Task-number: QTBUG-34864 Change-Id: Ic2194c5c17bba0bc9874a14e8a69c81bff75bd1c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Don't dereference a null animationTemplateLars Knoll2013-11-142-0/+32
| | | | | | | | | | If the SpringAnimation gets used inside a Transition, the animationTemplate might get cleared, but updateCurrentTime() still gets called on the SpringAnimation after that. Task-number: QTBUG-34539 Change-Id: I1f27fdbfc594e6ff9a4343e45f7f4001964bb012 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Make tst_nodes use QSGRenderLoop to behave more like QQuickWindowGunnar Sletta2013-11-131-6/+14
| | | | | Change-Id: I284164a45cabdb9f1fdbc2050db0cb00810ce946 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Avoid using huge floating point values in the renderer.Gunnar Sletta2013-11-093-0/+112
| | | | | | | | | | | | We pretransform vertices relative to their batch root and upload these using single-precision floats. If the offsets are huge then the floating point numbers start to get unstable and we get rendering artifacts as a result. This typically happens for lists/tables with huge models. Task-number: QTBUG-34312 Change-Id: I2516f2b4fa93f44a1288659d05458fb1af0df943 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Fix QQuickText hover event handlingJ-P Nurmi2013-11-052-0/+50
| | | | | | | | | | Catch hover events only when the item contains either rich or styled text, and make sure to ignore hover events as appropriate to propagate them further. Task-number: QTBUG-33842 Change-Id: Idef5be7c502711393ab532c4ace31663b0e0a872 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Fix rounding behavior of Qml when assigning doubles to integer propertiesSimon Hausmann2013-11-051-1/+1
| | | | | | | | | | | | The engine used to round, but that is inconsistent with ECMAScript's way of converting doubles to integers by truncation. With this patch we can also enable the propagation of integer type information into the IR, but we have to be careful not to utilize it when writing properties. Change-Id: I04af4879ba5131349eca2eeff2b27f4598f5267b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Don't propagate mouse events to disabled MouseAreasAlan Alpert2013-11-052-0/+61
| | | | | | | | Task-number: QTBUG-34368 Change-Id: I28d4f57e51300f12a7bab5d215933762102f3916 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Say hello to the scene graph sanity-tests for renderingGunnar Sletta2013-11-016-0/+646
| | | | | Change-Id: I5d975735b0975f284b8aee15541f208e3deb704f Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* KeyNavigation should use forceActiveFocusFrederik Gladhorn2013-11-012-1/+104
| | | | | | | | | | | | | | | It would only set focus which works fine as long as the target is in the same FocusScope. But as user one would expect that the target actually receives the focus. Using forceActiveFocus is sensible since the current item needs to have the "activeFocus" anyway and within the same focus scope setting focus=true on another item will take away the active focus. Task-number: QTBUG-34209 Change-Id: I824f15fd0d4d42eb2f0c6c1b02660f2e007b3362 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Added private API for enabling sharing between the QQuickwindow instances.Gunnar Sletta2013-11-011-13/+40
| | | | | | | | This API is primarily a hook which is needed by the Qt WebEngine to set up sharing with the scene graph's OpenGL contexts. Change-Id: I5bb03abd9ab99f502db8e413fe838a8b30365b8d Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Use one render loop per QQuickWindowGunnar Sletta2013-10-3011-9/+451
| | | | | | | | | | | | | | | | | | | See the task for the full reasoning behind this patch. The threaded renderloop has been refactored to have one window per thread. This is mostly a simplification of the current code path where for loops over multiple windows are turned into if (window). The QSGContext has been split into two classes, QSGRenderContext for which there is one per OpenGLContext. The rest of the patch is name changes and a couple of cleanups in the hopes of simplifying this change. Task-number: QTBUG-33993 Change-Id: I31c81f9694d7da7474a72333169be38de62613c4 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Fix rendernode bug and enable rendernode test.Gunnar Sletta2013-10-263-24/+21
| | | | | | | | | | | | | | The bug in the renderer was that the viewport was set before we called the render node, leaving us with the viewport set by the render node as opposed to the viewport of the renderer. The render node API is a crude and intrusive hack which was added for webkit back in the day. With the introduction of webengine it becomes less relevant, but it should still work. Change-Id: I66a1e3047e018ad6c0bb28044851e9fc65da59cc Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Allow &quot; in QQuickStyledTextJohn Brooks2013-10-241-1/+1
| | | | | | | | QString::toHtmlEscaped generates &quot;. QQuickStyledText should be symmetrical with that function. Change-Id: I67ea0abe446b5fa1edb53258dca58b84af910e28 Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Re-enable working test.Gunnar Sletta2013-10-221-3/+0
| | | | | | | Task-number: QTBUG-33517 Change-Id: I05ec6085b26a8d002cb904fecc172fa2eefbf79d Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Reset on model layout changedAlbert Astals Cid2013-10-215-2/+284
| | | | | | | Otherwise the next dataChanged from the model may not be received Change-Id: I16b859d92fdb1823c4a56c297d4451abe438fbb1 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Fix and re-enable constantUpdateOnWindow test.Gunnar Sletta2013-10-111-15/+33
| | | | | Change-Id: I0015ea58bfd673352405642153a038b72d44aa37 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Unskip test which now passes.Gunnar Sletta2013-10-111-3/+0
| | | | | Change-Id: Ifccab1ef822a9bb455d442f6b13711887a399d6e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Fix regression in pressDelay behavior.Michael Brasser2013-10-041-0/+17
| | | | | | | | | | | | | | | Don't deliver a press event when a Flickable is moved before the pressDelay expires. This prevents delegates flickering between pressed and unpressed states when beginning to flick a Flickable. Fixes regression introduced by 429af6244518172e19abf7fecd7112f26bac6b31/ d02131e743597b9bd3070d986c61a1c91ea8317a. Task-number: QTBUG-31168 Change-Id: Id4e853fabe99000837df3681acd8fc4e76d2e9b3 Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Fix warnings in tst_qquickaccessible.Friedemann Kleint2013-10-031-6/+2
| | | | | | | | | | | | tst_qquickaccessible.cpp: In function 'int verifyHierarchy(QAccessibleInterface*)': tst_qquickaccessible.cpp:70:27: warning: variable 'middleChild' set but not used tst_qquickaccessible.cpp: In function 'QAccessibleInterface* topLevelChildAt(QAccessibleInterface*, int, int)': tst_qquickaccessible.cpp:325:46: warning: suggest parentheses around assignment used as truth value. Change-Id: I80f9a1e5438279add3671828a3145af2b1f2abf8 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Fix PathView stealing mouse grab from its child items.Andrew den Exter2013-10-012-0/+60
| | | | | | | | | | Apply the improvements that have been applied to Flickables handling of child items over time to PathView to bring its behavior back in line. Task-number: QTBUG-33699 Change-Id: I76a412d75c48f9cf2f12f5f6f1aa01ff62d06364 Reviewed-by: Joona Petrell <joona.petrell@jollamobile.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Stabilize and speed up testLars Knoll2013-09-285-45/+55
| | | | | | | | Added lots of missing qWaitForWindowExposed(), and sped up animations. Change-Id: Ie3c5e53dc9e9770baa05fb1da3eedce80ac52d31 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Try to stabilize the multipleTransitions testLars Knoll2013-09-281-0/+1
| | | | | Change-Id: Ifeb53d6a1334623106428410aa2756935d7ba6e1 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Allow animators to work properly with multiple windowsGunnar Sletta2013-09-2618-1287/+90
| | | | | Change-Id: I5ba663ba0fa089ea786cf43cb4dfa40cbc955342 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Convenience class for FBO rendering in Qt QuickGunnar Sletta2013-09-254-0/+327
| | | | | Change-Id: I5712bbfa0cde9f2fe5fddc35c4cc23597717065c Reviewed-by: Lars Knoll <lars.knoll@digia.com>