diff options
author | Ulf Hermann <[email protected]> | 2019-08-16 17:14:55 +0200 |
---|---|---|
committer | Ulf Hermann <[email protected]> | 2019-08-20 08:43:17 +0200 |
commit | 560b5bcd277907538b71c147d12fdf3d41b1848c (patch) | |
tree | 9abbb14021b8b806d0e58185559e5388ce220441 /examples/quick/shared | |
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 <[email protected]>
Reviewed-by: Simon Hausmann <[email protected]>
Diffstat (limited to 'examples/quick/shared')
-rw-r--r-- | examples/quick/shared/CheckBox.qml | 2 | ||||
-rw-r--r-- | examples/quick/shared/LauncherList.qml | 11 | ||||
-rw-r--r-- | examples/quick/shared/Slider.qml | 2 |
3 files changed, 8 insertions, 7 deletions
diff --git a/examples/quick/shared/CheckBox.qml b/examples/quick/shared/CheckBox.qml index 7b1588d2d9..51b6aabc09 100644 --- a/examples/quick/shared/CheckBox.qml +++ b/examples/quick/shared/CheckBox.qml @@ -87,7 +87,7 @@ Item { anchors.margins: frame.width / 5 fillMode: Image.PreserveAspectFit smooth: true - visible: checked + visible: root.checked } } Text { 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() } diff --git a/examples/quick/shared/Slider.qml b/examples/quick/shared/Slider.qml index cdda86e39e..5b08034571 100644 --- a/examples/quick/shared/Slider.qml +++ b/examples/quick/shared/Slider.qml @@ -83,7 +83,7 @@ Item { anchors.left: parent.left anchors.leftMargin: 16 height: childrenRect.height - width: Math.max(minLabelWidth, childrenRect.width) + width: Math.max(slider.minLabelWidth, childrenRect.width) anchors.verticalCenter: parent.verticalCenter Text { text: slider.name + ":" |