diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2011-11-17 12:53:26 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-20 23:23:38 +0100 |
commit | 7e8e6b2d5be6419374cefdd2acf5c328890f2ec3 (patch) | |
tree | de535f788492a36f1d439f06e5bc65bf787f5446 /src/declarative/qml/qdeclarativecompiler.cpp | |
parent | 62a31676830aca745df23a5dc18b59c4211eea56 (diff) |
Rewrite signal handlers at compile time.
Task-number: QTBUG-22726
Change-Id: If2c3c00c646b2ed6b6899573a0b487c8deeaad3f
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Diffstat (limited to 'src/declarative/qml/qdeclarativecompiler.cpp')
-rw-r--r-- | src/declarative/qml/qdeclarativecompiler.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index d3069ecf81..e7d9b80c35 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -1227,10 +1227,11 @@ void QDeclarativeCompiler::genObjectBody(QDeclarativeScript::Object *obj) Instruction::StoreSignal store; store.signalIndex = prop->index; - store.value = - output->indexForString(v->value.asScript().trimmed()); + QDeclarativeRewrite::RewriteSignalHandler rewriteSignalHandler; + const QString &rewrite = + rewriteSignalHandler(v->value.asScript().trimmed(), prop->name().toString()); + store.value = output->indexForString(rewrite); store.context = v->signalExpressionContextStack; - store.name = output->indexForByteArray(prop->name().toUtf8()); store.line = v->location.start.line; output->addInstruction(store); |