diff --git a/src/plugins/qmldesigner/designercore/filemanager/moveobjectbeforeobjectvisitor.cpp b/src/plugins/qmldesigner/designercore/filemanager/moveobjectbeforeobjectvisitor.cpp index f21e000880211f4b94e0ef8d0427b29cb1503848..cfbe5f88e0b4744a9e31c04810be524fa633a9de 100644 --- a/src/plugins/qmldesigner/designercore/filemanager/moveobjectbeforeobjectvisitor.cpp +++ b/src/plugins/qmldesigner/designercore/filemanager/moveobjectbeforeobjectvisitor.cpp @@ -41,18 +41,22 @@ using namespace QmlDesigner::Internal; using namespace QmlDesigner; MoveObjectBeforeObjectVisitor::MoveObjectBeforeObjectVisitor(TextModifier &modifier, - quint32 movingObjectLocation): + quint32 movingObjectLocation, + bool inDefaultProperty): QMLRewriter(modifier), movingObjectLocation(movingObjectLocation), + inDefaultProperty(inDefaultProperty), toEnd(true), beforeObjectLocation(0) {} MoveObjectBeforeObjectVisitor::MoveObjectBeforeObjectVisitor(TextModifier &modifier, quint32 movingObjectLocation, - quint32 beforeObjectLocation): + quint32 beforeObjectLocation, + bool inDefaultProperty): QMLRewriter(modifier), movingObjectLocation(movingObjectLocation), + inDefaultProperty(inDefaultProperty), toEnd(false), beforeObjectLocation(beforeObjectLocation) {} @@ -108,12 +112,41 @@ void MoveObjectBeforeObjectVisitor::doMove() Q_ASSERT(!movingObjectParents.isEmpty()); TextModifier::MoveInfo moveInfo; + Node *parent = movingObjectParent(); + UiArrayMemberList *arrayMember = 0, *otherArrayMember; + QString separator; + + if (!inDefaultProperty) { + UiArrayBinding *initializer = cast<UiArrayBinding*>(parent); + Q_ASSERT(initializer); + + otherArrayMember = 0; + for (UiArrayMemberList *cur = initializer->members; cur; cur = cur->next) { + if (cur->member == movingObject) { + arrayMember = cur; + if (cur->next) + otherArrayMember = cur->next; + break; + } + otherArrayMember = cur; + } + Q_ASSERT(arrayMember && otherArrayMember); + separator = QLatin1String(","); + } - int start = movingObject->firstSourceLocation().offset; - int end = movingObject->lastSourceLocation().end(); - - moveInfo.objectStart = start; - moveInfo.objectEnd = end; + moveInfo.objectStart = movingObject->firstSourceLocation().offset; + moveInfo.objectEnd = movingObject->lastSourceLocation().end(); + + int start = moveInfo.objectStart; + int end = moveInfo.objectEnd; + if (!inDefaultProperty) { + if (arrayMember->commaToken.isValid()) { + start = arrayMember->commaToken.begin(); + } + else { + end = otherArrayMember->commaToken.end(); + } + } includeSurroundingWhitespace(start, end); moveInfo.leadingCharsToRemove = moveInfo.objectStart - start; @@ -125,7 +158,7 @@ void MoveObjectBeforeObjectVisitor::doMove() includeSurroundingWhitespace(moveInfo.destination, dummy); moveInfo.prefixToInsert = QString(moveInfo.leadingCharsToRemove, QLatin1Char(' ')); - moveInfo.suffixToInsert = QLatin1String("\n\n"); + moveInfo.suffixToInsert = separator + QLatin1String("\n\n"); } else { const SourceLocation insertionPoint = lastParentLocation(); Q_ASSERT(insertionPoint.isValid()); @@ -133,7 +166,7 @@ void MoveObjectBeforeObjectVisitor::doMove() int dummy = -1; includeSurroundingWhitespace(moveInfo.destination, dummy); - moveInfo.prefixToInsert = QString(moveInfo.leadingCharsToRemove, QLatin1Char(' ')); + moveInfo.prefixToInsert = separator + QString(moveInfo.leadingCharsToRemove, QLatin1Char(' ')); moveInfo.suffixToInsert = QLatin1String("\n"); } @@ -141,18 +174,23 @@ void MoveObjectBeforeObjectVisitor::doMove() setDidRewriting(true); } -SourceLocation MoveObjectBeforeObjectVisitor::lastParentLocation() const +Node *MoveObjectBeforeObjectVisitor::movingObjectParent() const { - dump(movingObjectParents); - - Node *parent; if (movingObjectParents.size() > 1) - parent = movingObjectParents.at(movingObjectParents.size() - 2); + return movingObjectParents.at(movingObjectParents.size() - 2); else - parent = 0; + return 0; +} + +SourceLocation MoveObjectBeforeObjectVisitor::lastParentLocation() const +{ + dump(movingObjectParents); + Node *parent = movingObjectParent(); if (UiObjectInitializer *initializer = cast<UiObjectInitializer*>(parent)) return initializer->rbraceToken; + else if (UiArrayBinding *initializer = cast<UiArrayBinding*>(parent)) + return initializer->rbracketToken; else return SourceLocation(); } diff --git a/src/plugins/qmldesigner/designercore/filemanager/moveobjectbeforeobjectvisitor.h b/src/plugins/qmldesigner/designercore/filemanager/moveobjectbeforeobjectvisitor.h index 87b4373c962b790e382ddb0bf635fad65449f2d3..5a8f9e386a5f0a8d033682d16828d01dabe278de 100644 --- a/src/plugins/qmldesigner/designercore/filemanager/moveobjectbeforeobjectvisitor.h +++ b/src/plugins/qmldesigner/designercore/filemanager/moveobjectbeforeobjectvisitor.h @@ -41,10 +41,12 @@ class MoveObjectBeforeObjectVisitor: public QMLRewriter { public: MoveObjectBeforeObjectVisitor(QmlDesigner::TextModifier &modifier, - quint32 movingObjectLocation); + quint32 movingObjectLocation, + bool inDefaultProperty); MoveObjectBeforeObjectVisitor(QmlDesigner::TextModifier &modifier, quint32 movingObjectLocation, - quint32 beforeObjectLocation); + quint32 beforeObjectLocation, + bool inDefaultProperty); bool operator ()(QmlJS::AST::UiProgram *ast); @@ -60,11 +62,13 @@ private: void doMove(); + QmlJS::AST::Node *movingObjectParent() const; QmlJS::AST::SourceLocation lastParentLocation() const; private: QStack<QmlJS::AST::Node *> parents; quint32 movingObjectLocation; + bool inDefaultProperty; bool toEnd; quint32 beforeObjectLocation; diff --git a/src/plugins/qmldesigner/designercore/filemanager/moveobjectvisitor.cpp b/src/plugins/qmldesigner/designercore/filemanager/moveobjectvisitor.cpp index ca7b9b36658bb55e92209e6b16e77b2988dd375d..e7558a4ee68565c8d4e8fb8910ab1aa88a24637d 100644 --- a/src/plugins/qmldesigner/designercore/filemanager/moveobjectvisitor.cpp +++ b/src/plugins/qmldesigner/designercore/filemanager/moveobjectvisitor.cpp @@ -128,6 +128,8 @@ private: moveInfo.destination = ast->lbraceToken.end(); } + move(moveInfo); + setDidRewriting(true); } } @@ -145,7 +147,8 @@ private: Q_ASSERT(!"Invalid QML: empty array found."); moveInfo.destination = lastMember->lastSourceLocation().end(); - moveInfo.suffixToInsert = QLatin1String(",\n"); + moveInfo.prefixToInsert = QLatin1String(",\n"); + moveInfo.suffixToInsert = QLatin1String("\n"); move(moveInfo); } @@ -195,6 +198,7 @@ bool MoveObjectVisitor::visit(UiArrayBinding *ast) if (currentMember) { TextModifier::MoveInfo moveInfo; + moveInfo.objectStart = currentMember->member->firstSourceLocation().begin(); moveInfo.objectEnd = currentMember->member->lastSourceLocation().end(); if (currentMember == ast->members && !currentMember->next) { @@ -237,6 +241,7 @@ bool MoveObjectVisitor::visit(UiObjectBinding *ast) if (ast->qualifiedTypeNameId->identifierToken.offset == objectLocation) { TextModifier::MoveInfo moveInfo; + moveInfo.objectStart = objectLocation; moveInfo.objectEnd = ast->lastSourceLocation().end(); // remove leading indentation and property name: diff --git a/src/plugins/qmldesigner/designercore/filemanager/qmlrefactoring.cpp b/src/plugins/qmldesigner/designercore/filemanager/qmlrefactoring.cpp index dc94581f0f01e5b17253db11c72845d533a8a9fc..5b388008dc42863e67ba2acf316d459e3be545c6 100644 --- a/src/plugins/qmldesigner/designercore/filemanager/qmlrefactoring.cpp +++ b/src/plugins/qmldesigner/designercore/filemanager/qmlrefactoring.cpp @@ -138,16 +138,16 @@ bool QmlRefactoring::moveObject(int objectLocation, const QString &targetPropert return visit(qmlDocument->qmlProgram()); } -bool QmlRefactoring::moveObjectBeforeObject(int movingObjectLocation, int beforeObjectLocation) +bool QmlRefactoring::moveObjectBeforeObject(int movingObjectLocation, int beforeObjectLocation, bool inDefaultProperty) { if (movingObjectLocation < 0 || beforeObjectLocation < -1) return false; if (beforeObjectLocation == -1) { - MoveObjectBeforeObjectVisitor visit(*textModifier, movingObjectLocation); + MoveObjectBeforeObjectVisitor visit(*textModifier, movingObjectLocation, inDefaultProperty); return visit(qmlDocument->qmlProgram()); } else { - MoveObjectBeforeObjectVisitor visit(*textModifier, movingObjectLocation, beforeObjectLocation); + MoveObjectBeforeObjectVisitor visit(*textModifier, movingObjectLocation, beforeObjectLocation, inDefaultProperty); return visit(qmlDocument->qmlProgram()); } return false; diff --git a/src/plugins/qmldesigner/designercore/filemanager/qmlrefactoring.h b/src/plugins/qmldesigner/designercore/filemanager/qmlrefactoring.h index 8f511922c62abc4a09ba74759c06631b6d059057..3811241404d9c66152e6bd22d66732bf1ee04f0a 100644 --- a/src/plugins/qmldesigner/designercore/filemanager/qmlrefactoring.h +++ b/src/plugins/qmldesigner/designercore/filemanager/qmlrefactoring.h @@ -65,7 +65,7 @@ public: bool changeObjectType(int nodeLocation, const QString &newType); bool moveObject(int objectLocation, const QString &targetPropertyName, bool targetIsArray, int targetParentObjectLocation); - bool moveObjectBeforeObject(int movingObjectLocation, int beforeObjectLocation); + bool moveObjectBeforeObject(int movingObjectLocation, int beforeObjectLocation, bool inDefaultProperty); bool removeObject(int nodeLocation); bool removeProperty(int parentLocation, const QString &name); diff --git a/src/plugins/qmldesigner/designercore/include/qmlitemnode.h b/src/plugins/qmldesigner/designercore/include/qmlitemnode.h index 28e927af0892fc63b061a8fab373552757e759bd..7293ed01425d28972e6879fb2deab8b49cd367c1 100644 --- a/src/plugins/qmldesigner/designercore/include/qmlitemnode.h +++ b/src/plugins/qmldesigner/designercore/include/qmlitemnode.h @@ -56,6 +56,8 @@ public: QmlModelStateGroup states() const; QList<QmlItemNode> children() const; QList<QmlObjectNode> resources() const; + QList<QmlObjectNode> defaultPropertyChildren() const; + QList<QmlObjectNode> allDirectSubNodes() const; QmlAnchors anchors() const; bool hasChildren() const; diff --git a/src/plugins/qmldesigner/designercore/include/qmlobjectnode.h b/src/plugins/qmldesigner/designercore/include/qmlobjectnode.h index 63d6517924f189f262640193266bcd2be8c84e43..b8ff11c36320291291a65bc9b3ffbdbf42d76cca 100644 --- a/src/plugins/qmldesigner/designercore/include/qmlobjectnode.h +++ b/src/plugins/qmldesigner/designercore/include/qmlobjectnode.h @@ -89,6 +89,9 @@ public: bool isAncestorOf(const QmlObjectNode &objectNode) const; + bool hasDefaultProperty() const; + QString defaultProperty() const; + static QVariant instanceValue(const ModelNode &modelNode, const QString &name); protected: diff --git a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp index dd46538e8399a411844f890c73a22a86bb42f4e3..0007366c95c06b5bd0f30d5cb6d3718c8f079492 100644 --- a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp +++ b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp @@ -503,7 +503,7 @@ bool NodeMetaInfo::hasDefaultProperty() const return false; } - return m_data->defaultProperty.isNull(); + return !m_data->defaultProperty.isNull(); } QString NodeMetaInfo::defaultProperty() const diff --git a/src/plugins/qmldesigner/designercore/model/modeltotextmerger.cpp b/src/plugins/qmldesigner/designercore/model/modeltotextmerger.cpp index 2afdaec7d19f66defdaf0bcc8a5f27e35f5bb798..002550c04273347cd3cf69e31481b4e56b849ff4 100644 --- a/src/plugins/qmldesigner/designercore/model/modeltotextmerger.cpp +++ b/src/plugins/qmldesigner/designercore/model/modeltotextmerger.cpp @@ -150,7 +150,7 @@ void ModelToTextMerger::nodeReparented(const ModelNode &node, const NodeAbstract { if (isInHierarchy(oldPropertyParent) && isInHierarchy(newPropertyParent)) { // the node is moved schedule(new ReparentNodeRewriteAction(node, - oldPropertyParent.parentModelNode(), + oldPropertyParent, newPropertyParent, propertyType(newPropertyParent))); } else if (isInHierarchy(oldPropertyParent) && !isInHierarchy(newPropertyParent)) { // the node is removed from hierarchy diff --git a/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp b/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp index 2229162c9f513a1384c2455d8383381a3877a5f4..13d6e945336ac287826f0b24d3d9563e3a36191c 100644 --- a/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp +++ b/src/plugins/qmldesigner/designercore/model/qmlitemnode.cpp @@ -32,6 +32,7 @@ #include <QDeclarativeView> #include "qmlchangeset.h" #include "variantproperty.h" +#include "nodeproperty.h" #include "nodelistproperty.h" #include "nodeinstance.h" #include "qmlanchors.h" @@ -123,6 +124,36 @@ QList<QmlObjectNode> QmlItemNode::resources() const modelNodeList.append(modelNode().nodeListProperty("data").toModelNodeList()); } + foreach (const ModelNode &node, modelNodeList) { + if (!QmlObjectNode(node).isValid()) //if ModelNode is no FxItem + returnList.append(node); + } + } + return returnList; +} + +QList<QmlObjectNode> QmlItemNode::defaultPropertyChildren() const +{ + QList<QmlObjectNode> returnList; + if (isValid()) { + QList<ModelNode> modelNodeList; + if (modelNode().property(defaultProperty()).isNodeListProperty()) + modelNodeList.append(modelNode().nodeListProperty(defaultProperty()).toModelNodeList()); + + foreach (const ModelNode &node, modelNodeList) { + if (!QmlObjectNode(node).isValid()) //if ModelNode is no FxItem + returnList.append(node); + } + } + return returnList; +} + +QList<QmlObjectNode> QmlItemNode::allDirectSubNodes() const +{ + QList<QmlObjectNode> returnList; + if (isValid()) { + QList<ModelNode> modelNodeList = modelNode().allDirectSubModelNodes(); + foreach (const ModelNode &node, modelNodeList) { if (!QmlItemNode(node).isValid()) //if ModelNode is no FxItem returnList.append(node); diff --git a/src/plugins/qmldesigner/designercore/model/qmlmodelview.cpp b/src/plugins/qmldesigner/designercore/model/qmlmodelview.cpp index e2b9eb1bd8a64ef422f88bb92440b69a5f86fd43..d0885e77df84ddfd616e286ba132c443ffb3f63c 100644 --- a/src/plugins/qmldesigner/designercore/model/qmlmodelview.cpp +++ b/src/plugins/qmldesigner/designercore/model/qmlmodelview.cpp @@ -196,7 +196,9 @@ QmlItemNode QmlModelView::createQmlItemNode(const ItemLibraryEntry &itemLibraryE propertyPairList.append(qMakePair(property.name(), property.value())); newNode = createQmlItemNode(itemLibraryEntry.typeName(), itemLibraryEntry.majorVersion(), itemLibraryEntry.minorVersion(), propertyPairList); - parentNode.nodeAbstractProperty("data").reparentHere(newNode); + if (parentNode.hasDefaultProperty()) { + parentNode.nodeAbstractProperty(parentNode.defaultProperty()).reparentHere(newNode); + } Q_ASSERT(newNode.isValid()); diff --git a/src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp b/src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp index 69a70cb8d991f852d0821094a03b7696c0de7be2..8fe7a5ac86dbacadbec94eb457b87f4d78598e4b 100644 --- a/src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp +++ b/src/plugins/qmldesigner/designercore/model/qmlobjectnode.cpp @@ -37,6 +37,7 @@ #include "qmlmodelview.h" #include "nodeinstanceview.h" #include "nodeinstance.h" +#include "nodemetainfo.h" namespace QmlDesigner { @@ -432,10 +433,21 @@ QString QmlObjectNode::validId() return modelNode().validId(); } +bool QmlObjectNode::hasDefaultProperty() const +{ + return modelNode().metaInfo().hasDefaultProperty(); +} + +QString QmlObjectNode::defaultProperty() const +{ + return modelNode().metaInfo().defaultProperty(); +} + void QmlObjectNode::setParent(QmlObjectNode newParent) { - newParent.modelNode().nodeListProperty("data").reparentHere(modelNode()); - //TODO use metasystem for default Property + if (newParent.hasDefaultProperty()) { + newParent.modelNode().nodeAbstractProperty(newParent.defaultProperty()).reparentHere(modelNode()); + } } QmlItemNode QmlObjectNode::toQmlItemNode() const diff --git a/src/plugins/qmldesigner/designercore/model/rewriteaction.cpp b/src/plugins/qmldesigner/designercore/model/rewriteaction.cpp index 1d344887ad5ed4b37e81bb38c7baa288db6b9191..7f2d37a5af5dc2c3cdc5ebe648a6105122de1327 100644 --- a/src/plugins/qmldesigner/designercore/model/rewriteaction.cpp +++ b/src/plugins/qmldesigner/designercore/model/rewriteaction.cpp @@ -31,6 +31,8 @@ #include "nodeabstractproperty.h" #include "nodelistproperty.h" +#include "propertymetainfo.h" +#include "nodemetainfo.h" #include "rewriteaction.h" using namespace QmlDesigner; @@ -325,7 +327,9 @@ bool MoveNodeRewriteAction::execute(QmlRefactoring &refactoring, const int newTrailingNodeLocation = m_newTrailingNode.isValid() ? positionStore.nodeOffset(m_newTrailingNode) : -1; bool result = false; - result = refactoring.moveObjectBeforeObject(movingNodeLocation, newTrailingNodeLocation); + bool inDefaultProperty = (m_movingNode.parentProperty().parentModelNode().metaInfo().defaultProperty() == m_movingNode.parentProperty().name()); + + result = refactoring.moveObjectBeforeObject(movingNodeLocation, newTrailingNodeLocation, inDefaultProperty); if (!result) { qDebug() << "*** MoveNodeRewriteAction::execute failed in moveObjectBeforeObject(" << movingNodeLocation << ',' diff --git a/src/plugins/qmldesigner/designercore/model/rewriteaction.h b/src/plugins/qmldesigner/designercore/model/rewriteaction.h index 28fd8af451ee1ab516a9d1228b53c0dcb8aa1400..85bdece1c6b07d643255e6909ad32ce31a656956 100644 --- a/src/plugins/qmldesigner/designercore/model/rewriteaction.h +++ b/src/plugins/qmldesigner/designercore/model/rewriteaction.h @@ -218,8 +218,8 @@ private: class ReparentNodeRewriteAction: public RewriteAction { public: - ReparentNodeRewriteAction(const ModelNode &node, const ModelNode &oldParent, const AbstractProperty &targetProperty, QmlDesigner::QmlRefactoring::PropertyType propertyType): - m_node(node), m_oldParent(oldParent), m_targetProperty(targetProperty), m_propertyType(propertyType) + ReparentNodeRewriteAction(const ModelNode &node, const AbstractProperty &oldParentProperty, const AbstractProperty &targetProperty, QmlDesigner::QmlRefactoring::PropertyType propertyType): + m_node(node), m_oldParentProperty(oldParentProperty), m_targetProperty(targetProperty), m_propertyType(propertyType) {} virtual bool execute(QmlDesigner::QmlRefactoring &refactoring, ModelNodePositionStorage &positionStore); @@ -230,11 +230,11 @@ public: ModelNode reparentedNode() const { return m_node; } - ModelNode oldParent() const - { return m_oldParent; } + void setOldParentProperty(const AbstractProperty &oldParentProperty) + { m_oldParentProperty = oldParentProperty; } - void setOldParent(const ModelNode &oldParent) - { m_oldParent = oldParent; } + AbstractProperty oldParentProperty() const + { return m_oldParentProperty; } AbstractProperty targetProperty() const { return m_targetProperty; } @@ -244,7 +244,7 @@ public: private: ModelNode m_node; - ModelNode m_oldParent; + AbstractProperty m_oldParentProperty; AbstractProperty m_targetProperty; QmlDesigner::QmlRefactoring::PropertyType m_propertyType; }; diff --git a/src/plugins/qmldesigner/designercore/model/rewriteactioncompressor.cpp b/src/plugins/qmldesigner/designercore/model/rewriteactioncompressor.cpp index 9431545a7f79fc41122b5d321454e1fee6ec62b0..e1af56135370ee3b009fba1c2224fa4960a90706 100644 --- a/src/plugins/qmldesigner/designercore/model/rewriteactioncompressor.cpp +++ b/src/plugins/qmldesigner/designercore/model/rewriteactioncompressor.cpp @@ -58,7 +58,7 @@ void RewriteActionCompressor::operator()(QList<RewriteAction *> &actions) const { compressImports(actions); compressRereparentActions(actions); - compressReparentIntoSameParentActions(actions); + compressReparentIntoSamePropertyActions(actions); compressPropertyActions(actions); compressAddEditRemoveNodeActions(actions); compressAddEditActions(actions); @@ -126,7 +126,7 @@ void RewriteActionCompressor::compressRereparentActions(QList<RewriteAction *> & const ModelNode reparentedNode = reparentAction->reparentedNode(); if (ReparentNodeRewriteAction *otherAction = reparentedNodes.value(reparentedNode, 0)) { - otherAction->setOldParent(reparentAction->oldParent()); + otherAction->setOldParentProperty(reparentAction->oldParentProperty()); actionsToRemove.append(action); } else { reparentedNodes.insert(reparentedNode, reparentAction); @@ -140,7 +140,7 @@ void RewriteActionCompressor::compressRereparentActions(QList<RewriteAction *> & } } -void RewriteActionCompressor::compressReparentIntoSameParentActions(QList<RewriteAction *> &actions) const +void RewriteActionCompressor::compressReparentIntoSamePropertyActions(QList<RewriteAction *> &actions) const { QList<RewriteAction *> actionsToRemove; QMutableListIterator<RewriteAction *> iter(actions); @@ -149,9 +149,7 @@ void RewriteActionCompressor::compressReparentIntoSameParentActions(QList<Rewrit RewriteAction *action = iter.previous(); if (ReparentNodeRewriteAction *reparentAction = action->asReparentNodeRewriteAction()) { - const ModelNode targetNode = reparentAction->targetProperty().parentModelNode(); - const ModelNode oldParent = reparentAction->oldParent(); - if (targetNode == oldParent) + if (reparentAction->targetProperty() == reparentAction->oldParentProperty()) actionsToRemove.append(action); } } diff --git a/src/plugins/qmldesigner/designercore/model/rewriteactioncompressor.h b/src/plugins/qmldesigner/designercore/model/rewriteactioncompressor.h index ce0e9eeef072ab9a35d0976fec16fc3acc79332a..3332245258aba2125160c57ee2c8827624e90d10 100644 --- a/src/plugins/qmldesigner/designercore/model/rewriteactioncompressor.h +++ b/src/plugins/qmldesigner/designercore/model/rewriteactioncompressor.h @@ -48,7 +48,7 @@ private: void compressImports(QList<RewriteAction *> &actions) const; void compressRereparentActions(QList<RewriteAction *> &actions) const; - void compressReparentIntoSameParentActions(QList<RewriteAction *> &actions) const; + void compressReparentIntoSamePropertyActions(QList<RewriteAction *> &actions) const; void compressAddEditRemoveNodeActions(QList<RewriteAction *> &actions) const; void compressPropertyActions(QList<RewriteAction *> &actions) const; void compressAddEditActions(QList<RewriteAction *> &actions) const;