From d045cd4330afee92a3c5c86e51aefc2299ab3ad9 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 19 Aug 2019 11:07:52 +0200 Subject: Reference Examples: Fix calls to exec() and exit codes exec() is a static member of QCoreApplication and should be called as such. In case of errors we should return a non-0 exit code from main(). Change-Id: I0fefa006841b367d06a9de1fd1284cb7caf467bd Reviewed-by: Simon Hausmann --- examples/qml/referenceexamples/properties/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/qml/referenceexamples/properties/main.cpp') diff --git a/examples/qml/referenceexamples/properties/main.cpp b/examples/qml/referenceexamples/properties/main.cpp index a0a2335034..60b56bd247 100644 --- a/examples/qml/referenceexamples/properties/main.cpp +++ b/examples/qml/referenceexamples/properties/main.cpp @@ -72,9 +72,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; } -- cgit v1.2.3