Bug 71295 - [Qt][WK2] Make API tests less noisy
Summary: [Qt][WK2] Make API tests less noisy
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All Linux
: P3 Normal
Assignee: Andras Becsi
URL:
Keywords: Qt
Depends on:
Blocks:
 
Reported: 2011-11-01 10:02 PDT by Andras Becsi
Modified: 2011-11-01 11:37 PDT (History)
3 users (show)

See Also:


Attachments
proposed patch (5.54 KB, patch)
2011-11-01 10:04 PDT, Andras Becsi
hausmann: review-
hausmann: commit-queue-
Details | Formatted Diff | Diff
proposed patch (5.51 KB, patch)
2011-11-01 10:52 PDT, Andras Becsi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andras Becsi 2011-11-01 10:02:12 PDT
Qt5 currently prints a lot of debug messages similar to:

No platform plugin argument was specified, defaulting to "xcb".
No platform plugin argument was specified, defaulting to "xcb".
Successfully connected to display :7.0
Successfully connected to display :7.0

Information of screen 253:
  width.........: 1024
  height........: 768
  depth.........: 24
  white pixel...: ffffff
  black pixel...: 0


Information of screen 253:
  width.........: 1024
  height........: 768
  depth.........: 24
  white pixel...: ffffff
  black pixel...: 0

QIBusPlatformInputContext: ibus config file '/home/webkitbuildbot/.config/ibus/bus/124cb6f3e543db1073af49560001668c-unix-7' does not exist.
QIBusPlatformInputContext: not connected.

Suppress these in the API tests to make the output less messy.
Comment 1 Andras Becsi 2011-11-01 10:04:32 PDT
Created attachment 113181 [details]
proposed patch
Comment 2 Simon Hausmann 2011-11-01 10:25:36 PDT
Comment on attachment 113181 [details]
proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=113181&action=review

r- due to style :). Looks good otherwise.

> Source/WebKit2/UIProcess/API/qt/tests/util.h:33
> +#define SUPPRESS_DEBUG_OUTPUT \

Style guide says that this macro should be named like a function and have parentheses at the end. But ... why not simply make it an actual function that's implemented in util.cpp? (instead of "exporting" messageHandler)
Comment 3 Andras Becsi 2011-11-01 10:52:59 PDT
Created attachment 113194 [details]
proposed patch
Comment 4 Simon Hausmann 2011-11-01 10:58:17 PDT
Comment on attachment 113194 [details]
proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=113194&action=review

r=me but add the missing "static" keyword when landing I'd say :)

> Source/WebKit2/UIProcess/API/qt/tests/util.cpp:53
> +void messageHandler(QtMsgType type, const char* message)

This method should be static.
Comment 5 Andras Becsi 2011-11-01 11:32:43 PDT
Committed r98983: <http://trac.webkit.org/changeset/98983>
Comment 6 Andras Becsi 2011-11-01 11:37:11 PDT
Comment on attachment 113194 [details]
proposed patch

Clearing flags.