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

QCoreApplication. quit() and exit() does not exit immediately

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P4: Low
    • Some future release
    • 4.6.2
    • Documentation
    • None
    • qt-everywhere-opensource-src-4.6.2
      WindowsXP
      MinGW 4.4.0TDM

    Description

      From documentation on QCoreApplication::exit():

      Note that unlike the C library function of the same name, this function does return to the caller – it is event processing that stops.

      for method QCoreApplication::quit()

      Equivalent to calling QCoreApplication::exit(0).

      Try this code

                  qApp->quit(); // behavior same as qApp->exit()
                  forever {
                      qDebug("I'm not compiler, but i can spam too!");
                  }
      

      Need update documentation for exit() and quit() methods and append this example as main solution for correct exit:

          Q[Core]Application::quit()/exit();
          return;
          ... // here some code
      

      Or may be change implementation and add two new methods: quitLater(), exitLater() like deleteLater().

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            docteam Qt Documentation Team
            sabrog Vladislav
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes