From 230b088c373f0d8080d730797b477a8de4418605 Mon Sep 17 00:00:00 2001 From: Charles Yin Date: Mon, 8 Aug 2011 11:31:46 +1000 Subject: add qml related usage help message Change-Id: Ieabbca64793ba128746193786bac3d0213e8e746 Reviewed-on: http://codereview.qt.nokia.com/2716 Reviewed-by: Qt Sanity Bot Reviewed-by: Charles Yin --- src/testlib/qtestcase.cpp | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'src/testlib') diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 023df89d98..27a897c263 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -1076,9 +1076,7 @@ Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, char *argv[], bool qml) " -minimumvalue n : Sets the minimum acceptable measurement value\n" " -iterations n : Sets the number of accumulation iterations.\n" " -median n : Sets the number of median iterations.\n" - " -vb : Print out verbose benchmarking information.\n" - "\n" - " -help : This help\n"; + " -vb : Print out verbose benchmarking information.\n"; for (int i = 1; i < argc; ++i) { if (strcmp(argv[i], "-help") == 0 || strcmp(argv[i], "--help") == 0 @@ -1086,6 +1084,17 @@ Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, char *argv[], bool qml) printf(" Usage: %s [options] [testfunction[:testdata]]...\n" " By default, all testfunctions will be run.\n\n" "%s", argv[0], testOptions); + + if (qml) { + printf ("\nqmltest related options:\n" + " -import : Specify an import directory.\n" + " -input : Specify the root directory for test cases.\n" + " -qtquick1 : Run with QtQuick 1 rather than QtQuick 2.\n" + ); + } + + printf("\n" + " -help : This help\n"); exit(0); } else if (strcmp(argv[i], "-functions") == 0) { if (qml) { @@ -1228,6 +1237,16 @@ Q_TESTLIB_EXPORT void qtest_qParseArgs(int argc, char *argv[], bool qml) } } else if (argv[i][0] == '-') { printf("Unknown option: '%s'\n\n%s", argv[i], testOptions); + if (qml) { + printf ("\nqmltest related options:\n" + " -import : Specify an import directory.\n" + " -input : Specify the root directory for test cases.\n" + " -qtquick1 : Run with QtQuick 1 rather than QtQuick 2.\n" + ); + } + + printf("\n" + " -help : This help\n"); exit(1); } else if (qml) { // We can't check the availability of test functions until -- cgit v1.2.3