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/extended | |
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/extended')
-rw-r--r-- | examples/qml/referenceexamples/extended/main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/qml/referenceexamples/extended/main.cpp b/examples/qml/referenceexamples/extended/main.cpp index f91cec76b1..5f8582d08f 100644 --- a/examples/qml/referenceexamples/extended/main.cpp +++ b/examples/qml/referenceexamples/extended/main.cpp @@ -70,9 +70,9 @@ int main(int argc, char ** argv) if (edit) { edit->show(); - return app.exec(); - } else { - qWarning() << component.errors(); - return 0; + return QApplication::exec(); } + + qWarning() << component.errors(); + return EXIT_FAILURE; } |