Skip to content

Commit 24313fb

Browse files
committed
Remove redundant stopExecutor() signal
1 parent 1c0e0a5 commit 24313fb

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/qt/rpcconsole.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -688,8 +688,7 @@ void RPCConsole::setClientModel(ClientModel *model)
688688
}
689689
if (!model) {
690690
// Client model is being set to 0, this means shutdown() is about to be called.
691-
// Make sure we clean up the executor thread
692-
Q_EMIT stopExecutor();
691+
thread.quit();
693692
thread.wait();
694693
}
695694
}
@@ -975,11 +974,8 @@ void RPCConsole::startExecutor()
975974
// Requests from this object must go to executor
976975
connect(this, &RPCConsole::cmdRequest, executor, &RPCExecutor::request);
977976

978-
// On stopExecutor signal
979-
// - quit the Qt event loop in the execution thread
980-
connect(this, &RPCConsole::stopExecutor, &thread, &QThread::quit);
981-
// - queue executor for deletion (in execution thread)
982-
connect(&thread, &QThread::finished, executor, &RPCExecutor::deleteLater, Qt::DirectConnection);
977+
// Make sure executor object is deleted in its own thread
978+
connect(&thread, &QThread::finished, executor, &RPCExecutor::deleteLater);
983979

984980
// Default implementation of QThread::run() simply spins up an event loop in the thread,
985981
// which is what we want.

src/qt/rpcconsole.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ public Q_SLOTS:
132132

133133
Q_SIGNALS:
134134
// For RPC command executor
135-
void stopExecutor();
136135
void cmdRequest(const QString &command, const WalletModel* wallet_model);
137136

138137
private:

0 commit comments

Comments
 (0)