on xenial help sign in
Fix Panel tests freezing occasionally

During Panel tests, it was common to see the following error repeating in the log: QWARN : [...]unity8/qml/Panel/PanelItemRow.qml:168:5: QML ListView: Binding loop detected for property "width" Generally this didn't cause any problems. Occasionally, though, the loop would not be caught and the tests would lock up forever at 100% CPU. To fix this, use the ListView's contentItem rather than childrenRect. This likely should have been the case since the beginning, since the ListView reparents all contained Items to contentItem rather than holding them directly.

commitd952c52f8537623f7f7b89c338c862b87ebf8ce0 authorRatchanan Srirattanamet <ratchanan@ubports.com> dateWed 4 Mar 2020, 10:48 (7 years ago) parentb7f044e
1 file changed+1−1
qml/Panel/PanelItemRow.qml+1−1
qml/Panel/PanelItemRow.qml+1−1
@@ -180,7 +180,7 @@ Item {
180180 // TODO: make this better
181181 // when the width changes, the highlight will lag behind due to animation, so we need to disable the animation
182182 // and adjust the highlight X immediately.
183− width: childrenRect.width
183+ width: contentItem.width
184184 Behavior on width {
185185 SequentialAnimation {
186186 ScriptAction {