summaryrefslogtreecommitdiffstats
path: root/examples/declarative/extending/properties/main.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-02-22 04:56:49 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-02-22 05:53:27 (GMT)
commit33eb76f050b45718d87926a8ff7afc89d6201c16 (patch)
tree935ddc2337b3891aab1ad7edcb06a62aabf14668 /examples/declarative/extending/properties/main.cpp
parent5f63321e3fe2b436d469d2722dc464ea4c7830c4 (diff)
downloadQt-33eb76f050b45718d87926a8ff7afc89d6201c16.zip
Qt-33eb76f050b45718d87926a8ff7afc89d6201c16.tar.gz
Qt-33eb76f050b45718d87926a8ff7afc89d6201c16.tar.bz2
Replace QmlList* and QList* support with a single QmlListProperty type
As a value type QmlListProperty doesn't consume any memory in the object. It also has a companion QmlListReference class that is part of the public API for C++ developers to interact with that also manages memory issues that existed with previous solutions (if the containing QObject was destroyed it left a dangling pointer).
Diffstat (limited to 'examples/declarative/extending/properties/main.cpp')
-rw-r--r--examples/declarative/extending/properties/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/declarative/extending/properties/main.cpp b/examples/declarative/extending/properties/main.cpp
index 229e59a..97d7905 100644
--- a/examples/declarative/extending/properties/main.cpp
+++ b/examples/declarative/extending/properties/main.cpp
@@ -56,8 +56,8 @@ int main(int argc, char ** argv)
if (party && party->celebrant()) {
qWarning() << party->celebrant()->name() << "is having a birthday!";
qWarning() << "They are inviting:";
- for (int ii = 0; ii < party->guests()->count(); ++ii)
- qWarning() << " " << party->guests()->at(ii)->name();
+ for (int ii = 0; ii < party->guestCount(); ++ii)
+ qWarning() << " " << party->guest(ii)->name();
} else {
qWarning() << "An error occured";
}