path: root/tests/auto/quick/qquickitem/data
Commit message (Collapse)AuthorAgeFilesLines
* Add test for detecting invalid mouse button cancel eventSami Nurmenniemi2018-02-191-0/+59
| | | | | | | | | Commit e0c30279ec1fad88346ed3fb483bc3c672fdd01b has already fixed the issue tested by this change. Task-number: QTBUG-60123 Change-Id: I0e378a7b1586f4e6c43246fca9d12719f62b3275 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix licensingJani Heikkinen2017-05-042-34/+24
| | | | | | | | | - Remove unused license files - Switch old LGPLv21 license headers with GPL-EXCEPT one Task-number: QTBUG-57147 Change-Id: Ib59c3e2e39bfe0038db795af85dc75028564efa3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Keys: add shortcutOverride signalMitch Curtis2016-12-181-0/+65
| | | | | | | | | | | | | | | | | | | | | This allows an item to accept the shortcutOverride event, preventing e.g. Shortcut from stealing key events. The original use case that prompted the creation of this patch was using a Popup from Controls 2 to create a keyboard shortcut editor. When the user wanted to cancel the shortcut that they were editing, they could press escape, but Popup would grab the shortcut and close itself. As the test case demonstrates, the same problem occurs with the Shortcut type in Qt Quick. [ChangeLog][QtQuick][Keys] Added shortcutOverride signal to Keys attached object to allow prevention of e.g. Shortcut from stealing key events. Task-number: QTBUG-57098 Change-Id: I594e4ea17ec417d8c7d93c6cf347c1a1a2e62b93 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Determine QQuickItem::childAt() correctlyKari Hautamäki2016-02-241-0/+70
| | | | | | | | | | | [ChangeLog][QtQuick][QQuickItem] Fix to wrong calculation of child at a given point. Previously coordinates of width+1 and height+1 were counted as a child. That caused a child Rect of (0, 0, 100, 100) to be reported as a child at (100, 100), which is wrong (correct max coordinate is (99, 99).) Task-number: QTBUG-41833 Change-Id: I6124a275a5dc1a38eab448235102d563e2a8b0ca Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* Return the correct type from Item::mapToItem/Item::mapFromItem.Mitch Curtis2015-04-081-0/+26
| | | | | | | | | | | | | | | | | | | | | 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>
* Remove references transforms have to items in QQuickItem's destructor.Mitch Curtis2014-08-251-0/+31
| | | | | | | | | | 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>
* Fix visual parent ownership with scenes that create windowsSimon Hausmann2014-03-281-0/+15
| | | | | | | | | | | | | | | | | | 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>
* Fix interaction of QQuickItems with the garbage collectorSimon Hausmann2014-01-061-0/+14
| | | | | | | | | | | | | | | | | 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 forceActiveFocus() with multiple items having focus: trueAndrew den Exter2012-03-301-0/+23
| | | | | | | | | | | 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>
* Don't assert if focus is already clear.Alan Alpert2012-03-151-0/+18
| | | | | | | | | Already cleared focus should exit the function without terminating the runtime. Task-number: QTBUG-24714 Change-Id: Ia8c6be0d88e43d1f71112acc7bac3eb674f22de8 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-243-0/+25
Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>