aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlopenmetaobject.cpp
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/qml/qml/qqmlopenmetaobject.cpp
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/qml/qml/qqmlopenmetaobject.cpp')
-rw-r--r--src/qml/qml/qqmlopenmetaobject.cpp17
1 files changed, 17 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();