aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qml/referenceexamples/binding
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-08-19 11:07:52 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-08-30 17:57:38 +0200
commitd045cd4330afee92a3c5c86e51aefc2299ab3ad9 (patch)
tree5852e974be3b3029456a8b4fa8541760e754e7fc /examples/qml/referenceexamples/binding
parentfa7cf036ca7ee27f4f6a24c58d607eaf1a27286e (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/binding')
-rw-r--r--examples/qml/referenceexamples/binding/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/qml/referenceexamples/binding/main.cpp b/examples/qml/referenceexamples/binding/main.cpp
index 18a424ff38..eca524dfe2 100644
--- a/examples/qml/referenceexamples/binding/main.cpp
+++ b/examples/qml/referenceexamples/binding/main.cpp
@@ -94,9 +94,9 @@ int main(int argc, char ** argv)
}
party->startParty();
- } else {
- qWarning() << component.errors();
+ return QCoreApplication::exec();
}
- return app.exec();
+ qWarning() << component.errors();
+ return EXIT_FAILURE;
}