summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2020-05-04 11:33:10 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-05-04 23:12:40 +0200
commit5e94fdc488784b6dcf574971e1ca9824cfe58e2f (patch)
tree57a40ef41a90377ab867d086519aaaf64c887089 /tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp
parented6fbeffb233e4028f77d8a9edae1188424c0ab8 (diff)
parent0f7987f0c934b311bd39a5a496ffb0c6128eb8df (diff)
Merge "Merge remote-tracking branch 'origin/5.15' into dev"
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.cpp7
1 files changed, 7 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 513c811788..88dfdeccab 100644
--- a/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp
+++ b/tests/auto/corelib/tools/qcommandlineparser/testhelper/qcommandlineparser_test_helper.cpp
@@ -97,6 +97,13 @@ int main(int argc, char *argv[])
parser.process(app);
const QString size = parser.value("size");
printf("Resizing %s to %s and saving to %s\n", qPrintable(parser.value("load")), qPrintable(size), qPrintable(parser.value("o")));
+ } else if (command == "long") {
+ // A very long option (QTBUG-79926)
+ QCommandLineOption longOption(QStringList{QStringLiteral("looooooooooooong-option"), QStringLiteral("looooong-opt-alias")});
+ longOption.setDescription(QStringLiteral("Short description"));
+ longOption.setValueName(QStringLiteral("looooooooooooong-value-name"));
+ parser.addOption(longOption);
+ parser.process(app);
} else {
// Call process again, to handle unknown options this time.
parser.process(app);