diff options
Diffstat (limited to 'src/qml/qml/qqmlcompiler.cpp')
-rw-r--r-- | src/qml/qml/qqmlcompiler.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlcompiler.cpp b/src/qml/qml/qqmlcompiler.cpp index 7b33849e67..93ec2516c8 100644 --- a/src/qml/qml/qqmlcompiler.cpp +++ b/src/qml/qml/qqmlcompiler.cpp @@ -3630,8 +3630,6 @@ bool QQmlCompiler::completeComponentBuild() QQmlJS::Engine *jsEngine = parser.jsEngine(); QQmlJS::MemoryPool *pool = jsEngine->pool(); - QHash<int, QString> expressionNames; - for (JSBindingReference *b = compileState->bindings.first(); b; b = b->nextReference) { JSBindingReference &binding = *b; @@ -3648,7 +3646,7 @@ bool QQmlCompiler::completeComponentBuild() ComponentCompileState::PerObjectCompileData *cd = &compileState->jsCompileData[b->bindingContext.object]; cd->functionsToCompile.append(node); binding.compiledIndex = cd->functionsToCompile.count() - 1; - expressionNames.insert(binding.compiledIndex, binding.property->name().toString().prepend(QStringLiteral("expression for "))); + cd->expressionNames.insert(binding.compiledIndex, binding.property->name().toString().prepend(QStringLiteral("expression for "))); if (componentStats) componentStats->componentStat.scriptBindings.append(b->value->location); @@ -3681,7 +3679,7 @@ bool QQmlCompiler::completeComponentBuild() jsCodeGen.beginObjectScope(scopeObject->metatype); - cd->runtimeFunctionIndices = jsCodeGen.generateJSCodeForFunctionsAndBindings(cd->functionsToCompile, expressionNames); + cd->runtimeFunctionIndices = jsCodeGen.generateJSCodeForFunctionsAndBindings(cd->functionsToCompile, cd->expressionNames); QList<QQmlError> errors = jsCodeGen.errors(); if (!errors.isEmpty()) { exceptions << errors; |