From: Charles Yin Date: Mon, 8 Aug 2011 01:35:48 +0000 (+1000) Subject: parse args earlier X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=12aae0aab340f6fcb66b9b81f07884f4009d5dd1;p=konrad%2Fqtdeclarative.git parse args earlier Change-Id: Ie0869d3f70d1e898a9b0635e28bcad2e92fa607c Reviewed-on: http://codereview.qt.nokia.com/2718 Reviewed-by: Qt Sanity Bot Reviewed-by: Charles Yin --- diff --git a/src/qmltest/quicktest.cpp b/src/qmltest/quicktest.cpp index 5b700b3..3164d9e 100644 --- a/src/qmltest/quicktest.cpp +++ b/src/qmltest/quicktest.cpp @@ -146,6 +146,10 @@ int quick_test_main(int argc, char **argv, const char *name, quick_test_viewport argv[outargc] = 0; argc = outargc; + // Parse the command-line arguments. + QuickTestResult::parseArgs(argc, argv); + QuickTestResult::setProgramName(name); + // Determine where to look for the test data. if (testPath.isEmpty() && sourceDir) testPath = QString::fromLocal8Bit(sourceDir); @@ -170,9 +174,6 @@ int quick_test_main(int argc, char **argv, const char *name, quick_test_viewport return 1; } - // Parse the command-line arguments. - QuickTestResult::parseArgs(argc, argv); - QuickTestResult::setProgramName(name); // Scan through all of the "tst_*.qml" files and run each of them // in turn with a QDeclarativeView.