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

Only first QCommandLineOption with short name "h" will be parsed.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P4: Low
    • 5.14.0 Alpha
    • 5.12.2
    • Core: Other
    • None
    • All
    • 90c86d738e0f36eaa48c7f81f6f5cc035a339d6b (qt/qtbase/dev)

    Description

      This won't be parsed

      // Some comments here
      QCommandLineOption hostNameOption(QStringList() << "h" << "hostname", "HTTP Server hostname.", "Hostname", "127.0.0.1");
      parser.addOption(hostNameOption);
      

      if previously was selected

      parser.addHelpOption();
      

      Possibly, short name "h" intersects with help option. If help option would be added after hostNameOption, only first (hostname) option with "h" short name would be accepted.

      Maybe it's not a bug, but simply confusing bahaviour.

      Attachments

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

        Activity

          People

            dfaure_kdab David Faure
            cltanuki Nikita Moshkalov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes