Commit 7aa0a8bf authored by Nicolas Fella's avatar Nicolas Fella

Fix some unqualified property access

parent 8a3aa2ab
...@@ -26,6 +26,7 @@ import org.kde.kpublictransport 1.0 ...@@ -26,6 +26,7 @@ import org.kde.kpublictransport 1.0
Kirigami.Page Kirigami.Page
{ {
id: root
title: i18nc("@title", "Details") title: i18nc("@title", "Details")
property var journey property var journey
...@@ -36,19 +37,19 @@ Kirigami.Page ...@@ -36,19 +37,19 @@ Kirigami.Page
anchors.fill: parent anchors.fill: parent
model: journey.sections model: root.journey.sections
delegate: Loader { delegate: Loader {
sourceComponent: { sourceComponent: {
console.log(modelData.mode) console.log(model.modelData.mode)
switch(modelData.mode) { switch(model.modelData.mode) {
case JourneySection.Walking: return walking case JourneySection.Walking: return walking
case JourneySection.Waiting: return waiting case JourneySection.Waiting: return waiting
case JourneySection.Transfer: return transfer case JourneySection.Transfer: return transfer
default: return card default: return card
} }
} }
property var theData: modelData property var theData: model.modelData
} }
} }
......
...@@ -24,6 +24,7 @@ import org.kde.kirigami 2.0 as Kirigami ...@@ -24,6 +24,7 @@ import org.kde.kirigami 2.0 as Kirigami
Kirigami.ApplicationWindow Kirigami.ApplicationWindow
{ {
id: window
width: 480 width: 480
height: 720 height: 720
...@@ -33,11 +34,11 @@ Kirigami.ApplicationWindow ...@@ -33,11 +34,11 @@ Kirigami.ApplicationWindow
actions: [ actions: [
Kirigami.Action { Kirigami.Action {
text: i18n("Journey") text: i18n("Journey")
onTriggered: pageStack.initialPage = Qt.resolvedUrl("JourneyQueryPage.qml") onTriggered: window.pageStack.initialPage = Qt.resolvedUrl("JourneyQueryPage.qml")
}, },
Kirigami.Action { Kirigami.Action {
text: i18n("Departures") text: i18n("Departures")
onTriggered: pageStack.initialPage = Qt.resolvedUrl("DepartureQueryPage.qml") onTriggered: window.pageStack.initialPage = Qt.resolvedUrl("DepartureQueryPage.qml")
} }
] ]
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment