aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/referenceexamples/properties/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qml/referenceexamples/properties/main.cpp')
-rw-r--r--examples/qml/referenceexamples/properties/main.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/examples/qml/referenceexamples/properties/main.cpp b/examples/qml/referenceexamples/properties/main.cpp
index a0a2335034..216869bf6c 100644
--- a/examples/qml/referenceexamples/properties/main.cpp
+++ b/examples/qml/referenceexamples/properties/main.cpp
@@ -59,8 +59,7 @@ int main(int argc, char ** argv)
QCoreApplication app(argc, argv);
//![register list]
- qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty");
- qmlRegisterType<Person>("People", 1,0, "Person");
+ qmlRegisterTypesAndRevisions<BirthdayParty, Person>("People", 1);
//![register list]
QQmlEngine engine;
@@ -72,9 +71,9 @@ int main(int argc, char ** argv)
qWarning() << "They are inviting:";
for (int ii = 0; ii < party->guestCount(); ++ii)
qWarning() << " " << party->guest(ii)->name();
- } else {
- qWarning() << component.errors();
+ return EXIT_SUCCESS;
}
- return 0;
+ qWarning() << component.errors();
+ return EXIT_FAILURE;
}