From 7eddc26d24defb3444e21adfbd43f8e568be576d Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Sat, 22 Jul 2017 04:30:45 +0200 Subject: ModelIndexRetriever to abuse Repeater less publicly Simliar to Retriever, but we'd have to alias all properties/roles automatically somehow. --- components/kube/contents/ui/LogView.qml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'components') diff --git a/components/kube/contents/ui/LogView.qml b/components/kube/contents/ui/LogView.qml index 0d01ed6f..918597df 100644 --- a/components/kube/contents/ui/LogView.qml +++ b/components/kube/contents/ui/LogView.qml @@ -122,24 +122,17 @@ Controls.SplitView { property date timestamp property string message property string resourceId: "" - property string accountId: "" - property string accountName: "" + property string accountId: retriever.currentData.accountId + property string accountName: retriever.currentData.name color: Kube.Colors.backgroundColor - Repeater { + + Kube.ModelIndexRetriever { + id: retriever model: Kube.AccountsModel { - id: accountsModel resourceId: details.resourceId } - Item { - property string account: model.accountId - property string accountName: model.name - onAccountChanged: { - details.accountId = account - details.accountName = name - } - visible: false - } } + Rectangle { anchors { fill: parent -- cgit v1.2.3