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:
@@ -10,6 +10,7 @@
|
||||
|
||||
#include <QSet>
|
||||
#include <QTimer>
|
||||
#include <QDebug>
|
||||
|
||||
WalletModel::WalletModel(CWallet *wallet, OptionsModel *optionsModel, QObject *parent) :
|
||||
QObject(parent), wallet(wallet), optionsModel(optionsModel), addressTableModel(0),
|
||||
@@ -111,7 +112,7 @@ void WalletModel::updateTransaction(const QString &hash, int status)
|
||||
}
|
||||
}
|
||||
|
||||
void WalletModel::updateAddressBook(const QString &address, const QString &label,
|
||||
void WalletModel::updateAddressBook(const QString &address, const QString &label,
|
||||
bool isMine, const QString &purpose, int status)
|
||||
{
|
||||
if(addressTableModel)
|
||||
@@ -359,7 +360,7 @@ bool WalletModel::backupWallet(const QString &filename)
|
||||
// Handlers for core signals
|
||||
static void NotifyKeyStoreStatusChanged(WalletModel *walletmodel, CCryptoKeyStore *wallet)
|
||||
{
|
||||
OutputDebugStringF("NotifyKeyStoreStatusChanged\n");
|
||||
qDebug() << "NotifyKeyStoreStatusChanged";
|
||||
QMetaObject::invokeMethod(walletmodel, "updateStatus", Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
@@ -367,21 +368,26 @@ static void NotifyAddressBookChanged(WalletModel *walletmodel, CWallet *wallet,
|
||||
const CTxDestination &address, const std::string &label, bool isMine,
|
||||
const std::string &purpose, ChangeType status)
|
||||
{
|
||||
OutputDebugStringF("NotifyAddressBookChanged %s %s isMine=%i purpose=%s status=%i\n",
|
||||
CBitcoinAddress(address).ToString().c_str(), label.c_str(), isMine, purpose.c_str(), status);
|
||||
QString strAddress = QString::fromStdString(CBitcoinAddress(address).ToString());
|
||||
QString strLabel = QString::fromStdString(label);
|
||||
QString strPurpose = QString::fromStdString(purpose);
|
||||
|
||||
qDebug() << "NotifyAddressBookChanged : " + strAddress + " " + strLabel + " isMine=" + QString::number(isMine) + " purpose=" + strPurpose + " status=" + QString::number(status);
|
||||
QMetaObject::invokeMethod(walletmodel, "updateAddressBook", Qt::QueuedConnection,
|
||||
Q_ARG(QString, QString::fromStdString(CBitcoinAddress(address).ToString())),
|
||||
Q_ARG(QString, QString::fromStdString(label)),
|
||||
Q_ARG(QString, strAddress),
|
||||
Q_ARG(QString, strLabel),
|
||||
Q_ARG(bool, isMine),
|
||||
Q_ARG(QString, QString::fromStdString(purpose)),
|
||||
Q_ARG(QString, strPurpose),
|
||||
Q_ARG(int, status));
|
||||
}
|
||||
|
||||
static void NotifyTransactionChanged(WalletModel *walletmodel, CWallet *wallet, const uint256 &hash, ChangeType status)
|
||||
{
|
||||
OutputDebugStringF("NotifyTransactionChanged %s status=%i\n", hash.GetHex().c_str(), status);
|
||||
QString strHash = QString::fromStdString(hash.GetHex());
|
||||
|
||||
qDebug() << "NotifyTransactionChanged : " + strHash + " status= " + QString::number(status);
|
||||
QMetaObject::invokeMethod(walletmodel, "updateTransaction", Qt::QueuedConnection,
|
||||
Q_ARG(QString, QString::fromStdString(hash.GetHex())),
|
||||
Q_ARG(QString, strHash),
|
||||
Q_ARG(int, status));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user