Commit 0eec9518 authored by Thomas Hartmann's avatar Thomas Hartmann

QmlDesigner.QmlModelView: fixing createQmlItemNode() and imports

If the version is -1 -1 then we have a file/directory import.

Change-Id: If739f3eeddd649ae4efa5e8490f176f8542595e0
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 02f41a97
......@@ -191,7 +191,12 @@ QmlItemNode QmlModelView::createQmlItemNode(const ItemLibraryEntry &itemLibraryE
if (!itemLibraryEntry.requiredImport().isEmpty()) {
const QString newImportVersion = QString("%1.%2").arg(QString::number(itemLibraryEntry.majorVersion()), QString::number(itemLibraryEntry.minorVersion()));
Import newImport = Import::createLibraryImport(newImportUrl, newImportVersion);
if (itemLibraryEntry.majorVersion() == -1 && itemLibraryEntry.minorVersion() == -1)
newImport = Import::createFileImport(newImportUrl, QString());
else
newImport = Import::createLibraryImport(newImportUrl, newImportVersion);
foreach (const Import &import, model()->imports()) {
if (import.isLibraryImport()
......
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