summaryrefslogtreecommitdiffstats
path: root/examples/declarative/extending/binding
diff options
context:
space:
mode:
authormae <qt-info@nokia.com>2010-03-10 17:29:44 (GMT)
committermae <qt-info@nokia.com>2010-03-10 17:31:33 (GMT)
commite5922ab126f3532483b18720ce893d6be826d50e (patch)
tree1d2913660c64847b8bade9ab89e159a8bdc0de63 /examples/declarative/extending/binding
parentb8f9d43dc87054f4f0322a2d124beeb7aaf8bb8f (diff)
downloadQt-e5922ab126f3532483b18720ce893d6be826d50e.zip
Qt-e5922ab126f3532483b18720ce893d6be826d50e.tar.gz
Qt-e5922ab126f3532483b18720ce893d6be826d50e.tar.bz2
Document - and use - the qmlRegisterXXX template functions
This commit removes the obsolete QML_REGISTER_TYPE macros.
Diffstat (limited to 'examples/declarative/extending/binding')
-rw-r--r--examples/declarative/extending/binding/main.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/examples/declarative/extending/binding/main.cpp b/examples/declarative/extending/binding/main.cpp
index 873f8c9..ce6c50d 100644
--- a/examples/declarative/extending/binding/main.cpp
+++ b/examples/declarative/extending/binding/main.cpp
@@ -49,14 +49,13 @@
int main(int argc, char ** argv)
{
QCoreApplication app(argc, argv);
-
- QML_REGISTER_NOCREATE_TYPE(BirthdayPartyAttached);
- QML_REGISTER_TYPE(People, 1,0, BirthdayParty, BirthdayParty);
- QML_REGISTER_TYPE(People, 1,0, HappyBirthday, HappyBirthday);
- QML_REGISTER_NOCREATE_TYPE(ShoeDescription);
- QML_REGISTER_NOCREATE_TYPE(Person);
- QML_REGISTER_TYPE(People, 1,0, Boy, Boy);
- QML_REGISTER_TYPE(People, 1,0, Girl, Girl);
+ qmlRegisterType<BirthdayPartyAttached>();
+ qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty");
+ qmlRegisterType<HappyBirthday>("People", 1,0, "HappyBirthday");
+ qmlRegisterType<ShoeDescription>();
+ qmlRegisterType<Person>();
+ qmlRegisterType<Boy>("People", 1,0, "Boy");
+ qmlRegisterType<Girl>("People", 1,0, "Girl");
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine, ":example.qml");