summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativecustomparser.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-12-15 02:08:13 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-12-17 06:35:17 (GMT)
commit488e616b50707e5b37162e6d0cfc71a1ffdf9bef (patch)
tree86b02b1665e7dcc29aed479c9ed2ce7d6f5ba214 /src/declarative/qml/qdeclarativecustomparser.cpp
parent139ecc0e74af2795faa55cfd532aeb10c631049e (diff)
downloadQt-488e616b50707e5b37162e6d0cfc71a1ffdf9bef.zip
Qt-488e616b50707e5b37162e6d0cfc71a1ffdf9bef.tar.gz
Qt-488e616b50707e5b37162e6d0cfc71a1ffdf9bef.tar.bz2
Rewrite/cache bindings created by PropertyChanges.
This provides a significant optimization for initial evaluation of bindings specified in a PropertyChanges. Reviewed-by: Aaron Kennedy
Diffstat (limited to 'src/declarative/qml/qdeclarativecustomparser.cpp')
-rw-r--r--src/declarative/qml/qdeclarativecustomparser.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativecustomparser.cpp b/src/declarative/qml/qdeclarativecustomparser.cpp
index 97a6a00..58ffc56 100644
--- a/src/declarative/qml/qdeclarativecustomparser.cpp
+++ b/src/declarative/qml/qdeclarativecustomparser.cpp
@@ -304,5 +304,14 @@ const QMetaObject *QDeclarativeCustomParser::resolveType(const QByteArray& name)
return compiler->resolveType(name);
}
+/*!
+ Rewrites \a expression and returns an identifier that can be
+ used to construct the binding later. \a name
+ is used as the name of the rewritten function.
+*/
+QDeclarativeBinding::Identifier QDeclarativeCustomParser::rewriteBinding(const QString& expression, const QByteArray& name)
+{
+ return compiler->rewriteBinding(expression, name);
+}
QT_END_NAMESPACE