Details
-
Suggestion
-
Resolution: Done
-
Not Evaluated
-
5.7.1
-
None
-
Linux; Qt 5.7.1 HEAD at 0150c62f from git://code.qt.io/qt/qt5.git
-
50d53533e5ab1923865a9f80cb8b093ab477ae81
Description
On Unix the standard convention is for an error message to be preceded by the name of the command or utility that generated it. This is especially useful to identify the source of an error when the command is used in a script or makefile, or in a desktop environment where it may appear in an extensive session log.
QCommandLineParser does not seem to do this:
$ uic --version
uic 5.7.1
$ uic --foo
Unknown option 'foo'.
$ uic -foo
Unknown option 'foo'.
$ uic -f
Unknown option 'f'.
$
It would be more helpful if it reported the command name, as available from QCoreApplication::applicationName(). This defaults to the name of the executable, so providing the standard error reporting behaviour. What should be seen is:
$ uic -f
uic: Unknown option 'f'.
$