[Development] QCommandLineParser

Oswald Buddenhagen oswald.buddenhagen at digia.com
Tue Jul 30 10:30:41 CEST 2013

On Mon, Jul 29, 2013 at 08:38:38PM +0200, David Faure wrote:
> So after more thinking, here's my suggestion:
> * we keep the idea that every main() creates a parser on the stack. The 
> current change request can go in (after more reviewing).
> * later if we want to use QCommandLineParser for the builtin qapp options, 
> qcoreapp would create its own *separate* instance,
note that i already commented on that, too.
the problem with any kind of separate parser is that if two independent
parsers try to process the same command line, you are bound for
anomalies, specifically one parser interpreting as options what the
other parser would see as arguments to other options.

the cleanest solution would be entirely discarding the qapp-internal
parsing and having the user-supplied parser explicitly fed into qapp
(fwiw, that's what app developers want anyway. i have already fed fake
command lines to qapp just to make it happy).
however, due to the instantiation order constraints that would mean
delaying the cmdline-dependent setup in qapp, which is said to be tricky

More information about the Development mailing list