diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-08-16 17:14:55 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-08-20 08:43:17 +0200 |
commit | 560b5bcd277907538b71c147d12fdf3d41b1848c (patch) | |
tree | 9abbb14021b8b806d0e58185559e5388ce220441 /examples/quick/shared/LauncherList.qml | |
parent | a2e10253548f1fd7f20a59e67669daa0e6713b0a (diff) |
examples: Fix a few linter warnings
Unqualified lookup in the root object of a component is bad.
Change-Id: I7772216fb81e68824519408998c73dbb1ca60c4d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'examples/quick/shared/LauncherList.qml')
-rw-r--r-- | examples/quick/shared/LauncherList.qml | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/quick/shared/LauncherList.qml b/examples/quick/shared/LauncherList.qml index fe44cf3634..9859b5b635 100644 --- a/examples/quick/shared/LauncherList.qml +++ b/examples/quick/shared/LauncherList.qml @@ -51,6 +51,7 @@ import QtQuick 2.12 Rectangle { + id: root property int activePageCount: 0 //model is a list of {"name":"somename", "url":"file:///some/url/mainfile.qml"} @@ -74,7 +75,7 @@ Rectangle { id: launcherList clip: true delegate: SimpleLauncherDelegate{ - onClicked: showExample(url) + onClicked: root.showExample(url) } model: ListModel {id:myModel} anchors.fill: parent @@ -116,7 +117,7 @@ Rectangle { ParallelAnimation { id: showAnim ScriptAction { - script: activePageCount++ + script: root.activePageCount++ } NumberAnimation { target: launcherList @@ -144,7 +145,7 @@ Rectangle { id: exitAnim ScriptAction { - script: activePageCount-- + script: root.activePageCount-- } ParallelAnimation { @@ -182,7 +183,7 @@ Rectangle { visible: height > 0 anchors.bottom: parent.bottom width: parent.width - height: activePageCount > 0 ? 40 : 0 + height: root.activePageCount > 0 ? 40 : 0 Behavior on height { NumberAnimation { @@ -222,7 +223,7 @@ Rectangle { TapHandler { id: tapHandler - enabled: activePageCount > 0 + enabled: root.activePageCount > 0 onTapped: { pageContainer.children[pageContainer.children.length - 1].exit() } |