Details
-
Suggestion
-
Resolution: Done
-
P3: Somewhat important
-
None
-
5.7.0
-
None
Description
QML language has a global object called Qt which provides many useful enums and functions. Probably the most common used function of this object is quit(). This function causes to emit QQmlEngine::quit() signal, connected to QCoreApplication::quit() slot by the application developer.
But the problem is, this function calls QCoreApplication::exit() with return code 0.
My suggestion is to having another ancestor function in Qt Object with a parameter for exit code and for analogy call it 'exit'. So that after event loop returns this code, application developer can process any other logic depending on this specified return code.
example prototype:
quit()
exit(int returnCode)
I asked this question on stackoverflow, here is the link for it, http://stackoverflow.com/questions/34329875/exit-with-a-return-code-from-qml