aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/views
diff options
context:
space:
mode:
authorMaximilian Goldstein <max.goldstein@qt.io>2021-04-30 10:38:37 +0200
committerMaximilian Goldstein <max.goldstein@qt.io>2021-04-30 10:55:58 +0200
commit9a7b31b736c1e4f68643c1c8ccce6d4177ac9bc6 (patch)
tree53640b616a978914c1528b6c80a4b527425fd9e4 /examples/quick/views
parent81768ae09b85e430d9a4c1c070c2d86c70d83c33 (diff)
examples/quick/views: Fix a few warnings
Change-Id: Iac5df82ff708e37a0cb985e0b83878e7f9b107e1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'examples/quick/views')
-rw-r--r--examples/quick/views/listview/highlightranges.qml7
-rw-r--r--examples/quick/views/objectmodel/objectmodel.qml2
-rw-r--r--examples/quick/views/views.qml1
3 files changed, 5 insertions, 5 deletions
diff --git a/examples/quick/views/listview/highlightranges.qml b/examples/quick/views/listview/highlightranges.qml
index dafd064332..cc5d8e30e5 100644
--- a/examples/quick/views/listview/highlightranges.qml
+++ b/examples/quick/views/listview/highlightranges.qml
@@ -159,6 +159,7 @@ Rectangle {
Component {
id: petDelegate
Item {
+ id: petDelegateItem
width: 160
height: column.height
@@ -169,9 +170,9 @@ Rectangle {
Column {
id: column
- Text { text: 'Name: ' + parent.name }
- Text { text: 'Type: ' + parent.type }
- Text { text: 'Age: ' + parent.age }
+ Text { text: 'Name: ' + petDelegateItem.name }
+ Text { text: 'Type: ' + petDelegateItem.type }
+ Text { text: 'Age: ' + petDelegateItem.age }
}
MouseArea {
diff --git a/examples/quick/views/objectmodel/objectmodel.qml b/examples/quick/views/objectmodel/objectmodel.qml
index c9e4b8a5cd..7ef32bfd45 100644
--- a/examples/quick/views/objectmodel/objectmodel.qml
+++ b/examples/quick/views/objectmodel/objectmodel.qml
@@ -84,7 +84,7 @@ Rectangle {
color: "#F4F0FF"
Text { text: "Page 3"; font.bold: true; anchors.centerIn: parent }
- Component.onDestruction: if (root.activeFocusprintDestruction) print("destroyed 3")
+ Component.onDestruction: if (root.printDestruction) print("destroyed 3")
}
}
diff --git a/examples/quick/views/views.qml b/examples/quick/views/views.qml
index bdf05269ae..0dfde6672f 100644
--- a/examples/quick/views/views.qml
+++ b/examples/quick/views/views.qml
@@ -49,7 +49,6 @@
****************************************************************************/
import QtQuick 2.0
-import QtQml.Models 2.1
import "../shared" as Examples
Item {