[Interest] QtArg version 1.4.0 released

Dmitry Ashkadov dmitry.ashkadov at gmail.com
Tue Oct 22 09:58:21 CEST 2013


22.10.2013 08:50, Igor Mironchik ?????:
>>> Hi folk,
>>>
>>> I'm pleased to provide new version of QtArg.
>>>
>>> It's highly recommended to update to new version because of in version 1.4.0
>>>
>>>     * Improved help. Now help prints with fixed line length (by default 79
>>> symbols).
>>>       Line length can be changed.
>>>     * Now QtMultiArg can process more than one value defined with it.
>>>       Now user can type --arg value1, value2, value3 instead of
>>>       --arg value1 --arg value2 --arg value3. And commas are optional.
>>>     * Some another minor fixes.
>>>
>>> http://igor-mironchik.host56.com/projects/qtarg.html
>> Hey psst, Qt 5.2 is going to include QCommandLineParser.
>> http://doc-snapshot.qt-project.org/qt5-stable/qcommandlineparser.html
>>
>> Don't be mad at me for telling you :)
> I know about QCommandLineParser.
>
> Despite the fact that QCommandLineParser is going who tell that he will
> be better?
>
> Alternative is better her absence. :)
>

I've looked at QtArg.

> This specific exception (QtArgHelpHasPrintedEx) is needed for 
> processing program's logic that usually stops execution at this point.
It seems like you use exceptions in a wrong way. Qt don't use 
exceptions, so, IMHO, if you make Qt oriented module then don't use 
exceptions at all.

> std::runtime_error(  desc.toLocal8Bit().constData()  )
Possible crash.

> *QTextStream out( stdout );*
Let the user code to decide what print to stdout. Moreover, It isn't 
possible to translate message.

> QtArg one( ..., true, true );
Never use booleans in such way.

> Constructor(QtArgVisitorIface  *  visitor=  NULL)
Don't let users to use raw pointers. Who will own the pointer?

> f(int  &  maxNameLength)
Or use raw pointer ( it let user to skip value retrieving by passing 
NULL to the function and it is more obvious f(&len) ) or use something 
like std::pair.

> virtual  const  NamesList  &  names()  const;
Usually you should never return reference.

For what reason you place all code in header files (*.hpp)?

Do hierarchy and polymorphism really need?








-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20131022/74aa5948/attachment.html>


More information about the Interest mailing list