Changeset 96417 in webkit
- Timestamp:
- Sep 30, 2011 1:05:20 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r96413 r96417 1 2011-09-30 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> 2 3 [Qt] Prevent qDebug() output from DRT and WTR unless --verbose 4 5 For DRT we didn't install the message handler early enough to 6 catch output while constructing the QApplication. For WTR we 7 didn't even install a message handler. 8 9 Since the UI process will forward any output from the web process 10 we set an environment variable QT_WEBKIT_SUPPRESS_WEB_PROCESS_OUTPUT 11 in WTR before the web process is started. This is picked up by the 12 web process which installs its own message handler. 13 14 The environment variable can be overriden on the command line if you 15 want to see output from the web process, or you can pass --verbose to 16 WTR to see output from both processes. 17 18 https://bugs.webkit.org/show_bug.cgi?id=69132 19 20 Reviewed by Andreas Kling. 21 22 * WebProcess/qt/WebProcessMainQt.cpp: 23 1 24 2011-09-30 Anders Carlsson <andersca@apple.com> 2 25 -
trunk/Source/WebKit2/WebProcess/qt/WebProcessMainQt.cpp
r95901 r96417 131 131 } 132 132 133 void messageHandler(QtMsgType type, const char* message) 134 { 135 if (type == QtCriticalMsg) { 136 fprintf(stderr, "%s\n", message); 137 return; 138 } 139 140 // Do nothing 141 } 142 133 143 Q_DECL_EXPORT int WebProcessMainQt(int argc, char** argv) 134 144 { 145 // Has to be done before QApplication is constructed in case 146 // QApplication itself produces debug output. 147 QByteArray suppressOutput = qgetenv("QT_WEBKIT_SUPPRESS_WEB_PROCESS_OUTPUT"); 148 if (!suppressOutput.isEmpty() && suppressOutput != "0") 149 qInstallMsgHandler(messageHandler); 150 135 151 QApplication::setGraphicsSystem(QLatin1String("raster")); 136 152 QApplication* app = new QApplication(argc, argv); -
trunk/Tools/ChangeLog
r96416 r96417 1 2011-09-30 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> 2 3 [Qt] Prevent qDebug() output from DRT and WTR unless --verbose 4 5 For DRT we didn't install the message handler early enough to 6 catch output while constructing the QApplication. For WTR we 7 didn't even install a message handler. 8 9 Since the UI process will forward any output from the web process 10 we set an environment variable QT_WEBKIT_SUPPRESS_WEB_PROCESS_OUTPUT 11 in WTR before the web process is started. This is picked up by the 12 web process which installs its own message handler. 13 14 The environment variable can be overriden on the command line if you 15 want to see output from the web process, or you can pass --verbose to 16 WTR to see output from both processes. 17 18 https://bugs.webkit.org/show_bug.cgi?id=69132 19 20 Reviewed by Andreas Kling. 21 22 * DumpRenderTree/qt/main.cpp: 23 * WebKitTestRunner/qt/main.cpp: 24 1 25 2011-09-30 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> 2 26 -
trunk/Tools/DumpRenderTree/qt/main.cpp
r95729 r96417 137 137 #endif 138 138 139 // Suppress debug output from Qt if not started with -v 140 bool suppressQtDebugOutput = true; 141 for (int i = 1; i < argc; ++i) { 142 if (!qstrcmp(argv[i], "-v")) { 143 suppressQtDebugOutput = false; 144 break; 145 } 146 } 147 148 // Has to be done before QApplication is constructed in case 149 // QApplication itself produces debug output. 150 if (suppressQtDebugOutput) 151 qInstallMsgHandler(messageHandler); 152 139 153 #ifdef Q_WS_X11 140 154 FcInit(); … … 178 192 179 193 QStringList args = app.arguments(); 180 if (args.count() < 2) {194 if (args.count() < (!suppressQtDebugOutput ? 3 : 2)) { 181 195 printUsage(); 182 196 exit(1); … … 186 200 args.removeAt(0); 187 201 188 // Suppress debug output from Qt if not started with -v189 int index = args.indexOf(QLatin1String("-v"));190 if (index == -1)191 qInstallMsgHandler(messageHandler);192 else193 args.removeAt(index);194 195 202 WebCore::DumpRenderTree dumper; 196 203 197 in dex = args.indexOf(QLatin1String("--pixel-tests"));204 int index = args.indexOf(QLatin1String("--pixel-tests")); 198 205 if (index != -1) { 199 206 dumper.setDumpPixels(true); -
trunk/Tools/WebKitTestRunner/qt/main.cpp
r81135 r96417 61 61 }; 62 62 63 void messageHandler(QtMsgType type, const char* message) 64 { 65 if (type == QtCriticalMsg) { 66 fprintf(stderr, "%s\n", message); 67 return; 68 } 69 70 // Do nothing 71 } 72 63 73 int main(int argc, char** argv) 64 74 { 75 // Suppress debug output from Qt if not started with --verbose 76 bool suppressQtDebugOutput = true; 77 for (int i = 1; i < argc; ++i) { 78 if (!qstrcmp(argv[i], "--verbose")) { 79 suppressQtDebugOutput = false; 80 break; 81 } 82 } 83 84 // Has to be done before QApplication is constructed in case 85 // QApplication itself produces debug output. 86 if (suppressQtDebugOutput) { 87 qInstallMsgHandler(messageHandler); 88 if (qgetenv("QT_WEBKIT_SUPPRESS_WEB_PROCESS_OUTPUT").isEmpty()) 89 qputenv("QT_WEBKIT_SUPPRESS_WEB_PROCESS_OUTPUT", "1"); 90 } 91 65 92 QApplication app(argc, argv); 66 93 Launcher launcher(argc, argv);
Note: See TracChangeset
for help on using the changeset viewer.