Skip to content

BreadcrumbControl: Fix errors from wrong indexing

ivan tkachenko requested to merge work/ratijas/errors into master

Binding on the result of indexing a list property with an index property means relying on two independently and asynchronously updated properties, and that won't work well, especially on boundary value like last index. Solution is to guard expressions against null to prepare them for Qt-flavored "eventual consistency" of signals propagation.

Fixes errors in e.g. Plasmoid configuration window when switching tabs:

file:///usr/lib/qml/org/kde/kirigami.2/private/globaltoolbar/BreadcrumbControl.qml:16:5: Unable to assign [undefined] to QQuickItem*
file:///usr/lib/qml/org/kde/kirigami.2/private/globaltoolbar/BreadcrumbControl.qml:16:5: Unable to assign [undefined] to QQuickItem*
file:///usr/lib/qml/org/kde/kirigami.2/private/globaltoolbar/BreadcrumbControl.qml:16:5: Unable to assign [undefined] to QQuickItem*

Merge request reports