Fixed a nasty drone crash caused by incorrect usage of qPrintable() in a QtMsgHandler

This commit is contained in:
Srivats P. 2014-06-22 10:43:54 +05:30
parent 4b19d8e1e7
commit 584362406e

View File

@ -307,7 +307,9 @@ void RpcConnection::connIdMsgHandler(QtMsgType type, const char* msg)
QString newMsg(*connId.localData());
newMsg.append(msg);
newMsg.replace(QChar('\n'), QString("\n").append(*connId.localData()));
msg = qPrintable(newMsg);
fprintf(stderr, "%s\n", qPrintable(newMsg));
fflush(stderr);
return;
}
fprintf(stderr, "%s\n", msg);