summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativefastproperties.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-10-12 03:14:58 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-10-12 03:14:58 (GMT)
commit2dfca66add98481348d67ccdcca7e3bf7b890e0c (patch)
tree236bb0bce5f0eb2728fc0c00622a2c128cd6dd82 /src/declarative/qml/qdeclarativefastproperties.cpp
parent650a0078e2cef43eff107fe8d2505f64a0bfedf0 (diff)
parent80979c559d5b6fc677989e077c9890943dac054f (diff)
downloadQt-2dfca66add98481348d67ccdcca7e3bf7b890e0c.zip
Qt-2dfca66add98481348d67ccdcca7e3bf7b890e0c.tar.gz
Qt-2dfca66add98481348d67ccdcca7e3bf7b890e0c.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'src/declarative/qml/qdeclarativefastproperties.cpp')
-rw-r--r--src/declarative/qml/qdeclarativefastproperties.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativefastproperties.cpp b/src/declarative/qml/qdeclarativefastproperties.cpp
index eb69b6a..78e3afd 100644
--- a/src/declarative/qml/qdeclarativefastproperties.cpp
+++ b/src/declarative/qml/qdeclarativefastproperties.cpp
@@ -51,10 +51,19 @@ QT_BEGIN_NAMESPACE
// primarily read from bindings is a candidate for inclusion as a fast
// property.
+static void QObject_objectName(QObject *object, void *output, QDeclarativeNotifierEndpoint *endpoint)
+{
+ if (endpoint)
+ endpoint->connect(QDeclarativeData::get(object, true)->objectNameNotifier());
+ *((QString *)output) = object->objectName();
+}
+
QDeclarativeFastProperties::QDeclarativeFastProperties()
{
add(&QDeclarativeItem::staticMetaObject, QDeclarativeItem::staticMetaObject.indexOfProperty("parent"),
QDeclarativeItemPrivate::parentProperty);
+ add(&QObject::staticMetaObject, QObject::staticMetaObject.indexOfProperty("objectName"),
+ QObject_objectName);
}
int QDeclarativeFastProperties::accessorIndexForProperty(const QMetaObject *metaObject, int propertyIndex)