Bitcoin-Qt: Use qDebug() for printing to debug.log

- removes all usages of PrintDebugStringF from Qt code
- ensure same format for all debug.log messages "functionname : Message"
This commit is contained in:
Philip Kaufmann
2013-09-04 11:52:45 +02:00
parent d22d9753cc
commit 42018eff07
7 changed files with 67 additions and 52 deletions

View File

@@ -13,6 +13,7 @@
#include <QDateTime>
#include <QTimer>
#include <QDebug>
static const int64 nClientStartupTime = GetTime();
@@ -180,14 +181,14 @@ static void NotifyBlocksChanged(ClientModel *clientmodel)
static void NotifyNumConnectionsChanged(ClientModel *clientmodel, int newNumConnections)
{
// Too noisy: OutputDebugStringF("NotifyNumConnectionsChanged %i\n", newNumConnections);
// Too noisy: qDebug() << "NotifyNumConnectionsChanged : " + QString::number(newNumConnections);
QMetaObject::invokeMethod(clientmodel, "updateNumConnections", Qt::QueuedConnection,
Q_ARG(int, newNumConnections));
}
static void NotifyAlertChanged(ClientModel *clientmodel, const uint256 &hash, ChangeType status)
{
OutputDebugStringF("NotifyAlertChanged %s status=%i\n", hash.GetHex().c_str(), status);
qDebug() << "NotifyAlertChanged : " + QString::fromStdString(hash.GetHex()) + " status=" + QString::number(status);
QMetaObject::invokeMethod(clientmodel, "updateAlert", Qt::QueuedConnection,
Q_ARG(QString, QString::fromStdString(hash.GetHex())),
Q_ARG(int, status));