File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
src/chrome/test/webdriver Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -283,6 +283,23 @@ int RunChromeDriver() {
283283 base::WaitableEvent shutdown_event (false , false );
284284 CommandLine* cmd_line = CommandLine::ForCurrentProcess ();
285285
286+ #if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
287+ // set default output mode
288+ qInstallMessageHandler (normalMessageOutput);
289+
290+ // check if verbose mode
291+ if (cmd_line->HasSwitch (" verbose" )) {
292+ qInstallMessageHandler (verboseMessageOutput);
293+ }
294+
295+ // check if silence mode
296+ if (cmd_line->HasSwitch (" silence" )) {
297+ std::ostream null_stream (0 );
298+ std::cerr.rdbuf (null_stream.rdbuf ());
299+ std::cout.rdbuf (null_stream.rdbuf ());
300+ qInstallMessageHandler (silentMessageOutput);
301+ }
302+ #else
286303 // set default output mode
287304 qInstallMsgHandler (normalMessageOutput);
288305
@@ -298,6 +315,7 @@ int RunChromeDriver() {
298315 std::cout.rdbuf (null_stream.rdbuf ());
299316 qInstallMsgHandler (silentMessageOutput);
300317 }
318+ #endif
301319
302320// #if defined(OS_POSIX)
303321// signal(SIGPIPE, SIG_IGN);
You can’t perform that action at this time.
0 commit comments