Commit 053e38cd authored by Nicolas Fella's avatar Nicolas Fella

Fix some unqualified property lookups

parent 2cf57e5b
......@@ -26,6 +26,7 @@ import org.kde.kpublictransport 1.0 as KPT
import org.kde.ktrip 1.0
Row {
id: root
property var journey
spacing: Kirigami.Units.smallSpacing
......@@ -33,12 +34,12 @@ Row {
Kirigami.Heading {
id: durationHeading
level: 2
text: _formatter.formatDuration(journey.duration)
font.strikeout: journey.disruptionEffect == KPT.Disruption.NoService
text: _formatter.formatDuration(root.journey.duration)
font.strikeout: root.journey.disruptionEffect == KPT.Disruption.NoService
}
Repeater {
model: journey.sections
model: root.journey.sections
delegate: Loader {
sourceComponent: model.modelData.route.line.hasLogo ? secIcon : secLabel
......
......@@ -26,7 +26,7 @@ import org.kde.ktrip 1.0
Kirigami.Page
{
id: rootPage
id: root
title: departures ? i18nc("@title", "Query Departures") : i18nc("@title", "Start Journey")
......@@ -35,8 +35,8 @@ Kirigami.Page
actions.main: Kirigami.Action {
icon.name: "system-search-symbolic"
text: i18nc("@action", "Search")
enabled: Controller.start.name != "" && (Controller.destination.name != "" || departures)
onTriggered: pageStack.push(departures ? Qt.resolvedUrl("DeparturesPage.qml") : Qt.resolvedUrl("ConnectionsPage.qml"))
enabled: Controller.start.name != "" && (Controller.destination.name != "" || root.departures)
onTriggered: pageStack.push(root.departures ? Qt.resolvedUrl("DeparturesPage.qml") : Qt.resolvedUrl("ConnectionsPage.qml"))
}
function startPicked(data) {
......@@ -57,18 +57,18 @@ Kirigami.Page
Button {
Layout.fillWidth: true
text: Controller.start.name ? Controller.start.name : i18nc("@action:button", "Pick Start")
onClicked: pageStack.push(Qt.resolvedUrl("LocationQueryPage.qml"), {title: i18nc("@title", "Search for Start Location"), callback: startPicked})
onClicked: pageStack.push(Qt.resolvedUrl("LocationQueryPage.qml"), {title: i18nc("@title", "Search for Start Location"), callback: root.startPicked})
}
Label {
text: i18n("To:")
visible: !departures
visible: !root.departures
}
Button {
Layout.fillWidth: true
visible: !departures
visible: !root.departures
text: Controller.destination.name ? Controller.destination.name : i18nc("@action:button", "Pick Destination")
onClicked: pageStack.push(Qt.resolvedUrl("LocationQueryPage.qml"), {title: i18nc("@title", "Search for Destination Location"), callback: destinationPicked})
onClicked: pageStack.push(Qt.resolvedUrl("LocationQueryPage.qml"), {title: i18nc("@title", "Search for Destination Location"), callback: root.destinationPicked})
}
Label {
......
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