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

make QCommandLineParser's showParserMessage a public function

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Fixed
    • Not Evaluated
    • 6.9.0 FF
    • 6.7.2, 6.7
    • Core: I/O
    • None
    • All
    • bad618606 (dev)

    Description

      QCommandLineParser has an internal helper function to print messages, which is used by `showVersion0`, `process()` (for displaying `--version`, `--help` or `--help-all` messages). This helper function checks if a messagebox is needed to be displayed, and will display the help text as a messsagebox when needed.

      Application developers might want to add their own commandline arguments, and some of the arguments might want to show similar messages to the end user. To keep the behavior consistence with the Qt's built-in help or version commandline arguments, it's better to simply make `showParserMessage()` a public Qt API so developers can simply use it if they want.

      If acceptable, I can also send a patch to add such API since it's quite simple.

      Somewhat related to QTBUG-103315: Every `showParserMessage()` call followed by a `qt_call_post_routines()` call. If we made such API public, we'll also need to move `qt_call_post_routines()` inside the `showParserMessage()` function so developers won't need to call `qt_call_post_routines()` manually.

      Attachments

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

        Activity

          People

            dfaure_kdab David Faure
            blumia Gary Wang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes