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

make QCommandLineParser's showParserMessage a public function

XMLWordPrintable

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

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes