Changeset View
Changeset View
Standalone View
Standalone View
src/qt/rpcconsole.cpp
Show All 15 Lines | |||||
#include <qt/clientmodel.h> | #include <qt/clientmodel.h> | ||||
#include <qt/forms/ui_debugwindow.h> | #include <qt/forms/ui_debugwindow.h> | ||||
#include <qt/platformstyle.h> | #include <qt/platformstyle.h> | ||||
#include <qt/walletmodel.h> | #include <qt/walletmodel.h> | ||||
#include <rpc/client.h> | #include <rpc/client.h> | ||||
#include <rpc/server.h> | #include <rpc/server.h> | ||||
#include <util/strencodings.h> | #include <util/strencodings.h> | ||||
#include <util/system.h> | #include <util/system.h> | ||||
#include <util/threadnames.h> | |||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
#include <wallet/bdb.h> | #include <wallet/bdb.h> | ||||
#include <wallet/db.h> | #include <wallet/db.h> | ||||
#include <wallet/wallet.h> | #include <wallet/wallet.h> | ||||
#endif | #endif | ||||
#include <univalue.h> | #include <univalue.h> | ||||
▲ Show 20 Lines • Show All 1,098 Lines • ▼ Show 20 Lines | void RPCConsole::startExecutor() { | ||||
connect(this, &RPCConsole::cmdRequest, executor, &RPCExecutor::request); | connect(this, &RPCConsole::cmdRequest, executor, &RPCExecutor::request); | ||||
// Make sure executor object is deleted in its own thread | // Make sure executor object is deleted in its own thread | ||||
connect(&thread, &QThread::finished, executor, &RPCExecutor::deleteLater); | connect(&thread, &QThread::finished, executor, &RPCExecutor::deleteLater); | ||||
// Default implementation of QThread::run() simply spins up an event loop in | // Default implementation of QThread::run() simply spins up an event loop in | ||||
// the thread, which is what we want. | // the thread, which is what we want. | ||||
thread.start(); | thread.start(); | ||||
QTimer::singleShot(0, executor, | |||||
[]() { util::ThreadRename("qt-rpcconsole"); }); | |||||
} | } | ||||
void RPCConsole::on_tabWidget_currentChanged(int index) { | void RPCConsole::on_tabWidget_currentChanged(int index) { | ||||
if (ui->tabWidget->widget(index) == ui->tab_console) { | if (ui->tabWidget->widget(index) == ui->tab_console) { | ||||
ui->lineEdit->setFocus(); | ui->lineEdit->setFocus(); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 343 Lines • Show Last 20 Lines |