aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/debugger
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2012-05-07 14:58:26 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-09 02:13:54 +0200
commitf010ac1da4ebdaf7317a6ee718a2eea9eca44c35 (patch)
treed937365f80d7ff213779bd0350fea64323a398e8 /src/qml/debugger
parent645c39e225d07dd6a8e8e756828ddd614da205dc (diff)
Debugger: Use new QtMessageHandler signature
Requires qtbase with change d9a1c2dff8563. Change-Id: I11446479f8d2fce9dc5a8c914f1d1e5e3711fc57 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
Diffstat (limited to 'src/qml/debugger')
-rw-r--r--src/qml/debugger/qdebugmessageservice.cpp10
-rw-r--r--src/qml/debugger/qdebugmessageservice_p.h2
2 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/debugger/qdebugmessageservice.cpp b/src/qml/debugger/qdebugmessageservice.cpp
index d44bbf9268..508c068d24 100644
--- a/src/qml/debugger/qdebugmessageservice.cpp
+++ b/src/qml/debugger/qdebugmessageservice.cpp
@@ -50,7 +50,7 @@ QT_BEGIN_NAMESPACE
Q_GLOBAL_STATIC(QDebugMessageService, qmlDebugMessageService)
void DebugMessageHandler(QtMsgType type, const QMessageLogContext &ctxt,
- const char *buf)
+ const QString &buf)
{
QDebugMessageService::instance()->sendDebugMessage(type, ctxt, buf);
}
@@ -64,7 +64,7 @@ public:
{
}
- QMessageHandler oldMsgHandler;
+ QtMessageHandler oldMsgHandler;
QQmlDebugService::State prevState;
QMutex initMutex;
};
@@ -91,7 +91,7 @@ QDebugMessageService *QDebugMessageService::instance()
void QDebugMessageService::sendDebugMessage(QtMsgType type,
const QMessageLogContext &ctxt,
- const char *buf)
+ const QString &buf)
{
Q_D(QDebugMessageService);
@@ -100,7 +100,7 @@ void QDebugMessageService::sendDebugMessage(QtMsgType type,
//only if a client is connected to it.
QByteArray message;
QQmlDebugStream ws(&message, QIODevice::WriteOnly);
- ws << QByteArray("MESSAGE") << type << QString::fromLocal8Bit(buf).toUtf8();
+ ws << QByteArray("MESSAGE") << type << buf.toUtf8();
ws << QString::fromLatin1(ctxt.file).toUtf8();
ws << ctxt.line << QString::fromLatin1(ctxt.function).toUtf8();
@@ -115,7 +115,7 @@ void QDebugMessageService::stateChanged(State state)
QMutexLocker lock(&d->initMutex);
if (state != Enabled && d->prevState == Enabled) {
- QMessageHandler handler = qInstallMessageHandler(d->oldMsgHandler);
+ QtMessageHandler handler = qInstallMessageHandler(d->oldMsgHandler);
// has our handler been overwritten in between?
if (handler != DebugMessageHandler)
qInstallMessageHandler(handler);
diff --git a/src/qml/debugger/qdebugmessageservice_p.h b/src/qml/debugger/qdebugmessageservice_p.h
index 88b918e217..eac928827e 100644
--- a/src/qml/debugger/qdebugmessageservice_p.h
+++ b/src/qml/debugger/qdebugmessageservice_p.h
@@ -74,7 +74,7 @@ public:
static QDebugMessageService *instance();
void sendDebugMessage(QtMsgType type, const QMessageLogContext &ctxt,
- const char *buf);
+ const QString &buf);
protected:
void stateChanged(State);