aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativepropertycache.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2011-07-15 17:46:43 +1000
committerQt by Nokia <qt-info@nokia.com>2011-08-30 13:18:28 +0200
commitc742d2d12122e752a74da3e3f26dff28ff967b9d (patch)
tree0ba053e34da0681a5a61fa6d36602ffdabef6e0e /src/declarative/qml/qdeclarativepropertycache.cpp
parent3f7ea11f9f9a0ecb2bc571237f8f3523447883f7 (diff)
Improve performance of the QML front-end
Introduced a new lexer and a more efficient representation of the AST. Instead of creating unique name ids, we simply use QStringRef(s). Change-Id: I403472fa2bb74d2c87dd6314065306499677a3bf Authored-by: Roberto Raggi Reviewed-on: http://codereview.qt.nokia.com/3750 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'src/declarative/qml/qdeclarativepropertycache.cpp')
-rw-r--r--src/declarative/qml/qdeclarativepropertycache.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/declarative/qml/qdeclarativepropertycache.cpp
index 0d44b58297..09c441d068 100644
--- a/src/declarative/qml/qdeclarativepropertycache.cpp
+++ b/src/declarative/qml/qdeclarativepropertycache.cpp
@@ -475,6 +475,14 @@ QDeclarativePropertyCache::method(int index) const
}
QDeclarativePropertyCache::Data *
+QDeclarativePropertyCache::property(const QHashedStringRef &str) const
+{
+ QDeclarativePropertyCache::Data **rv = stringCache.value(str);
+ if (rv && (*rv)->notFullyResolved()) resolve(*rv);
+ return rv?*rv:0;
+}
+
+QDeclarativePropertyCache::Data *
QDeclarativePropertyCache::property(const QString &str) const
{
QDeclarativePropertyCache::Data **rv = stringCache.value(str);