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

QmlDesigner.QmlModelView: relaxing versioning in createQmlItemNode()

This allows the item library to ignore minor versions.
Otherwise all the meta data for Qt Quick 1 and Qt Quick 1.1
has to be duplicated.

Change-Id: Ie7b96ade0991a84df83f72d9e8f25ef50a520972
Reviewed-by: default avatarMarco Bubke <>
parent 60f29122
......@@ -180,6 +180,12 @@ QmlItemNode QmlModelView::createQmlItemNode(const ItemLibraryEntry &itemLibraryE
try {
RewriterTransaction transaction = beginRewriterTransaction();
NodeMetaInfo metaInfo = model()->metaInfo(itemLibraryEntry.typeName());
int minorVersion = metaInfo.minorVersion();
int majorVersion = metaInfo.majorVersion();
if (itemLibraryEntry.typeName().contains('.')) {
const QString newImportUrl = itemLibraryEntry.requiredImport();
......@@ -212,7 +218,7 @@ QmlItemNode QmlModelView::createQmlItemNode(const ItemLibraryEntry &itemLibraryE
foreach (const PropertyContainer &property,
propertyPairList.append(qMakePair(, property.value()));
newNode = createQmlItemNode(itemLibraryEntry.typeName(), itemLibraryEntry.majorVersion(), itemLibraryEntry.minorVersion(), propertyPairList);
newNode = createQmlItemNode(itemLibraryEntry.typeName(), majorVersion, minorVersion, propertyPairList);
} else {
QScopedPointer<Model> inputModel(Model::create("QtQuick.Rectangle", 1, 0, model()));
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