diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2010-02-15 09:53:06 (GMT) |
---|---|---|
committer | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2010-02-15 12:41:03 (GMT) |
commit | cae3c016afa72b4d6285d1efefddca4700239eee (patch) | |
tree | 35acfccef264e1b9db799111e1851834cbdf10b6 /src/testlib | |
parent | 57e94c1b1bf68fde430cecc138f395decf35e917 (diff) | |
download | Qt-cae3c016afa72b4d6285d1efefddca4700239eee.zip Qt-cae3c016afa72b4d6285d1efefddca4700239eee.tar.gz Qt-cae3c016afa72b4d6285d1efefddca4700239eee.tar.bz2 |
Make it possible to run benchmarks with the "-graphicssystem" switch.
Problem was that the "-graphicssystem" switch were not recognized as a valid
benchmark option so the test failed to execute with the following
warning: "Unknown option: "-graphicssystem"". We have to pass it through
to QApplication, in the same fashion as we do for "-qws".
Reviewed-by: jasplin
Diffstat (limited to 'src/testlib')
-rw-r--r-- | src/testlib/qtestcase.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index ecdcca8..a44ae06 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -1113,6 +1113,14 @@ static void qParseArgs(int argc, char *argv[]) #endif } else if (strcmp(argv[i], "-qws") == 0) { // do nothing + } else if (strcmp(argv[i], "-graphicssystem") == 0) { + // do nothing + if (i + 1 >= argc) { + printf("-graphicssystem needs an extra parameter specifying the graphics system\n"); + exit(1); + } else { + ++i; + } } else if (argv[i][0] == '-') { printf("Unknown option: '%s'\n\n%s", argv[i], testOptions); exit(1); |