aboutsummaryrefslogtreecommitdiff
path: root/src/qt/rpcconsole.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-04-21 00:13:12 +0200
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2022-04-21 13:35:59 +0200
commitfdf72859504d063d0a6b60a6dac5ad170bd86440 (patch)
tree8bbf7e2c014bd5ea56b0ab2a9b70dc926c6e6826 /src/qt/rpcconsole.cpp
parent61457c179aec23227dcf3952c575052204103b50 (diff)
downloadbitcoin-fdf72859504d063d0a6b60a6dac5ad170bd86440.tar.xz
refactor: Make `RPCExecutor*` a member of the `RPCConsole` class
Diffstat (limited to 'src/qt/rpcconsole.cpp')
-rw-r--r--src/qt/rpcconsole.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index eb69fabe89..337e744da8 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -1091,11 +1091,11 @@ void RPCConsole::browseHistory(int offset)
void RPCConsole::startExecutor()
{
- RPCExecutor *executor = new RPCExecutor(m_node);
- executor->moveToThread(&thread);
+ m_executor = new RPCExecutor(m_node);
+ m_executor->moveToThread(&thread);
// Replies from executor object must go to this object
- connect(executor, &RPCExecutor::reply, this, [this](int category, const QString& command) {
+ connect(m_executor, &RPCExecutor::reply, this, [this](int category, const QString& command) {
// Remove "Executing…" message.
ui->messagesWidget->undo();
message(category, command);
@@ -1104,15 +1104,15 @@ void RPCConsole::startExecutor()
});
// Requests from this object must go to executor
- connect(this, &RPCConsole::cmdRequest, executor, &RPCExecutor::request);
+ connect(this, &RPCConsole::cmdRequest, m_executor, &RPCExecutor::request);
// Make sure executor object is deleted in its own thread
- connect(&thread, &QThread::finished, executor, &RPCExecutor::deleteLater);
+ connect(&thread, &QThread::finished, m_executor, &RPCExecutor::deleteLater);
// Default implementation of QThread::run() simply spins up an event loop in the thread,
// which is what we want.
thread.start();
- QTimer::singleShot(0, executor, []() {
+ QTimer::singleShot(0, m_executor, []() {
util::ThreadRename("qt-rpcconsole");
});
}