summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml
diff options
context:
space:
mode:
authorJędrzej Nowacki <jedrzej.nowacki@nokia.com>2012-03-07 16:55:36 +0100
committerQt by Nokia <qt-info@nokia.com>2012-04-18 11:47:25 +0200
commit1a70e10a386df2b4f27b8cd6057e79348573a46b (patch)
treebd5fe9831acc31bb6c93e55809f4f8462dba2c74 /src/declarative/qml
parent6d3676e877da86d9ec8d4c5094ec19c38a6649e7 (diff)
Small optimization in declarative property cache.
We do not need to do a name lookup, with new api we can get a type id directly from QMetaMethod. Change-Id: I180a0e409c3d4a8c49f228db5417d4f1d9f0cf00 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Diffstat (limited to 'src/declarative/qml')
-rw-r--r--src/declarative/qml/qdeclarativepropertycache.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/declarative/qml/qdeclarativepropertycache.cpp
index 2ffa1ef7..34ab63a8 100644
--- a/src/declarative/qml/qdeclarativepropertycache.cpp
+++ b/src/declarative/qml/qdeclarativepropertycache.cpp
@@ -96,11 +96,7 @@ void QDeclarativePropertyCache::Data::load(const QMetaMethod &m)
flags |= Data::IsFunction;
if (m.methodType() == QMetaMethod::Signal)
flags |= Data::IsSignal;
- propType = QVariant::Invalid;
-
- const char *returnType = m.typeName();
- if (returnType)
- propType = QMetaType::type(returnType);
+ propType = m.returnType();
QList<QByteArray> params = m.parameterTypes();
if (!params.isEmpty())