From ee7255b261df4d0227d1bf5b7a6d8e4b121e92be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20K=C3=BCgler?= Date: Thu, 25 Oct 2012 14:47:16 +0200 Subject: [PATCH] Check if referenced objects are valid This kills plus 96c8478aef two ReferenceErrors I'm seeing when using ListItems inside VisualItemModels (in this case, there's no view and visual parent attached on creation). REVIEW:106937 --- declarativeimports/plasmacomponents/qml/ListItem.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/declarativeimports/plasmacomponents/qml/ListItem.qml b/declarativeimports/plasmacomponents/qml/ListItem.qml index cb2073f05..0ea5ffdc5 100644 --- a/declarativeimports/plasmacomponents/qml/ListItem.qml +++ b/declarativeimports/plasmacomponents/qml/ListItem.qml @@ -69,7 +69,7 @@ Item { //is this to be used as section delegate? property bool sectionDelegate: false - width: parent.width + width: parent ? parent.width : childrenRect.width height: paddingItem.childrenRect.height + background.margins.top + background.margins.bottom property int implicitHeight: paddingItem.childrenRect.height + background.margins.top + background.margins.bottom