diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-07-14 19:03:42 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-07-14 21:54:31 +0300 |
commit | dbcf56b6c6e939923673b3f07bed7bb3632dbeb1 (patch) | |
tree | 09dab47ccc77796a4960ca9b658a37a329ee6858 /src/qt | |
parent | 19a1d008310f250b69b7aa764a9f26384d5a4a85 (diff) |
scripted-diff: Rename BitcoinCore class to InitExecutor
-BEGIN VERIFY SCRIPT-
sed -i -e 's/BitcoinCore/InitExecutor/g' src/qt/bitcoin.*
-END VERIFY SCRIPT-
Diffstat (limited to 'src/qt')
-rw-r--r-- | src/qt/bitcoin.cpp | 20 | ||||
-rw-r--r-- | src/qt/bitcoin.h | 8 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index e5caafe290..dae56aa56c 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -155,14 +155,14 @@ void DebugMessageHandler(QtMsgType type, const QMessageLogContext& context, cons } } -BitcoinCore::BitcoinCore(interfaces::Node& node) : +InitExecutor::InitExecutor(interfaces::Node& node) : QObject(), m_node(node) { this->moveToThread(&m_thread); m_thread.start(); } -BitcoinCore::~BitcoinCore() +InitExecutor::~InitExecutor() { qDebug() << __func__ << ": Stopping thread"; m_thread.quit(); @@ -170,13 +170,13 @@ BitcoinCore::~BitcoinCore() qDebug() << __func__ << ": Stopped thread"; } -void BitcoinCore::handleRunawayException(const std::exception *e) +void InitExecutor::handleRunawayException(const std::exception *e) { PrintExceptionContinue(e, "Runaway exception"); Q_EMIT runawayException(QString::fromStdString(m_node.getWarnings().translated)); } -void BitcoinCore::initialize() +void InitExecutor::initialize() { try { @@ -192,7 +192,7 @@ void BitcoinCore::initialize() } } -void BitcoinCore::shutdown() +void InitExecutor::shutdown() { try { @@ -298,11 +298,11 @@ void BitcoinApplication::startThread() m_executor.emplace(node()); /* communication to and from thread */ - connect(&m_executor.value(), &BitcoinCore::initializeResult, this, &BitcoinApplication::initializeResult); - connect(&m_executor.value(), &BitcoinCore::shutdownResult, this, &BitcoinApplication::shutdownResult); - connect(&m_executor.value(), &BitcoinCore::runawayException, this, &BitcoinApplication::handleRunawayException); - connect(this, &BitcoinApplication::requestedInitialize, &m_executor.value(), &BitcoinCore::initialize); - connect(this, &BitcoinApplication::requestedShutdown, &m_executor.value(), &BitcoinCore::shutdown); + connect(&m_executor.value(), &InitExecutor::initializeResult, this, &BitcoinApplication::initializeResult); + connect(&m_executor.value(), &InitExecutor::shutdownResult, this, &BitcoinApplication::shutdownResult); + connect(&m_executor.value(), &InitExecutor::runawayException, this, &BitcoinApplication::handleRunawayException); + connect(this, &BitcoinApplication::requestedInitialize, &m_executor.value(), &InitExecutor::initialize); + connect(this, &BitcoinApplication::requestedShutdown, &m_executor.value(), &InitExecutor::shutdown); } void BitcoinApplication::parameterSetup() diff --git a/src/qt/bitcoin.h b/src/qt/bitcoin.h index d977062d6b..d3ef809582 100644 --- a/src/qt/bitcoin.h +++ b/src/qt/bitcoin.h @@ -32,12 +32,12 @@ class WalletModel; /** Class encapsulating Bitcoin Core startup and shutdown. * Allows running startup and shutdown in a different thread from the UI thread. */ -class BitcoinCore: public QObject +class InitExecutor: public QObject { Q_OBJECT public: - explicit BitcoinCore(interfaces::Node& node); - ~BitcoinCore(); + explicit InitExecutor(interfaces::Node& node); + ~InitExecutor(); public Q_SLOTS: void initialize(); @@ -117,7 +117,7 @@ Q_SIGNALS: void windowShown(BitcoinGUI* window); private: - std::optional<BitcoinCore> m_executor; + std::optional<InitExecutor> m_executor; OptionsModel *optionsModel; ClientModel *clientModel; BitcoinGUI *window; |