context->enterScope(astNode);
QSet<QString> modelPropertyNames = QSet<QString>::fromList(modelNode.propertyNames());
+ if (!modelNode.id().isEmpty())
+ modelPropertyNames.insert(QLatin1String("id"));
QList<UiObjectMember *> defaultPropertyItems;
for (UiObjectMemberList *iter = astInitializer->members; iter; iter = iter->next) {
AbstractProperty modelProperty = modelNode.property(modelPropertyName);
// property deleted.
- differenceHandler.propertyAbsentFromQml(modelProperty);
+ if (modelPropertyName == QLatin1String("id"))
+ differenceHandler.idsDiffer(modelNode, QString());
+ else
+ differenceHandler.propertyAbsentFromQml(modelProperty);
}
context->leaveScope();
QVERIFY(view.data());
model->attachView(view.data());
- QScopedPointer<TestRewriterView> testRewriterView(new TestRewriterView());
+ QScopedPointer<TestRewriterView> testRewriterView(new TestRewriterView(0, TestRewriterView::Amend));
testRewriterView->setTextModifier(&textModifier);
model->attachView(testRewriterView.data());
QVERIFY(rootModelNode.isValid());
QCOMPARE(rootModelNode.id(), QString("rect"));
- QSKIP("Fix me!!!! Task BAUHAUS-780", SkipAll);
//
// remove id in text
//
return VariantProperty();
}
-TestRewriterView::TestRewriterView(QObject *parent) : RewriterView(RewriterView::Validate, parent)
+TestRewriterView::TestRewriterView(QObject *parent,
+ DifferenceHandling differenceHandling)
+ : RewriterView(differenceHandling, parent)
{
}
Q_OBJECT
public:
- TestRewriterView(QObject *parent = 0);
+ TestRewriterView(QObject *parent = 0,
+ DifferenceHandling differenceHandling = RewriterView::Validate);
Internal::TestModelToTextMerger *modelToTextMerger() const;
Internal::TextToModelMerger *textToModelMerger() const;