Commit 3aae2989 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner: Crash fix

If the item did not have an id Qt Quick Designer crashed.
While we do ensure the item does get an id, we used the empty id
when refactoring later.
Now we use the generated id.

Change-Id: I71b9731270dc91537c17f6cb4fed3403d1001137
Reviewed-by: default avatarTim Jenssen <>
parent 75e408be
......@@ -639,12 +639,9 @@ static QStringList getSortedSignalNameList(const ModelNode &modelNode)
void gotoImplementation(const SelectionContext &selectionState)
QString itemId;
ModelNode modelNode;
if (selectionState.singleNodeIsSelected()) {
itemId = selectionState.selectedModelNodes().first().id();
if (selectionState.singleNodeIsSelected())
modelNode = selectionState.selectedModelNodes().first();
bool isModelNodeRoot = true;
......@@ -670,6 +667,8 @@ void gotoImplementation(const SelectionContext &selectionState)
QString itemId =;
const QString fileName = QmlDesignerPlugin::instance()->documentManager().currentDesignDocument()->fileName().toString();
const QString typeName = QmlDesignerPlugin::instance()->documentManager().currentDesignDocument()->fileName().toFileInfo().baseName();
Markdown is supported
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