diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2016-03-17 12:48:38 +0100 |
---|---|---|
committer | Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> | 2016-03-23 01:08:28 +0000 |
commit | 63274c95a3d78fbed8f511690cf7b248a6231273 (patch) | |
tree | 1e3beac941dad6057e5d8c1e3b3b3051e97b77e8 /tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp | |
parent | 17d3825874b1333a0aa50ba1b8fe1c51d9c9a8db (diff) |
Add QCommandLineOption::Flags containing HiddenFromHelp and ShortOptionStyle
This patch adds a new option, QCommandLineOption::ShortOptionStyle, which helps
applications (such as compilers, so moc and now qdoc) which need to mix long-style
and short flags.
[ChangeLog][QtCore][QCommandLineOption] Added flags() and setFlags() methods.
Added ShortOptionStyle and HiddenFromHelp flags.
Change-Id: I944ce56aff2b28ecd6bb9d2d23c4e726e9d06647
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp')
-rw-r--r-- | tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp b/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp index 36bc8621d2..30c7b1bf69 100644 --- a/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp +++ b/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp @@ -71,8 +71,12 @@ int main(int argc, char *argv[]) // A hidden option QCommandLineOption hiddenOption(QStringList() << QStringLiteral("hidden")); hiddenOption.setDescription(QStringLiteral("THIS SHOULD NEVER APPEAR")); - hiddenOption.setHidden(true); + hiddenOption.setFlags(QCommandLineOption::HiddenFromHelp); parser.addOption(hiddenOption); + QCommandLineOption hiddenOption2(QStringList() << QStringLiteral("hidden2")); + hiddenOption2.setDescription(QStringLiteral("NEITHER SHOULD THIS")); + hiddenOption2.setHidden(true); + parser.addOption(hiddenOption2); // This program supports different options depending on the "command" (first argument). // Call parse() to find out the positional arguments. |