Commit 7d423d5f authored by Kai Koehne's avatar Kai Koehne
Browse files

QmlDesigner: Fix crash in property editor when parent of an item is invalid

Happened for

import Qt 4.6
Flipable {
  Rectangle {}
}
parent 0cb84165
...@@ -87,6 +87,8 @@ void SiblingComboBox::setup() ...@@ -87,6 +87,8 @@ void SiblingComboBox::setup()
} }
QmlItemNode parent(m_itemNode.instanceParent().toQmlItemNode()); QmlItemNode parent(m_itemNode.instanceParent().toQmlItemNode());
if (parent.isValid()) {
m_itemList.prepend(parent); m_itemList.prepend(parent);
QString parentString("Parent ("); QString parentString("Parent (");
...@@ -96,10 +98,9 @@ void SiblingComboBox::setup() ...@@ -96,10 +98,9 @@ void SiblingComboBox::setup()
parentString += parent.id(); parentString += parent.id();
parentString += ")"; parentString += ")";
insertItem(0, parentString); insertItem(0, parentString);
}
setCurrentIndex(m_itemList.indexOf(m_selectedItemNode)); setCurrentIndex(m_itemList.indexOf(m_selectedItemNode));
connect(this, SIGNAL(currentIndexChanged (int)), this, SLOT(changeSelection(int))); connect(this, SIGNAL(currentIndexChanged (int)), this, SLOT(changeSelection(int)));
} }
......
import Qt 4.6
Rectangle {
width: 640
height: 480
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment