summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qdeclarativepropertymap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/declarative/util/qdeclarativepropertymap.cpp')
-rw-r--r--src/declarative/util/qdeclarativepropertymap.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/declarative/util/qdeclarativepropertymap.cpp b/src/declarative/util/qdeclarativepropertymap.cpp
index 0e477b1..919727f 100644
--- a/src/declarative/util/qdeclarativepropertymap.cpp
+++ b/src/declarative/util/qdeclarativepropertymap.cpp
@@ -98,7 +98,7 @@ void QDeclarativePropertyMapMetaObject::propertyCreated(int, QMetaPropertyBuilde
/*!
\class QDeclarativePropertyMap
\since 4.7
- \brief The QDeclarativePropertyMap class allows you to set key-value pairs that can be used in bindings.
+ \brief The QDeclarativePropertyMap class allows you to set key-value pairs that can be used in QML bindings.
QDeclarativePropertyMap provides a convenient way to expose domain data to the UI layer.
The following example shows how you might declare data in C++ and then
@@ -112,7 +112,7 @@ void QDeclarativePropertyMapMetaObject::propertyCreated(int, QMetaPropertyBuilde
ownerData.insert("phone", QVariant(QString("555-5555")));
//expose it to the UI layer
- QDeclarativeContext *ctxt = view->bindContext();
+ QDeclarativeContext *ctxt = view->rootContext();
ctxt->setProperty("owner", &data);
\endcode
@@ -265,7 +265,7 @@ QVariant &QDeclarativePropertyMap::operator[](const QString &key)
Same as value().
*/
-const QVariant QDeclarativePropertyMap::operator[](const QString &key) const
+QVariant QDeclarativePropertyMap::operator[](const QString &key) const
{
return value(key);
}