summaryrefslogtreecommitdiffstats
path: root/doc/src/declarative/extending-examples.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/declarative/extending-examples.qdoc')
-rw-r--r--doc/src/declarative/extending-examples.qdoc12
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/src/declarative/extending-examples.qdoc b/doc/src/declarative/extending-examples.qdoc
index b84ae0e..cc66838 100644
--- a/doc/src/declarative/extending-examples.qdoc
+++ b/doc/src/declarative/extending-examples.qdoc
@@ -69,7 +69,7 @@ Q_DECLARE_METATYPE() functionality.
The Person class implementation is quite basic. The property accessors simply
return members of the object instance.
-The implementation must also include the QML_DEFINE_TYPE() macro. This macro
+The implementation must also be registered using the QML_REGISTER_TYPE() macro. This macro
registers the Person class with QML as a type in the People library version 1.0,
and defines the mapping between the C++ and QML class names.
@@ -108,11 +108,11 @@ The class contains a member to store the celebrant object, and also a
QList<Person *> member.
In QML, the type of a list properties - and the guests property is a list of
-people - are all of type QmlListProperty<T>. QmlListProperty is simple value
+people - are all of type QDeclarativeListProperty<T>. QDeclarativeListProperty is simple value
type that contains a set of function pointers. QML calls these function
pointers whenever it needs to read from, write to or otherwise interact with
the list. In addition to concrete lists like the people list used in this
-example, the use of QmlListProperty allows for "virtual lists" and other advanced
+example, the use of QDeclarativeListProperty allows for "virtual lists" and other advanced
scenarios.
\section2 Define the BirthdayParty
@@ -160,13 +160,13 @@ previous example. However, as we have repurposed the People class as a common
base for Boy and Girl, we want to prevent it from being instantiated from QML
directly - an explicit Boy or Girl should be instantiated instead.
-\snippet examples/declarative/extending/coercion/person.cpp 0
+\snippet examples/declarative/extending/coercion/main.cpp 0
While we want to disallow instantiating Person from within QML, it still needs
to be registered with the QML engine, so that it can be used as a property type
and other types can be coerced to it. To register a type, without defining a
-named mapping into QML, we use the QML_DEFINE_NOCREATE_TYPE() macro instead of
-the QML_DEFINE_TYPE() macro used previously.
+named mapping into QML, we call the QML_REGISTER_NOCREATE_TYPE() macro instead of
+the QML_REGISTER_TYPE() macro used previously.
\section2 Define Boy and Girl