Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-54360

exit with a return code from QML

    XMLWordPrintable

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

      Attachments

        For Gerrit Dashboard: QTBUG-54360
        # Subject Branch Project Status CR V

        Activity

          People

            srutledg Shawn Rutledge
            kafanti Cavit Sina Dogru
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes