summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorMarco Bubke <marco.bubke@nokia.com>2010-02-04 15:24:48 (GMT)
committerKai Koehne <kai.koehne@nokia.com>2010-02-08 13:29:49 (GMT)
commit43b61d3a9fd8eaf5cbca046d376ea82b2311c967 (patch)
tree50f8d93a1b65dd21c752f785d21baa7dae30affd /src/declarative
parent08c74ed63f509a10f15c660c7506596501b81592 (diff)
downloadQt-43b61d3a9fd8eaf5cbca046d376ea82b2311c967.zip
Qt-43b61d3a9fd8eaf5cbca046d376ea82b2311c967.tar.gz
Qt-43b61d3a9fd8eaf5cbca046d376ea82b2311c967.tar.bz2
Add getter functions to QAbstractDynamicMetaObject and QmlOpenMetaObjectType
We need some internal stuff in the derived class. Reviewed-By: Kai Koehne
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/util/qmlopenmetaobject.cpp17
-rw-r--r--src/declarative/util/qmlopenmetaobject_p.h7
2 files changed, 23 insertions, 1 deletions
diff --git a/src/declarative/util/qmlopenmetaobject.cpp b/src/declarative/util/qmlopenmetaobject.cpp
index 373be2d..1be81de 100644
--- a/src/declarative/util/qmlopenmetaobject.cpp
+++ b/src/declarative/util/qmlopenmetaobject.cpp
@@ -81,6 +81,17 @@ QmlOpenMetaObjectType::~QmlOpenMetaObjectType()
delete d;
}
+
+int QmlOpenMetaObjectType::propertyOffset() const
+{
+ return d->propertyOffset;
+}
+
+int QmlOpenMetaObjectType::signalOffset() const
+{
+ return d->signalOffset;
+}
+
int QmlOpenMetaObjectType::createProperty(const QByteArray &name)
{
int id = d->mob.propertyCount();
@@ -226,6 +237,11 @@ int QmlOpenMetaObject::metaCall(QMetaObject::Call c, int id, void **a)
}
}
+QAbstractDynamicMetaObject *QmlOpenMetaObject::parent() const
+{
+ return d->parent;
+}
+
QVariant QmlOpenMetaObject::value(int id) const
{
return d->getData(id);
@@ -293,6 +309,7 @@ void QmlOpenMetaObject::setCached(bool c)
}
}
+
int QmlOpenMetaObject::createProperty(const char *name, const char *)
{
if (d->autoCreate)
diff --git a/src/declarative/util/qmlopenmetaobject_p.h b/src/declarative/util/qmlopenmetaobject_p.h
index 450f258..c6da71a 100644
--- a/src/declarative/util/qmlopenmetaobject_p.h
+++ b/src/declarative/util/qmlopenmetaobject_p.h
@@ -57,7 +57,7 @@ QT_MODULE(Declarative)
class QmlEngine;
class QMetaPropertyBuilder;
class QmlOpenMetaObjectTypePrivate;
-class QmlOpenMetaObjectType : public QmlRefCount
+class Q_DECLARATIVE_EXPORT QmlOpenMetaObjectType : public QmlRefCount
{
public:
QmlOpenMetaObjectType(const QMetaObject *base, QmlEngine *engine);
@@ -65,6 +65,9 @@ public:
int createProperty(const QByteArray &name);
+ int propertyOffset() const;
+ int signalOffset() const;
+
protected:
virtual void propertyCreated(int, QMetaPropertyBuilder &);
@@ -108,6 +111,8 @@ protected:
virtual void propertyWrite(int);
virtual void propertyCreated(int, QMetaPropertyBuilder &);
+ QAbstractDynamicMetaObject *parent() const;
+
private:
QmlOpenMetaObjectPrivate *d;
friend class QmlOpenMetaObjectType;