Skip to content

Commit

Permalink
DebugMessageService: Remove unneeded data
Browse files Browse the repository at this point in the history
Do not send version info of QMessageLogContext.

Change-Id: I32dd4a548ee2b918e5d04dcdffd4d5545fd2f54f
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
  • Loading branch information
Aurindam Jana authored and Qt by Nokia committed Feb 22, 2012
1 parent 5b3d57e commit fcae81c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/declarative/debugger/qdebugmessageservice.cpp
Expand Up @@ -95,7 +95,7 @@ void QDebugMessageService::sendDebugMessage(QtMsgType type,
QByteArray message;
QDataStream ws(&message, QIODevice::WriteOnly);
ws << QByteArray("MESSAGE") << type << QString::fromLocal8Bit(buf).toUtf8();
ws << ctxt.version << QString::fromLatin1(ctxt.file).toUtf8();
ws << QString::fromLatin1(ctxt.file).toUtf8();
ws << ctxt.line << QString::fromLatin1(ctxt.function).toUtf8();

sendMessage(message);
Expand Down
Expand Up @@ -81,7 +81,6 @@ struct LogEntry {

QtMsgType type;
QString message;
int version;
int line;
QString file;
QString function;
Expand Down Expand Up @@ -136,18 +135,16 @@ void QDeclarativeDebugMsgClient::messageReceived(const QByteArray &data)
QByteArray file;
QByteArray function;
int line;
int version;
ds >> type >> message >> version >> file >> line >> function;
ds >> type >> message >> file >> line >> function;
QVERIFY(ds.atEnd());

QVERIFY(type >= QtDebugMsg);
QVERIFY(type <= QtFatalMsg);

LogEntry entry((QtMsgType)type, QString::fromUtf8(message));
entry.line = line;
entry.version = version;
entry.file = QString::fromLatin1(file);
entry.function = QString::fromLatin1(function);
entry.file = QString::fromUtf8(file);
entry.function = QString::fromUtf8(function);
logBuffer << entry;
emit debugOutput();
} else {
Expand Down

0 comments on commit fcae81c

Please sign in to comment.