diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index b85b72cf4d..496adc56ff 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -150,8 +150,8 @@ void BitcoinCore::initialize() { try { - qDebug() << __func__ << ": Running initialization in thread"; util::ThreadRename("qt-init"); + qDebug() << __func__ << ": Running initialization in thread"; interfaces::BlockAndHeaderTipInfo tip_info; bool rv = m_node.appInitMain(&tip_info); Q_EMIT initializeResult(rv, tip_info); diff --git a/src/qt/clientmodel.cpp b/src/qt/clientmodel.cpp index 10e4b7125a..5fde728735 100644 --- a/src/qt/clientmodel.cpp +++ b/src/qt/clientmodel.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -58,6 +59,9 @@ ClientModel::ClientModel(interfaces::Node& node, OptionsModel *_optionsModel, QO // move timer to thread so that polling doesn't disturb main event loop timer->moveToThread(m_thread); m_thread->start(); + QTimer::singleShot(0, timer, []() { + util::ThreadRename("qt-clientmodl"); + }); subscribeToCoreSignals(); } diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index 9508c25e47..72c08e9ced 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -1119,6 +1120,9 @@ void RPCConsole::startExecutor() // 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, []() { + util::ThreadRename("qt-rpcconsole"); + }); } void RPCConsole::on_stackedWidgetRPC_currentChanged(int index) diff --git a/src/qt/walletcontroller.cpp b/src/qt/walletcontroller.cpp index d01f60ec84..bf38880d98 100644 --- a/src/qt/walletcontroller.cpp +++ b/src/qt/walletcontroller.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -46,6 +47,9 @@ WalletController::WalletController(ClientModel& client_model, QObject* parent) m_activity_worker->moveToThread(m_activity_thread); m_activity_thread->start(); + QTimer::singleShot(0, m_activity_worker, []() { + util::ThreadRename("qt-walletctrl"); + }); } // Not using the default destructor because not all member types definitions are