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

QmlDesigner.ModelMerger: make model merger version agnostic

This allows copy n paste between different Qt Quick versions.
(If the code is compatibel)

This also allows defining code snippes for the
item library in one Qt Quick version and reusing it for
different versions.

Change-Id: I3ef10a3a26de9a4c7af98b14d16c476e08bc47ba
Reviewed-by: default avatarMarco Bubke <>
parent 278c0fef
......@@ -33,6 +33,7 @@
#include "modelnode.h"
#include "abstractview.h"
#include "model.h"
#include "nodemetainfo.h"
#include "nodeproperty.h"
#include "nodelistproperty.h"
#include "bindingproperty.h"
......@@ -145,7 +146,8 @@ static ModelNode createNodeFromNode(const ModelNode &modelNode,const QHash<QStri
foreach (const VariantProperty &variantProperty, modelNode.variantProperties()) {
propertyList.append(QPair<QString, QVariant>(, variantProperty.value()));
ModelNode newNode(view->createModelNode(modelNode.type(),modelNode.majorVersion(),modelNode.minorVersion(),
NodeMetaInfo nodeMetaInfo = view->model()->metaInfo(modelNode.type());
ModelNode newNode(view->createModelNode(modelNode.type(), nodeMetaInfo.majorVersion(), nodeMetaInfo.minorVersion(),
propertyList, variantPropertyList, modelNode.nodeSource(), modelNode.nodeSourceType()));
syncBindingProperties(newNode, modelNode, idRenamingHash);
syncId(newNode, modelNode, idRenamingHash);
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