diff options
| author | commit-queue <commit-queue@webkit.org> | 2012-09-28 10:35:11 +0000 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-17 08:57:45 +0200 |
| commit | d45ff9df96f475d5ae3b68eb709278eac93e6a92 (patch) | |
| tree | ff2e8d487411d28c8970b1146f75879d32f01677 /Tools | |
| parent | b297e0fa5c217c9467033b7c8b46891a52870120 (diff) | |
| download | qtwebkit-d45ff9df96f475d5ae3b68eb709278eac93e6a92.tar.gz | |
Source/WebKit2: [Qt] Use qInstallMessageHandler() https://bugs.webkit.org/show_bug.cgi?id=96648
Patch by Kai Koehne <kai.koehne@digia.com> on 2012-09-28
Reviewed by Jocelyn Turcotte.
qInstallMsgHandler() got deprecated in Qt 5.
* PluginProcess/qt/PluginProcessMainQt.cpp:
(WebKit::messageHandler):
(WebKit::PluginProcessMain):
* UIProcess/API/qt/tests/util.cpp:
(messageHandler):
(suppressDebugOutput):
* qt/MainQt.cpp:
(messageHandler):
(main):
Tools: [Qt] Use qInstallMessageHandler()
https://bugs.webkit.org/show_bug.cgi?id=96648
Patch by Kai Koehne <kai.koehne@digia.com> on 2012-09-28
Reviewed by Jocelyn Turcotte.
qInstallMsgHandler() got deprecated in Qt 5.
* DumpRenderTree/qt/DumpRenderTreeMain.cpp:
(messageHandler):
(main):
* WebKitTestRunner/qt/main.cpp:
(messageHandler):
(main):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129870 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Diffstat (limited to 'Tools')
| -rw-r--r-- | Tools/DumpRenderTree/qt/DumpRenderTreeMain.cpp | 6 | ||||
| -rw-r--r-- | Tools/WebKitTestRunner/qt/main.cpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Tools/DumpRenderTree/qt/DumpRenderTreeMain.cpp b/Tools/DumpRenderTree/qt/DumpRenderTreeMain.cpp index f5e7fc159..1baae7cb8 100644 --- a/Tools/DumpRenderTree/qt/DumpRenderTreeMain.cpp +++ b/Tools/DumpRenderTree/qt/DumpRenderTreeMain.cpp @@ -57,10 +57,10 @@ #include <wtf/Assertions.h> -void messageHandler(QtMsgType type, const char *message) +void messageHandler(QtMsgType type, const QMessageLogContext&, const QString &message) { if (type == QtCriticalMsg) { - fprintf(stderr, "%s\n", message); + fprintf(stderr, "%s\n", qPrintable(message)); return; } // do nothing @@ -113,7 +113,7 @@ int main(int argc, char* argv[]) // Has to be done before QApplication is constructed in case // QApplication itself produces debug output. if (suppressQtDebugOutput) - qInstallMsgHandler(messageHandler); + qInstallMessageHandler(messageHandler); WebKit::initializeTestFonts(); diff --git a/Tools/WebKitTestRunner/qt/main.cpp b/Tools/WebKitTestRunner/qt/main.cpp index d7abf16e6..31b750681 100644 --- a/Tools/WebKitTestRunner/qt/main.cpp +++ b/Tools/WebKitTestRunner/qt/main.cpp @@ -74,10 +74,10 @@ static void sigcontHandler(int) } #endif -void messageHandler(QtMsgType type, const char* message) +void messageHandler(QtMsgType type, const QMessageLogContext&, const QString& message) { if (type == QtCriticalMsg) { - fprintf(stderr, "%s\n", message); + fprintf(stderr, "%s\n", qPrintable(message)); return; } @@ -112,7 +112,7 @@ int main(int argc, char** argv) // Has to be done before QApplication is constructed in case // QApplication itself produces debug output. if (suppressQtDebugOutput) { - qInstallMsgHandler(messageHandler); + qInstallMessageHandler(messageHandler); if (qgetenv("QT_WEBKIT_SUPPRESS_WEB_PROCESS_OUTPUT").isEmpty()) qputenv("QT_WEBKIT_SUPPRESS_WEB_PROCESS_OUTPUT", "1"); } |
