QmlDesigner: Fix crash for component source drop

Task-number: QTCREATORBUG-10372
Change-Id: I0b56bf4998dbbdeb690622078d61c672d012ed5a
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This commit is contained in:
Marco Bubke
2013-10-15 18:02:40 +02:00
parent ddaafc0e26
commit 22b526ff89

View File

@@ -176,8 +176,10 @@ void ComponentView::searchForComponentAndAddToList(const ModelNode &node)
description = parentNode.simplifiedTypeName() + QLatin1Char(' ');
else
description = parentNode.id() + QLatin1Char(' ');
}
description += node.parentProperty().name();
}
QStandardItem *item = new QStandardItem(description);
item->setData(QVariant::fromValue(node.internalId()), ModelNodeRole);
item->setEditable(false);