mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-29 21:42:32 +02:00
Remove redundant stopExecutor() signal
This commit is contained in:
parent
1c0e0a5e38
commit
24313fbf7e
@ -688,8 +688,7 @@ void RPCConsole::setClientModel(ClientModel *model)
|
|||||||
}
|
}
|
||||||
if (!model) {
|
if (!model) {
|
||||||
// Client model is being set to 0, this means shutdown() is about to be called.
|
// Client model is being set to 0, this means shutdown() is about to be called.
|
||||||
// Make sure we clean up the executor thread
|
thread.quit();
|
||||||
Q_EMIT stopExecutor();
|
|
||||||
thread.wait();
|
thread.wait();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -975,11 +974,8 @@ void RPCConsole::startExecutor()
|
|||||||
// Requests from this object must go to executor
|
// Requests from this object must go to executor
|
||||||
connect(this, &RPCConsole::cmdRequest, executor, &RPCExecutor::request);
|
connect(this, &RPCConsole::cmdRequest, executor, &RPCExecutor::request);
|
||||||
|
|
||||||
// On stopExecutor signal
|
// Make sure executor object is deleted in its own thread
|
||||||
// - quit the Qt event loop in the execution thread
|
connect(&thread, &QThread::finished, executor, &RPCExecutor::deleteLater);
|
||||||
connect(this, &RPCConsole::stopExecutor, &thread, &QThread::quit);
|
|
||||||
// - queue executor for deletion (in execution thread)
|
|
||||||
connect(&thread, &QThread::finished, executor, &RPCExecutor::deleteLater, Qt::DirectConnection);
|
|
||||||
|
|
||||||
// Default implementation of QThread::run() simply spins up an event loop in the thread,
|
// Default implementation of QThread::run() simply spins up an event loop in the thread,
|
||||||
// which is what we want.
|
// which is what we want.
|
||||||
|
@ -132,7 +132,6 @@ public Q_SLOTS:
|
|||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
// For RPC command executor
|
// For RPC command executor
|
||||||
void stopExecutor();
|
|
||||||
void cmdRequest(const QString &command, const WalletModel* wallet_model);
|
void cmdRequest(const QString &command, const WalletModel* wallet_model);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user