diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2013-09-04 11:52:45 +0200 |
---|---|---|
committer | Philip Kaufmann <phil.kaufmann@t-online.de> | 2013-09-06 10:32:07 +0200 |
commit | 42018eff07d235930ca91fa9e76e7ac128183438 (patch) | |
tree | e90e584fb8643d63ee9c6083599b29b0ed48bded /src/qt/walletmodel.cpp | |
parent | d22d9753cc7175a7cf0ce440b96d83277747ecb9 (diff) |
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"
Diffstat (limited to 'src/qt/walletmodel.cpp')
-rw-r--r-- | src/qt/walletmodel.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/qt/walletmodel.cpp b/src/qt/walletmodel.cpp index 2d3a6975e4..1dcecbe60b 100644 --- a/src/qt/walletmodel.cpp +++ b/src/qt/walletmodel.cpp @@ -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)); } |