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

QmlDesigner: fixes autotest: testCopyModelRewriter1()

See: BAUHAUS-393
parent 4ecdc78c
......@@ -108,7 +108,7 @@ static void setupIdRenamingHash(const ModelNode &modelNode, QHash<QString, QStri
int number = 1;
splitIdInBaseNameAndNumber(newId, &baseId, &number);
while (view->hasId(newId) || idRenamingHash.contains(newId)) {
while (view->hasId(newId) || idRenamingHash.values().contains(newId)) {
newId = baseId + QString::number(number);
number++;
}
......@@ -160,6 +160,7 @@ ModelNode ModelMerger::insertModel(const ModelNode &modelNode)
QHash<QString, QString> idRenamingHash;
setupIdRenamingHash(modelNode, idRenamingHash, view());
qDebug() << idRenamingHash;
ModelNode newNode(createNodeFromNode(modelNode, idRenamingHash, view()));
return newNode;
......
......@@ -2751,8 +2751,6 @@ void TestCore::testRewriterFirstDefinitionInside()
void TestCore::testCopyModelRewriter1()
{
QSKIP("Fix me!!! Task BaAUHAUS-393", SkipAll);
const QLatin1String qmlString("\n"
"import Qt 4.6\n"
"\n"
......@@ -2865,20 +2863,20 @@ void TestCore::testCopyModelRewriter1()
" x: 10\n"
" y: 10\n"
" Rectangle {\n"
" id: rectangle11\n"
" id: rectangle4\n"
" x: 10\n"
" y: 10\n"
" }\n"
"\n"
" Rectangle {\n"
" id: rectangle21\n"
" id: rectangle5\n"
" x: 100\n"
" y: 100\n"
" anchors.fill: root1\n"
" }\n"
"\n"
" Rectangle {\n"
" id: rectangle31\n"
" id: rectangle6\n"
" x: 140\n"
" y: 180\n"
" gradient: Gradient {\n"
......
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