diff options
author | Sami Shalayel <sami.shalayel@qt.io> | 2022-09-28 13:55:15 +0200 |
---|---|---|
committer | Sami Shalayel <sami.shalayel@qt.io> | 2022-09-29 14:14:04 +0200 |
commit | d3c2e1327d98b2d6e08ff1a76ccc83cb541bfb46 (patch) | |
tree | de4b47331a15622beabe515af470920385587f44 /examples/quick/keyinteraction | |
parent | be6f2338927e5b842249c3b0d2c30e57b8600e48 (diff) |
Key Interaction Example: revert PropertyChanges to 6.2-style
Partially reverts commit 1694a4a71d03faf7e952535f9af86f886bb223d4.
The 6.3-style of doing PropertyChanges (using grouped properties)
for the key interaction example has been accidently picked back to 6.2.
This leads to broken behaviors and crashes: partially revert the
PropertyChanges to the old syntax.
Fixes: QTBUG-106883
Change-Id: I6457f8057c24bec5324cc192f1432f4acccc27c7
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Diffstat (limited to 'examples/quick/keyinteraction')
-rw-r--r-- | examples/quick/keyinteraction/GridMenu.qml | 7 | ||||
-rw-r--r-- | examples/quick/keyinteraction/ListViewDelegate.qml | 9 | ||||
-rw-r--r-- | examples/quick/keyinteraction/TabMenu.qml | 7 | ||||
-rw-r--r-- | examples/quick/keyinteraction/focus.qml | 35 |
4 files changed, 16 insertions, 42 deletions
diff --git a/examples/quick/keyinteraction/GridMenu.qml b/examples/quick/keyinteraction/GridMenu.qml index 4b05785e1d..d5914fe4d6 100644 --- a/examples/quick/keyinteraction/GridMenu.qml +++ b/examples/quick/keyinteraction/GridMenu.qml @@ -105,12 +105,7 @@ FocusScope { states: State { name: "active"; when: container.activeFocus - PropertyChanges { - content { - color: "#FCFFF5" - scale: 1.1 - } - } + PropertyChanges { target: content; color: "#FCFFF5"; scale: 1.1 } } transitions: Transition { diff --git a/examples/quick/keyinteraction/ListViewDelegate.qml b/examples/quick/keyinteraction/ListViewDelegate.qml index 9fe4949282..1d14f22195 100644 --- a/examples/quick/keyinteraction/ListViewDelegate.qml +++ b/examples/quick/keyinteraction/ListViewDelegate.qml @@ -87,13 +87,8 @@ Item { states: State { name: "active"; when: container.activeFocus - PropertyChanges { - content { - color: "#FCFFF5" - scale: 1.1 - } - label.font.pixelSize: 16 - } + PropertyChanges { target: content; color: "#FCFFF5"; scale: 1.1 } + PropertyChanges { target: label; font.pixelSize: 16 } } transitions: Transition { diff --git a/examples/quick/keyinteraction/TabMenu.qml b/examples/quick/keyinteraction/TabMenu.qml index 7aa70a7dcb..cfa38e958c 100644 --- a/examples/quick/keyinteraction/TabMenu.qml +++ b/examples/quick/keyinteraction/TabMenu.qml @@ -100,12 +100,7 @@ FocusScope { states: State { name: "active"; when: container.activeFocus - PropertyChanges { - content { - color: "#FCFFF5" - scale: 1.1 - } - } + PropertyChanges { target: content; color: "#FCFFF5"; scale: 1.1 } } transitions: Transition { diff --git a/examples/quick/keyinteraction/focus.qml b/examples/quick/keyinteraction/focus.qml index 1eef9b9981..7b1452ba35 100644 --- a/examples/quick/keyinteraction/focus.qml +++ b/examples/quick/keyinteraction/focus.qml @@ -118,29 +118,23 @@ Rectangle { states: [ State { name: "showTabViews" - PropertyChanges { - tabMenu.y: 160 - gridMenu.y: 320 - listMenu.y: 640 - } + PropertyChanges { target: tabMenu; y: 160 } + PropertyChanges { target: gridMenu; y: 320 } + PropertyChanges { target: listMenu; y: 640 } }, State { name: "showGridViews" - PropertyChanges { - tabMenu.y: 0 - gridMenu.y: 160 - listMenu.y: 480 - } + PropertyChanges { target: tabMenu; y: 0 } + PropertyChanges { target: gridMenu; y: 160 } + PropertyChanges { target: listMenu; y: 480 } }, State { name: "showListViews" - PropertyChanges { - tabMenu.y: -160 - gridMenu.y: 0 - listMenu.y: 320 - } + PropertyChanges { target: tabMenu; y: -160 } + PropertyChanges { target: gridMenu; y: 0 } + PropertyChanges { target: listMenu; y: 320 } } ] @@ -171,14 +165,9 @@ Rectangle { states: State { name: "contextMenuOpen" when: !mainView.activeFocus - PropertyChanges { - contextMenu { - x: 0 - open: true - } - mainView.x: 130 - shade.opacity: 0.25 - } + PropertyChanges { target: contextMenu; x: 0; open: true } + PropertyChanges { target: mainView; x: 130 } + PropertyChanges { target: shade; opacity: 0.25 } } transitions: Transition { |