Commit 820223a8 authored by Marco Bubke's avatar Marco Bubke

QmlDesigner: Re factor inline methods in NodeInstanceMetaObject

Change-Id: I9130b166a077fd0add21b65cab8fa7eee829386d
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent eecc27e7
......@@ -228,6 +228,27 @@ QVariant NodeInstanceMetaObject::propertyWriteValue(int, const QVariant &value)
return value;
}
const QAbstractDynamicMetaObject *NodeInstanceMetaObject::dynamicMetaObjectParent() const
{
if (QQmlVMEMetaObject::parent.isT1())
return QQmlVMEMetaObject::parent.asT1()->toDynamicMetaObject(QQmlVMEMetaObject::object);
else
return 0;
}
const QMetaObject *NodeInstanceMetaObject::metaObjectParent() const
{
if (QQmlVMEMetaObject::parent.isT1())
return QQmlVMEMetaObject::parent.asT1()->toDynamicMetaObject(QQmlVMEMetaObject::object);
return QQmlVMEMetaObject::parent.asT2();
}
int NodeInstanceMetaObject::propertyOffset() const
{
return cache->propertyOffset();
}
int NodeInstanceMetaObject::openMetaCall(QMetaObject::Call call, int id, void **a)
{
if ((call == QMetaObject::ReadProperty || call == QMetaObject::WriteProperty)
......
......@@ -68,23 +68,11 @@ protected:
QObject *myObject() const { return QQmlVMEMetaObject::object; }
QAbstractDynamicMetaObject *parent() const { return const_cast<QAbstractDynamicMetaObject *>(dynamicMetaObjectParent()); }
const QAbstractDynamicMetaObject *dynamicMetaObjectParent() const
{
if (QQmlVMEMetaObject::parent.isT1())
return QQmlVMEMetaObject::parent.asT1()->toDynamicMetaObject(QQmlVMEMetaObject::object);
else
return 0;
}
const QMetaObject *metaObjectParent() const
{
if (QQmlVMEMetaObject::parent.isT1())
return QQmlVMEMetaObject::parent.asT1()->toDynamicMetaObject(QQmlVMEMetaObject::object);
return QQmlVMEMetaObject::parent.asT2();
}
int propertyOffset() const { return cache->propertyOffset(); }
const QAbstractDynamicMetaObject *dynamicMetaObjectParent() const;
const QMetaObject *metaObjectParent() const;
int propertyOffset() const;
int count() const;
QByteArray name(int) const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment