summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp
diff options
context:
space:
mode:
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.cpp6
1 files changed, 6 insertions, 0 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 7b1b7ce963..6e09ebb09b 100644
--- a/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp
+++ b/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp
@@ -73,6 +73,12 @@ int main(int argc, char *argv[])
"abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"));
parser.addOption(newlineOption);
+ // A hidden option
+ QCommandLineOption hiddenOption(QStringList() << QStringLiteral("hidden"));
+ hiddenOption.setDescription(QStringLiteral("THIS SHOULD NEVER APPEAR"));
+ hiddenOption.setHidden(true);
+ parser.addOption(hiddenOption);
+
// This program supports different options depending on the "command" (first argument).
// Call parse() to find out the positional arguments.
parser.parse(QCoreApplication::arguments());