diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-08-19 11:07:52 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-08-30 17:57:38 +0200 |
commit | d045cd4330afee92a3c5c86e51aefc2299ab3ad9 (patch) | |
tree | 5852e974be3b3029456a8b4fa8541760e754e7fc /examples/qml/referenceexamples/attached/main.cpp | |
parent | fa7cf036ca7ee27f4f6a24c58d607eaf1a27286e (diff) |
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 <simon.hausmann@qt.io>
Diffstat (limited to 'examples/qml/referenceexamples/attached/main.cpp')
-rw-r--r-- | examples/qml/referenceexamples/attached/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/qml/referenceexamples/attached/main.cpp b/examples/qml/referenceexamples/attached/main.cpp index 444acfdee7..eb70625bea 100644 --- a/examples/qml/referenceexamples/attached/main.cpp +++ b/examples/qml/referenceexamples/attached/main.cpp @@ -93,9 +93,9 @@ int main(int argc, char ** argv) qWarning() << " " << guest->name() << "RSVP date:" << qPrintable(rsvpDate.toString()); } - } else { - qWarning() << component.errors(); + return EXIT_SUCCESS; } - return 0; + qWarning() << component.errors(); + return EXIT_FAILURE; } |