Commit cc161fbf authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.subComponentManager: crash fix

Avoid adding an item a second time to the item library.
parent b53f01a0
......@@ -351,7 +351,9 @@ void SubComponentManagerPrivate::registerQmlFile(const QFileInfo &fileInfo, cons
itemLibraryEntry.setType(componentName, -1, -1);
itemLibraryEntry.setName(componentName);
itemLibraryEntry.setCategory("QML Components");
m_metaInfo.itemLibraryInfo()->addEntry(itemLibraryEntry);
if (m_metaInfo.itemLibraryInfo()->entry(componentName).name() != componentName)
m_metaInfo.itemLibraryInfo()->addEntry(itemLibraryEntry);
}
}
......
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