pub struct SingleDashWordOptionMode(/* private fields */);
Expand description
This enum describes the way the parser interprets command-line options that use a single dash followed by multiple letters, as as -abc
.
C++ enum: QCommandLineParser::SingleDashWordOptionMode
.
This enum describes the way the parser interprets command-line options that use a single dash followed by multiple letters, as as -abc
.
See also setSingleDashWordOptionMode().
Implementations§
Source§impl SingleDashWordOptionMode
impl SingleDashWordOptionMode
Sourcepub const ParseAsCompactedShortOptions: SingleDashWordOptionMode
pub const ParseAsCompactedShortOptions: SingleDashWordOptionMode
-abc
is interpreted as -a -b -c
, i.e. as three short options that have been compacted on the command-line, if none of the options take a value. If a
takes a value, then it is interpreted as -a bc
, i.e. the short option a
followed by the value bc
. This is typically used in tools that behave like compilers, in order to handle options such as -DDEFINE=VALUE
or -I/include/path
. This is the default parsing mode. New applications are recommended to use this mode. (C++ enum variant: ParseAsCompactedShortOptions = 0
)
Sourcepub const ParseAsLongOptions: SingleDashWordOptionMode
pub const ParseAsLongOptions: SingleDashWordOptionMode
-abc
is interpreted as –abc
, i.e. as the long option named abc
. This is how Qt’s own tools (uic, rcc…) have always been parsing arguments. This mode should be used for preserving compatibility in applications that were parsing arguments in such a way. There is an exception if the a
option has the QCommandLineOption::ShortOptionStyle flag set, in which case it is still interpreted as -a bc
. (C++ enum variant: ParseAsLongOptions = 1
)
Trait Implementations§
Source§impl Clone for SingleDashWordOptionMode
impl Clone for SingleDashWordOptionMode
Source§fn clone(&self) -> SingleDashWordOptionMode
fn clone(&self) -> SingleDashWordOptionMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more