diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-09-28 11:21:25 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-10-05 02:39:01 (GMT) |
commit | 061c85a17ecb303676b548e6daef6e64967ca1e7 (patch) | |
tree | 76cc1c8b2d33c0040794f1c161e95b4694e1bbad /src/declarative/qml/qmlcompiler.cpp | |
parent | f9f878ca1fff08b6ea24507a84adfeb16d8938b6 (diff) | |
download | Qt-061c85a17ecb303676b548e6daef6e64967ca1e7.zip Qt-061c85a17ecb303676b548e6daef6e64967ca1e7.tar.gz Qt-061c85a17ecb303676b548e6daef6e64967ca1e7.tar.bz2 |
Use QScriptProgram to speed up binding creation
Diffstat (limited to 'src/declarative/qml/qmlcompiler.cpp')
-rw-r--r-- | src/declarative/qml/qmlcompiler.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp index 02cd813..e67f79a 100644 --- a/src/declarative/qml/qmlcompiler.cpp +++ b/src/declarative/qml/qmlcompiler.cpp @@ -2296,7 +2296,10 @@ bool QmlCompiler::completeComponentBuild() expression = rewriteBinding(expression); quint32 length = expression.length(); + quint32 pc = output->programs.length(); + output->programs.append(0); binding.compiledData = + QByteArray((const char *)&pc, sizeof(quint32)) + QByteArray((const char *)&length, sizeof(quint32)) + QByteArray((const char *)expression.constData(), expression.length() * sizeof(QChar)); |