[Interest] QCommandLineParser, default arguments from env variable?

Mark Gaiser markg85 at gmail.com
Tue Jun 24 10:26:39 CEST 2014


On Mon, Jun 23, 2014 at 11:20 PM, Thiago Macieira
<thiago.macieira at intel.com> wrote:
> Em seg 23 jun 2014, às 22:48:59, Mark Gaiser escreveu:
>> > getenv("APPNAME_ARGS"), split it into a QStringList and pass it to the
>> > command-line parser.
>>
>> That sounds like a nice solution.
>> Thank you for the hint
>
> The difficult part is the splitting. Be careful with quoted parts.

I think I'll just look at how QCommandLineParser is doing that and
"copy" that logic.
Would it be a nice idea to add a function to QCommandLineParser with
the following signature:

QStringList QCommandLineParser::parse(const QString& arguments)

Which would parse a string into a QStringList ready to be fed into the
process function if needed?

Or perhaps another progress function that does this internally:

void QCommandLineParser::process(const QString& arguments)

Or both..



More information about the Interest mailing list