aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@digia.com>2012-10-19 09:36:04 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-19 10:39:21 +0200
commit8160e03f99301291cf2dfa964811c12ae0aaaed4 (patch)
tree97a92f041cc04b2f772df764f20ca2e9a77048d3 /src
parent13e1c40b7be52dbb3b82116c514a6e8b6b5499b6 (diff)
QQmlOpenMetaObjectType: extend interface for visual designer
We need those 3 functions to rebuild OpenMetaObject in the visual designer. Change-Id: I70affe5850f46683a049615b3173a4f30c338401 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/qml/qml/qqmlopenmetaobject.cpp17
-rw-r--r--src/qml/qml/qqmlopenmetaobject_p.h4
2 files changed, 21 insertions, 0 deletions
diff --git a/src/qml/qml/qqmlopenmetaobject.cpp b/src/qml/qml/qqmlopenmetaobject.cpp
index a92d822774..5928a6dfb7 100644
--- a/src/qml/qml/qqmlopenmetaobject.cpp
+++ b/src/qml/qml/qqmlopenmetaobject.cpp
@@ -96,6 +96,23 @@ int QQmlOpenMetaObjectType::signalOffset() const
return d->signalOffset;
}
+int QQmlOpenMetaObjectType::propertyCount() const
+{
+ return d->names.count();
+}
+
+QByteArray QQmlOpenMetaObjectType::propertyName(int idx) const
+{
+ Q_ASSERT(idx >= 0 && idx < d->names.count());
+
+ return d->mob.property(idx).name();
+}
+
+QMetaObject *QQmlOpenMetaObjectType::metaObject() const
+{
+ return d->mem;
+}
+
int QQmlOpenMetaObjectType::createProperty(const QByteArray &name)
{
int id = d->mob.propertyCount();
diff --git a/src/qml/qml/qqmlopenmetaobject_p.h b/src/qml/qml/qqmlopenmetaobject_p.h
index 1ca53df772..d037776150 100644
--- a/src/qml/qml/qqmlopenmetaobject_p.h
+++ b/src/qml/qml/qqmlopenmetaobject_p.h
@@ -69,6 +69,10 @@ public:
int propertyOffset() const;
int signalOffset() const;
+ int propertyCount() const;
+ QByteArray propertyName(int) const;
+ QMetaObject *metaObject() const;
+
protected:
virtual void propertyCreated(int, QMetaPropertyBuilder &);
virtual void clear();