mirror of https://code.videolan.org/videolan/vlc
BrowseDisplay: Refactor with 'stackViewItem' alias
This commit is contained in:
parent
75626cb976
commit
c7f0cc6130
|
@ -75,8 +75,7 @@ Widgets.PageLoader {
|
||||||
|
|
||||||
// Connections
|
// Connections
|
||||||
Connections {
|
Connections {
|
||||||
target: (stackView.currentItem instanceof BrowseHomeDisplay) ? stackView.currentItem
|
target: (stackViewItem instanceof BrowseHomeDisplay) ? stackViewItem : null
|
||||||
: null
|
|
||||||
|
|
||||||
onSeeAll: {
|
onSeeAll: {
|
||||||
if (sd_source === -1)
|
if (sd_source === -1)
|
||||||
|
@ -84,17 +83,17 @@ Widgets.PageLoader {
|
||||||
else
|
else
|
||||||
History.push(["mc", "network", "device", { title: title, sd_source: sd_source }])
|
History.push(["mc", "network", "device", { title: title, sd_source: sd_source }])
|
||||||
|
|
||||||
stackView.currentItem.setCurrentItemFocus(reason)
|
stackViewItem.setCurrentItemFocus(reason)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: stackView.currentItem
|
target: stackViewItem
|
||||||
|
|
||||||
onBrowse: {
|
onBrowse: {
|
||||||
History.push(["mc", "network", "browse", { tree: tree }])
|
History.push(["mc", "network", "browse", { tree: tree }])
|
||||||
|
|
||||||
stackView.currentItem.setCurrentItemFocus(reason)
|
stackViewItem.setCurrentItemFocus(reason)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -158,7 +157,7 @@ Widgets.PageLoader {
|
||||||
Navigation.cancelAction: function() {
|
Navigation.cancelAction: function() {
|
||||||
History.previous()
|
History.previous()
|
||||||
|
|
||||||
stackView.currentItem.setCurrentItemFocus(Qt.BacktabFocusReason)
|
stackViewItem.setCurrentItemFocus(Qt.BacktabFocusReason)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -167,18 +166,18 @@ Widgets.PageLoader {
|
||||||
id: componentBar
|
id: componentBar
|
||||||
|
|
||||||
NetworkAddressbar {
|
NetworkAddressbar {
|
||||||
path: view.name === "browse" ? root.stackView.currentItem.providerModel.path : []
|
path: view.name === "browse" ? root.stackViewItem.providerModel.path : []
|
||||||
|
|
||||||
onHomeButtonClicked: {
|
onHomeButtonClicked: {
|
||||||
History.push(["mc", "network", "home"])
|
History.push(["mc", "network", "home"])
|
||||||
|
|
||||||
stackView.currentItem.setCurrentItemFocus(reason)
|
stackViewItem.setCurrentItemFocus(reason)
|
||||||
}
|
}
|
||||||
|
|
||||||
onBrowse: {
|
onBrowse: {
|
||||||
History.push(["mc", "network", "browse", { "tree": tree }])
|
History.push(["mc", "network", "browse", { "tree": tree }])
|
||||||
|
|
||||||
stackView.currentItem.setCurrentItemFocus(reason)
|
stackViewItem.setCurrentItemFocus(reason)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue