aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickitem2
Commit message (Collapse)AuthorAgeFilesLines
* Properly check the arguments of mapFrom/ToItemLars Knoll2015-12-012-8/+24
| | | | | | | | | Check that we have the right type and number of arguments and throw a type error if they don't match. Change-Id: I23d37074bf0a6f88e656897862eedc8f7c9f9f8f Task-number: QTBUG-41686 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Fix childrenRect calculationCornelius Mika2015-10-312-0/+64
| | | | | | | | | | | | | Because the 'bottom' and 'right' variables were both initialized to 0, the bottom right corner of the children rect was clamped to coordinates >= (0, 0). Additionally, replace FLT_MAX with the more appropriate std::numeric_limits<qreal>::max(). Task-number: QTBUG-38732 Change-Id: I073b0b44737cf1faed5e4f6a5d466dd830d451bf Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-262-0/+63
|\ | | | | | | | | | | | | | | Conflicts: tests/auto/qml/qml.pro tools/qmlprofiler/qmlprofilerclient.cpp Change-Id: Id47f15a5ab38f8ec79f0a26c92805acba62caac4
| * QQuickItem: detect loop in KeyNavigation chainLiang Qi2015-10-142-0/+63
| | | | | | | | | | | | Task-number: QTBUG-47229 Change-Id: I22dbe5ee1fff4e9a8de4fa69b43e4d9a87677192 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | QQuickItem: Make setParent() error message more usefulGabriel de Dietrich2015-10-221-1/+4
| | | | | | | | | | Change-Id: Ie39b7ee91024b6b090fce2b58bb240cbae724b8f Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | QQuickItem: correct focus reason for key navigationLiang Qi2015-10-141-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Before we used Qt::OtherFocusReason for normal key navigation, such as up/down/left/right. But in style world, the reason is critical for focus change. Now we follow the way in widgets world, use Qt::TabFocusReason and Qt::BacktabFocusReason for down/up and right/left(or reversed if mirrored). Task-number: QTBUG-41801 Change-Id: I99e97ea4ced2cef9b3280c578c3a463de8fe1727 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* | Add isTabFence private flagGabriel de Dietrich2015-08-212-0/+121
| | | | | | | | | | | | | | | | | | | | | | | | When an item has this flag set, the user can't tab-navigate either out of it, or enter it. We use this flag to implement QQuickPanel as an item for platforms that only support one single top-level window. Change-Id: I1f4313912ae1c70217af0d4d21064932b50a9438 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* | tests/quick: Replace Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b).Friedemann Kleint2015-07-271-43/+43
| | | | | | | | | | | | | | | | | | | | | | | | - 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>
* | Tests: Replace Q[TRY]_VERIFY(v == true|false) by QVERIFY(v)|QVERIFY(!v).Friedemann Kleint2015-07-271-3/+3
|/ | | | | | | | Preparing the replacement of Q[TRY]_VERIFY(a == b) by Q[TRY]_COMPARE(a, b) for non-boolean types. Change-Id: I8a4e44a2b4e20a9c8b811799e3932c8ce1a2cbbb Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
* Use TabFocusBehavior in QStyleHints in QtQuickLiang Qi2015-02-121-4/+2
| | | | | | | | * QQuickItemPrivate::qt_tab_all_widgets was removed. * qt_tab_all_widgets in test was updated. Change-Id: I418d7a3edae0a4782a91289f6c0494ff5874d071 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-126-41/+41
| | | | | | | | | 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>
* Revert "Temporarily mark grab()/item.layer tests insignificant under ANGLE"Andrew Knight2014-09-301-3/+0
| | | | | | | | | This reverts commit 6b31418a1b5d9be47df5ed61747e8a5fb225acfa. These tests now pass with the latest ANGLE. Change-Id: If812d430e69f0d39a970e9119ebc1f2e5b4886dc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-256-116/+68
| | | | | | | | | - 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>
* Temporarily mark grab()/item.layer tests insignificant under ANGLEAndrew Knight2014-08-071-0/+3
| | | | | | | | This is to pass CI while the issue is being fixed. Task-number: QTBUG-40649 Change-Id: I9b095ce0ce0a3c51956ab81d09975b6cc6ce3592 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* QQmlError::toString: improve handling of empty urls.David Faure2014-07-241-1/+1
| | | | | | | | | | | | "file::2:23: ..." is strange to read. Show "<Unknown File>:2:23: ..." instead, by treating empty urls (including "file:") as unknown, and by still showing line and column numbers in such a case. This change makes it possible for QUrl::fromLocalFile("") to return an empty url rather than "file:", which this module was relying upon in the tests. Change-Id: I91918090fd4e0aa9a25dbbb18893a0ce94140e21 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge remote-tracking branch 'origin/5.3' into devSimon Hausmann2014-06-131-1/+5
|\ | | | | | | | | | | | | Conflicts: src/quickwidgets/qquickwidget.cpp Change-Id: Id4b080aea713df68608847bb82570231e37ce536
| * Fix forwarding of keyboard events to multiple target itemsJoni Poikelin2014-06-111-1/+5
| | | | | | | | | | | | | | | | | | | | Fix regression when multiple items are set to Keys.forwardTo attached property. QML items accept key events automatically and event should be by default in accepted state when entering handler. Task-number: QTBUG-39168 Change-Id: Ibf6c163c4059269996113634efa48ad2fe4d838d Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Merge remote-tracking branch 'origin/stable' into devSimon Hausmann2014-05-221-1/+1
|\| | | | | | | Change-Id: I0dd91626837276f5811e4830f4a4e9f89bf1e1bd
| * Update qmltypes filesAlan Alpert2014-05-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Additionally, fixes some revisioning errors which a manual inspection of the qmltypes files diffs revealed. -mipmapChanged signal is new -windowTitleChanged signal is new -Matrix4x4 made 5.3, but was revisioned for 5.4 Task-number: QTBUG-29806 Change-Id: I4cb8bca6ac6fe8040871734c88aabcd392c1d696 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* | Minor: Remove unneeded include from qquickitem.hKevin Funk2014-05-131-0/+1
| | | | | | | | | | | | | | Clean up after 0cb12e9e01b8309320706fab219945f0ff159413 Change-Id: I7e7f0c1f7e3b9bb994bc8fd50e1c9ba462e99e28 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2014-05-103-0/+343
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Avoid event propagation with Keys.forwardToJ-P Nurmi2014-04-122-0/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtQuick][Important Behavior Changes] Keys.forwardTo no longer propagates key events to the target item's parents. This makes Keys.forwardTo act more as expected, like an event filter. This way Keys.forwardTo becomes usable for composite types that want to enable the Keys attached property handling by forwarding key events from an internal editor. Task-number: QTBUG-37924 Change-Id: I66d1b7245df39678767e79d4bdd46fc15e5c5c3f Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
| * On Mac only editable text input should receive tab focusLiang Qi2014-04-022-0/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's for all items with "readOnly: false" and has "text" property. [ChangeLog][QtQuick] Mac: any editable text input will get tab focus when "Text boxes and lists only" option was selected. About "Text boxes and lists only", see commit 06332df7438c8d2215b02f1e01ce2ed28a49a320. Task-number: QTBUG-38004 Change-Id: I73947b71b2fec69a66e122514d440656f4650e99 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* | Notify about the focus reasonBerthold Krevert2014-05-061-0/+72
| | | | | | | | | | | | | | | | | | KeyNavigation sets the focus reason always to Qt::OtherFocusReason. This should be changed at least for tab and backtab navigation. Change-Id: I27c654a202e2a80449dd5420460e413ca9cff75e Reviewed-by: J-P Nurmi <jpnurmi@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
* | Say hello to QQuickItem::grabToImage().Gunnar Sletta2014-05-012-0/+97
|/ | | | | | | | | [ChangeLog][QtQuick][Item] Added functions QQuickItem::grabToImage() and Item::grabToImage() to allow grabbing of items into system-memory images. Change-Id: I76cd73bb62f7440569c6fce63d63528559845721 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Prefer to use normalised signal/slot signaturesSergio Ahumada2014-03-031-1/+1
| | | | | | Change-Id: I9856c110399c4b6b1ea6aba2d92392cecff04656 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* fix whitespaceOswald Buddenhagen2014-01-221-1/+1
| | | | | | | remove trailing spaces and expand tabs Change-Id: Ieacb9d096b612c45d1a64700044c114d1f7522bc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add QQuickMatrix4x4, a way to specify a matrix transform in QML.Erik Larsson2014-01-071-1/+3
| | | | | | | | | | | | Add QQuickMatrix4x4 which makes it possible to specify a 4x4 matrix tranformation directly in QML instead of decomposing the transformation into rotation, scale etc. It does NOT replace anything, just adds a new way of specifying a tranformation of an Item. Change-Id: I1b123778d1d458dfe4314cdb4f0fc99fd8a4c86a Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.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>
* Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2013-09-212-0/+20
|\ | | | | | | Change-Id: I899f3b517523e4037de50802c0912f7dd960133e
| * Fix a crash in QQuickItem::nextItemInFocusChain()Liang Qi2013-09-192-0/+20
| | | | | | | | | | | | | | | | There is no window object yet when Component.onCompleted. Task-number: QTBUG-33298 Change-Id: I0608d52ee9fe52a0e2c18e81ad7ba99b56078be4 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* | Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into ↵Simon Hausmann2013-07-222-0/+117
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | wip/v4 Conflicts: src/quick/items/context2d/qquickcontext2d.cpp tests/auto/quick/qquickvisualdatamodel/qquickvisualdatamodel.pro Change-Id: I36a4fd28b3156839aecd70039a3ba566bf19a0bc
| * | Add bool QQuickKeyEvent::matches(QKeySequence::StandardKey)J-P Nurmi2013-07-012-0/+117
| |/ | | | | | | | | Change-Id: Iaa8392c1b113856fa80cd2507f8640050eb9bec2 Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* | Merge branch 'dev' of ssh://codereview.qt-project.org/qt/qtdeclarative into ↵Simon Hausmann2013-06-245-13/+556
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wip/v4 Conflicts: src/imports/qtquick2/plugins.qmltypes src/qml/debugger/qv8debugservice.cpp src/qml/qml/qml.pri src/qml/qml/qqmlcompiler.cpp src/qml/qml/qqmlcomponent.cpp src/qml/qml/qqmlcontext.cpp src/qml/qml/qqmldata_p.h src/qml/qml/qqmlengine_p.h src/qml/qml/qqmljavascriptexpression.cpp src/qml/qml/qqmlxmlhttprequest.cpp src/qml/qml/v4/qv4bindings.cpp src/qml/qml/v4/qv4irbuilder.cpp src/qml/qml/v4/qv4jsonobject_p.h src/qml/qml/v8/qqmlbuiltinfunctions.cpp src/qml/qml/v8/qv8bindings.cpp src/qml/qml/v8/qv8contextwrapper.cpp src/qml/qml/v8/qv8listwrapper.cpp src/qml/qml/v8/qv8qobjectwrapper.cpp src/qml/qml/v8/qv8qobjectwrapper_p.h src/qml/qml/v8/qv8sequencewrapper_p_p.h src/qml/qml/v8/qv8typewrapper.cpp src/qml/qml/v8/qv8valuetypewrapper.cpp src/qml/types/qqmldelegatemodel.cpp src/quick/items/context2d/qquickcanvasitem.cpp src/quick/items/context2d/qquickcontext2d.cpp sync.profile tests/auto/qml/qjsengine/tst_qjsengine.cpp tests/benchmarks/qml/animation/animation.pro tools/qmlprofiler/qmlprofiler.pro Change-Id: I18a76b8a81d87523247fa03a44ca334b1a2360c9
| * Prevent tab focus from wrapping endlesslyLiang Qi2013-05-273-0/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there was no item that accepted focus, it would go into an endless loop. This also changes the default behavior of QQuickWindow. When there is not any activeFocusItem in the whole window, it means the contentItem got focused. The Tab/BackTab key will now focus the next item in the tab focus chain. Autotest is included. Done-with: Frederik Gladhorn <frederik.gladhorn@digia.com> Task-number: QTBUG-31344 Change-Id: I854292f89a327c493eec21969907c94aa9cfddcb Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| * Mac: respect the system settings in Full Keyboard AccessLiang Qi2013-05-142-0/+276
| | | | | | | | | | | | | | Iterate all or not in nextPrevItemInTabFocusChain function. Change-Id: I95289b042f3d9924c28ffb9c8c7124c767addf2e Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * Revert "Mac: respect the system settings in Full Keyboard Access"Liang Qi2013-05-082-276/+0
| | | | | | | | | | | | | | | | | | This breaks Qt Quick Controls activeFocusOnTab autotests. This reverts commit 305616a60462b668c4d0b3d19302fa90469aceb5. Change-Id: Ided59ebe99659b23e950e8269ccaa8d7d44a4fdb Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
| * The resources property should be independent from QObjectThomas Hartmann2013-05-082-13/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resources was a direct mapping of the QObject children. This led to problems since the QObject children can also contain other objects from other sources like attached properties. This patch decouples resources from QObject properties and also does not call setParent() anymore. The special case for QQuickWindow in data_append does rely on the fact that QObject::setParent() is called and the inner window becomes a QObject::child of the content item. So we keep the setParent for this special case. The children property does not take QObject ownership either. QObject ownership is handled by the VME. None of the documented QML use cases should be touched by this change. This is a cleaner solution then the ad hoc fix provided by https://codereview.qt-project.org/#change,54677 I changed also the test. The list count now has to be exactly 4. Change-Id: I5c119e333ee82e888aaac1da559fd63a875d08ee Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * Mac: respect the system settings in Full Keyboard AccessLiang Qi2013-05-082-0/+276
| | | | | | | | | | | | | | Iterate all or not in nextPrevItemInTabFocusChain function. Change-Id: I14d40dbeda01ca470efe23886789383ff1d30c0f Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
| * Expose nextItemInFocusChain in QQuickItemLiang Qi2013-04-231-0/+75
| | | | | | | | | | | | | | | | | | Convenient for other use cases related with tab focus chain. Autotest is included. Change-Id: I1ba6317e20edacc2b672bc5b78e3fcd29ac80bdc Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.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>
* Added more tests for activeFocusOnTabLiang Qi2013-04-092-0/+118
| | | | | | | The ignored key events will go to parent. Change-Id: I5e002ee9df44d1c7865c1c50a1631e8e206c68af Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Version new property and signalLiang Qi2013-04-082-2/+2
| | | | | | | | activeFocusOnTab and activeFocusOnTabChanged in QQuickItem. Task-number: QTBUG-30446 Change-Id: I973df95d690b8e533b5cc108d8e083a2fed8528a Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Support activeFocusOnTab in QQuickItemLiang Qi2013-03-123-0/+715
| | | | | | | | | | | | | | | | | | | Add activeFocusOnTab as property to QQuickItem. Setting the property allows automatic keyboard navigation between all elements that have it set. This key event handler will only be called after the QML key handlers, such as KeyNavigation and Keys, and the C++ key event handlers, such as keyPressEvent function. Algorithm is most done by Frederik Gladhorn, in cooperation with Gabriel de Dietrich. Done-with: Frederik Gladhorn <frederik.gladhorn@digia.com> Done-with: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Change-Id: I8b58be9c20d113661fe85d27bdb1af84340d9de5 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-103-3/+3
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* All QWindow properties that have "window" in them have been renamed.Shawn Rutledge2012-11-081-9/+9
| | | | | | | Depends on patch Ie4424ec15fbdef6b29b137f90a2ae33f173edd21 in qtbase. Change-Id: I9614cc2c7ed119c663b3f6f99267483e291e529c Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Change qml list interfaceMarco Bubke2012-10-231-2/+1
| | | | | Change-Id: I185c6f4cef6105544504324c1616b5995c219fe3 Reviewed-by: Christiaan Janssen <christiaan.janssen@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-233-72/+72
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.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 tests for QQuickItem::childAt and antialiasing.Andrew den Exter2012-07-251-0/+68
| | | | | Change-Id: I5dc26eaf27c201be05147c7bab4d6f0b0c926aed Reviewed-by: Martin Jones <martin.jones@nokia.com>