I would like an argument parser in Qt, and I'd like it to be in qtbase.
The reason for qtbase is so that our own tools and manual tests can use it.
Manual tests outside of qtbase are normally GUI based.

I think this is something that can go into a minor 5.x release.

About windows:
Tools that use / for arguments also accept - (except the built in shell 
commands)
The / can be used for both short and long arguments (e.g. "nmake /nologo" vs 
"nmake /kc" vs "nmake /k /c")
Arguments may be case insensitive

The command line is pretty much only used by technical people (buried 3 levels 
deep in the app menu), who would probably accept unix style args.

If we want to support windows style:
Use Qt::CaseInsensitive to opt in to case insensitive args
Print a qWarning if the arguments could be ambiguous (assuming the API declares 
the possible arguments up front like perl's GetOpt::Long)
Allow opt out from short argument compression (i.e. "/xzf" would only be 
considered as a synonym for "--xzf" and not for "-x -z -f" if the opt out is 
applied)

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]
> On Behalf Of Mark Constable
> Sent: 15 March 2012 10:29
> To: [email protected]
> Subject: Re: [Development] Qt Playground - Command Line Parser
> experiment
>
> Any simple standard cli args parser included with Qt would be
> overwhelmingly
> better than none at all even if it's just -s shortops (/s for win) and
> worry
> about --longopts and tar-like variations for Qt6+. The simpler the
> better as
> long as it's universally available in qtcore, if possible, sooner than
> later.
> _______________________________________________
> Development mailing list
> [email protected]
> http://lists.qt-project.org/mailman/listinfo/development


________________________________
Subject to local law, communications with Accenture and its affiliates 
including telephone calls and emails (including content), may be monitored by 
our systems for the purposes of security and the assessment of internal 
compliance with Accenture policy.
______________________________________________________________________________________

www.accenture.com

_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to