diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2012-05-11 12:01:41 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-24 12:52:43 +0200 |
commit | d2e557c2c2d7fcf3bf7c1676df3902e115986dc2 (patch) | |
tree | 65f47e443efa9635a2634880c01dc439817f9566 /src/qml/qml/qqmlproperty_p.h | |
parent | 0a3ff88f851771e52d119fab90c0254de6950585 (diff) |
Lazily create QMetaObjects
For internal QML built types, creating a metaobject each time is
just wasteful. Additionally, as the property caches were always
created from the intermediate QMetaObject, it was difficult to pass
information directly from the compiler to the property cache.
Change-Id: I769526b0edaaf16a86883f3065b75618b94e4077
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmlproperty_p.h')
-rw-r--r-- | src/qml/qml/qqmlproperty_p.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/qml/qml/qqmlproperty_p.h b/src/qml/qml/qqmlproperty_p.h index cba7849ea0..4f0db342c2 100644 --- a/src/qml/qml/qqmlproperty_p.h +++ b/src/qml/qml/qqmlproperty_p.h @@ -101,7 +101,7 @@ public: QVariant readValueProperty(); bool writeValueProperty(const QVariant &, WriteFlags); - static const QMetaObject *rawMetaObjectForType(QQmlEnginePrivate *, int); + static QQmlMetaObject rawMetaObjectForType(QQmlEnginePrivate *, int); static bool writeEnumProperty(const QMetaProperty &prop, int idx, QObject *object, const QVariant &value, int flags); static bool writeValueProperty(QObject *, QQmlEngine *, @@ -122,15 +122,13 @@ public: static QQmlAbstractBinding *binding(QObject *, int coreIndex, int valueTypeIndex /* -1 */); - static QQmlPropertyData saveValueType(const QMetaObject *, int, - const QMetaObject *, int, - QQmlEngine *); + static QQmlPropertyData saveValueType(const QQmlPropertyData &, + const QMetaObject *, int, + QQmlEngine *); static QQmlProperty restore(QObject *, const QQmlPropertyData &, QQmlContextData *); - static bool equal(const QMetaObject *, const QMetaObject *); - static bool canConvert(const QMetaObject *from, const QMetaObject *to); static inline QQmlPropertyPrivate *get(const QQmlProperty &p) { return p.d; } @@ -158,7 +156,6 @@ public: static bool connect(const QObject *sender, int signal_index, const QObject *receiver, int method_index, int type = 0, int *types = 0); - static const QMetaObject *metaObjectForProperty(const QMetaObject *, int); static void flushSignal(const QObject *sender, int signal_index); }; |