diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-01-15 04:26:53 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-01-15 04:26:53 (GMT) |
commit | 4a665ff5da05860f5eb46e3982ef3d8163a6cf59 (patch) | |
tree | 7fb5275153bf7c639cce6f468e28d5f8c96fa679 /src/declarative/qml/qmlpropertycache.cpp | |
parent | c5be2898cac41cf18ab14c3ee42d4d8c879c3e55 (diff) | |
download | Qt-4a665ff5da05860f5eb46e3982ef3d8163a6cf59.zip Qt-4a665ff5da05860f5eb46e3982ef3d8163a6cf59.tar.gz Qt-4a665ff5da05860f5eb46e3982ef3d8163a6cf59.tar.bz2 |
Implement custom QML slot invokation logic
Previously QML was inefficiently forwarding the task of invoking
Qt slots to QScript. QML does not implement the more advanced
argument coercian of QScript and does not support method overloading.
These two features are only needed to support legacy C++ classes
(of which QML has none), and are not worth the perf cost to support.
Diffstat (limited to 'src/declarative/qml/qmlpropertycache.cpp')
-rw-r--r-- | src/declarative/qml/qmlpropertycache.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/declarative/qml/qmlpropertycache.cpp b/src/declarative/qml/qmlpropertycache.cpp index 3bbf1fe..77a3a47 100644 --- a/src/declarative/qml/qmlpropertycache.cpp +++ b/src/declarative/qml/qmlpropertycache.cpp @@ -84,6 +84,15 @@ void QmlPropertyCache::Data::load(const QMetaMethod &m) { coreIndex = m.methodIndex(); flags |= Data::IsFunction; + propType = QVariant::Invalid; + + const char *returnType = m.typeName(); + if (returnType) + propType = QMetaType::type(returnType); + + QList<QByteArray> params = m.parameterTypes(); + if (!params.isEmpty()) + flags |= Data::HasArguments; } |