Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoin.cpp
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | |||||
// Declare meta types used for QMetaObject::invokeMethod | // Declare meta types used for QMetaObject::invokeMethod | ||||
Q_DECLARE_METATYPE(bool *) | Q_DECLARE_METATYPE(bool *) | ||||
Q_DECLARE_METATYPE(Amount) | Q_DECLARE_METATYPE(Amount) | ||||
// Config is non-copyable so we can only register pointers to it | // Config is non-copyable so we can only register pointers to it | ||||
Q_DECLARE_METATYPE(Config *) | Q_DECLARE_METATYPE(Config *) | ||||
static void InitMessage(const std::string &message) { | static void InitMessage(const std::string &message) { | ||||
LogPrintf("init message: %s\n", message); | LogPrint(BCLog::QT, "init message: %s\n", message); | ||||
} | } | ||||
/** | /** | ||||
* Translate string to current locale using Qt. | * Translate string to current locale using Qt. | ||||
*/ | */ | ||||
static std::string Translate(const char *psz) { | static std::string Translate(const char *psz) { | ||||
return QCoreApplication::translate("bitcoin-abc", psz).toStdString(); | return QCoreApplication::translate("bitcoin-abc", psz).toStdString(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | |||||
/* qDebug() message handler --> debug.log */ | /* qDebug() message handler --> debug.log */ | ||||
void DebugMessageHandler(QtMsgType type, const QMessageLogContext &context, | void DebugMessageHandler(QtMsgType type, const QMessageLogContext &context, | ||||
const QString &msg) { | const QString &msg) { | ||||
Q_UNUSED(context); | Q_UNUSED(context); | ||||
if (type == QtDebugMsg) { | if (type == QtDebugMsg) { | ||||
LogPrint(BCLog::QT, "GUI: %s\n", msg.toStdString()); | LogPrint(BCLog::QT, "GUI: %s\n", msg.toStdString()); | ||||
} else { | } else { | ||||
LogPrintf("GUI: %s\n", msg.toStdString()); | LogPrint(BCLog::QT, "GUI: %s\n", msg.toStdString()); | ||||
} | } | ||||
} | } | ||||
/** | /** | ||||
* Class encapsulating Bitcoin ABC startup and shutdown. | * Class encapsulating Bitcoin ABC startup and shutdown. | ||||
* Allows running startup and shutdown in a different thread from the UI thread. | * Allows running startup and shutdown in a different thread from the UI thread. | ||||
*/ | */ | ||||
class BitcoinABC : public QObject { | class BitcoinABC : public QObject { | ||||
▲ Show 20 Lines • Show All 636 Lines • Show Last 20 Lines |