diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-02-23 23:07:29 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-02-23 23:07:29 (GMT) |
commit | 8727985d81c793d52d5e24ed6815e7237ae879f1 (patch) | |
tree | dbf3fcdf5c1e16a0ab5fcb79ce4f8ad6450ac353 /examples/declarative/extending/default | |
parent | c38be88e5314f43efd7cb6a2e8140d006e77afbe (diff) | |
download | Qt-8727985d81c793d52d5e24ed6815e7237ae879f1.zip Qt-8727985d81c793d52d5e24ed6815e7237ae879f1.tar.gz Qt-8727985d81c793d52d5e24ed6815e7237ae879f1.tar.bz2 |
Remove QML_DEFINE_... macros, now use QML_REGISTER_... macros calls.
Task-number: QT-2798
Diffstat (limited to 'examples/declarative/extending/default')
-rw-r--r-- | examples/declarative/extending/default/birthdayparty.cpp | 1 | ||||
-rw-r--r-- | examples/declarative/extending/default/main.cpp | 5 | ||||
-rw-r--r-- | examples/declarative/extending/default/person.cpp | 3 |
3 files changed, 5 insertions, 4 deletions
diff --git a/examples/declarative/extending/default/birthdayparty.cpp b/examples/declarative/extending/default/birthdayparty.cpp index 15a4ca9..f0eb599 100644 --- a/examples/declarative/extending/default/birthdayparty.cpp +++ b/examples/declarative/extending/default/birthdayparty.cpp @@ -70,4 +70,3 @@ Person *BirthdayParty::guest(int index) const return m_guests.at(index); } -QML_DEFINE_TYPE(People, 1,0, BirthdayParty, BirthdayParty); diff --git a/examples/declarative/extending/default/main.cpp b/examples/declarative/extending/default/main.cpp index ccbee83..ea51e00 100644 --- a/examples/declarative/extending/default/main.cpp +++ b/examples/declarative/extending/default/main.cpp @@ -49,6 +49,11 @@ int main(int argc, char ** argv) { QCoreApplication app(argc, argv); + QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty); + QML_REGISTER_NOCREATE_TYPE(Person); + QML_REGISTER_TYPE(People, 1,0, Boy, Boy); + QML_REGISTER_TYPE(People, 1,0, Girl, Girl); + QmlEngine engine; QmlComponent component(&engine, ":example.qml"); BirthdayParty *party = qobject_cast<BirthdayParty *>(component.create()); diff --git a/examples/declarative/extending/default/person.cpp b/examples/declarative/extending/default/person.cpp index a0b4960..69216d3 100644 --- a/examples/declarative/extending/default/person.cpp +++ b/examples/declarative/extending/default/person.cpp @@ -65,18 +65,15 @@ void Person::setShoeSize(int s) m_shoeSize = s; } -QML_DEFINE_NOCREATE_TYPE(Person); Boy::Boy(QObject * parent) : Person(parent) { } -QML_DEFINE_TYPE(People, 1,0, Boy, Boy); Girl::Girl(QObject * parent) : Person(parent) { } -QML_DEFINE_TYPE(People, 1,0, Girl, Girl); |