[Development] Qt Playground - Command Line Parser experiment

kai.koehne at nokia.com kai.koehne at nokia.com
Thu Mar 15 12:26:14 CET 2012



> -----Original Message-----
> From: development-bounces+kai.koehne=nokia.com at qt-project.org
> [mailto:development-bounces+kai.koehne=nokia.com at qt-project.org] On
> Behalf Of ext Hugo Parente Lima
> Sent: Thursday, March 15, 2012 12:16 PM
> To: development at qt-project.org
> Cc: Mark Constable
> Subject: Re: [Development] Qt Playground - Command Line Parser
> experiment
> 
> On Thursday 15 March 2012 07:29:23 Mark Constable wrote:
> > 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.
> 
> Hmmm... ok, let's go again... should I elaborate this:
> 
> https://github.com/hugopl/qcmdlineparser
> (git at github.com:hugopl/qcmdlineparser.git)
> 
> or just "git push origin :master" and forget about?
> 
> Some usage examples can be found on the small unit test:
> 
> https://github.com/hugopl/qcmdlineparser/blob/master/qcmdlineparsertes
> t.cpp

I only checked the tests file, but it seems like you're going for the GNU style where
options following '-' are always one character letters.The Qt tools itself do not follow this style, e.g. qmake -project, not qmake --project, or qmake -p :) To use the parser also internally , it should IMO also support a style where '-help' is one valid argument.

Just my 2 cents

Kai



More information about the Development mailing list