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.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/examples/qml/referenceexamples/properties/main.cpp b/examples/qml/referenceexamples/properties/main.cpp
index a0a2335034..e30e1d9fb1 100644
--- a/examples/qml/referenceexamples/properties/main.cpp
+++ b/examples/qml/referenceexamples/properties/main.cpp
@@ -58,11 +58,6 @@ int main(int argc, char ** argv)
{
QCoreApplication app(argc, argv);
-//![register list]
- qmlRegisterType<BirthdayParty>("People", 1,0, "BirthdayParty");
- qmlRegisterType<Person>("People", 1,0, "Person");
-//![register list]
-
QQmlEngine engine;
QQmlComponent component(&engine, QUrl("qrc:example.qml"));
auto *party = qobject_cast<BirthdayParty *>(component.create());
@@ -72,9 +67,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;
}