From 12aae0aab340f6fcb66b9b81f07884f4009d5dd1 Mon Sep 17 00:00:00 2001 From: Charles Yin Date: Mon, 8 Aug 2011 11:35:48 +1000 Subject: [PATCH] parse args earlier Change-Id: Ie0869d3f70d1e898a9b0635e28bcad2e92fa607c Reviewed-on: http://codereview.qt.nokia.com/2718 Reviewed-by: Qt Sanity Bot Reviewed-by: Charles Yin --- src/qmltest/quicktest.cpp | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) 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. -- 1.7.2.5