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 moresource§impl Debug for SingleDashWordOptionMode
impl Debug for SingleDashWordOptionMode
source§impl From<SingleDashWordOptionMode> for c_int
impl From<SingleDashWordOptionMode> for c_int
source§fn from(value: SingleDashWordOptionMode) -> Self
fn from(value: SingleDashWordOptionMode) -> Self
source§impl From<i32> for SingleDashWordOptionMode
impl From<i32> for SingleDashWordOptionMode
source§impl PartialEq for SingleDashWordOptionMode
impl PartialEq for SingleDashWordOptionMode
source§fn eq(&self, other: &SingleDashWordOptionMode) -> bool
fn eq(&self, other: &SingleDashWordOptionMode) -> bool
self
and other
values to be equal, and is used
by ==
.