QtBase
v6.3.1
|
Classes | |
struct | PositionalArgumentDefinition |
Documentation for positional arguments. More... | |
Public Member Functions | |
QCommandLineParserPrivate () | |
bool | parse (const QStringList &args) |
void | checkParsed (const char *method) |
QStringList | aliases (const QString &name) const |
QString | helpText (bool includeQtOptions) const |
bool | registerFoundOption (const QString &optionName) |
bool | parseOptionValue (const QString &optionName, const QString &argument, QStringList::const_iterator *argumentIterator, QStringList::const_iterator argsEnd) |
Q_NORETURN void | showHelp (int exitCode, bool includeQtOptions) |
Public Attributes | |
QString | errorText |
Error text set when parse() returns false. More... | |
QList< QCommandLineOption > | commandLineOptionList |
The command line options used for parsing. More... | |
NameHash_t | nameHash |
Hash mapping option names to their offsets in commandLineOptionList and optionArgumentList. More... | |
QHash< int, QStringList > | optionValuesHash |
Option values found (only for options with a value) More... | |
QStringList | optionNames |
Names of options found on the command line. More... | |
QStringList | positionalArgumentList |
Arguments which did not belong to any option. More... | |
QStringList | unknownOptionNames |
Names of options which were unknown. More... | |
QString | description |
Application description. More... | |
QList< PositionalArgumentDefinition > | positionalArgumentDefinitions |
QCommandLineParser::SingleDashWordOptionMode | singleDashWordOptionMode |
The parsing mode for "-abc". More... | |
QCommandLineParser::OptionsAfterPositionalArgumentsMode | optionsAfterPositionalArgumentsMode |
How to parse "arg -option". More... | |
bool | builtinVersionOption |
Whether addVersionOption was called. More... | |
bool | builtinHelpOption |
Whether addHelpOption was called. More... | |
bool | needsParsing |
True if parse() needs to be called. More... | |
Definition at line 60 of file qcommandlineparser.cpp.
|
inline |
Definition at line 63 of file qcommandlineparser.cpp.
QStringList QCommandLineParserPrivate::aliases | ( | const QString & | name | ) | const |
Definition at line 131 of file qcommandlineparser.cpp.
QString QCommandLineParserPrivate::helpText | ( | bool | includeQtOptions | ) | const |
Definition at line 1123 of file qcommandlineparser.cpp.
bool QCommandLineParserPrivate::parse | ( | const QStringList & | args | ) |
Definition at line 697 of file qcommandlineparser.cpp.
bool QCommandLineParserPrivate::parseOptionValue | ( | const QString & | optionName, |
const QString & | argument, | ||
QStringList::const_iterator * | argumentIterator, | ||
QStringList::const_iterator | argsEnd | ||
) |
Definition at line 656 of file qcommandlineparser.cpp.
Definition at line 633 of file qcommandlineparser.cpp.
Q_NORETURN void QCommandLineParserPrivate::showHelp | ( | int | exitCode, |
bool | includeQtOptions | ||
) |
bool QCommandLineParserPrivate::builtinHelpOption |
Whether addHelpOption was called.
Definition at line 124 of file qcommandlineparser.cpp.
bool QCommandLineParserPrivate::builtinVersionOption |
Whether addVersionOption was called.
Definition at line 121 of file qcommandlineparser.cpp.
QList<QCommandLineOption> QCommandLineParserPrivate::commandLineOptionList |
The command line options used for parsing.
Definition at line 85 of file qcommandlineparser.cpp.
QString QCommandLineParserPrivate::description |
Application description.
Definition at line 103 of file qcommandlineparser.cpp.
QString QCommandLineParserPrivate::errorText |
Error text set when parse() returns false.
Definition at line 82 of file qcommandlineparser.cpp.
NameHash_t QCommandLineParserPrivate::nameHash |
Hash mapping option names to their offsets in commandLineOptionList and optionArgumentList.
Definition at line 88 of file qcommandlineparser.cpp.
bool QCommandLineParserPrivate::needsParsing |
True if parse() needs to be called.
Definition at line 127 of file qcommandlineparser.cpp.
QStringList QCommandLineParserPrivate::optionNames |
Names of options found on the command line.
Definition at line 94 of file qcommandlineparser.cpp.
QCommandLineParser::OptionsAfterPositionalArgumentsMode QCommandLineParserPrivate::optionsAfterPositionalArgumentsMode |
How to parse "arg -option".
Definition at line 118 of file qcommandlineparser.cpp.
QHash<int, QStringList> QCommandLineParserPrivate::optionValuesHash |
Option values found (only for options with a value)
Definition at line 91 of file qcommandlineparser.cpp.
QList<PositionalArgumentDefinition> QCommandLineParserPrivate::positionalArgumentDefinitions |
Definition at line 112 of file qcommandlineparser.cpp.
QStringList QCommandLineParserPrivate::positionalArgumentList |
Arguments which did not belong to any option.
Definition at line 97 of file qcommandlineparser.cpp.
QCommandLineParser::SingleDashWordOptionMode QCommandLineParserPrivate::singleDashWordOptionMode |
The parsing mode for "-abc".
Definition at line 115 of file qcommandlineparser.cpp.
QStringList QCommandLineParserPrivate::unknownOptionNames |
Names of options which were unknown.
Definition at line 100 of file qcommandlineparser.cpp.