diff options
| author | Hennadii Stepanov <[email protected]> | 2018-10-21 15:10:16 +0300 |
|---|---|---|
| committer | Hennadii Stepanov <[email protected]> | 2019-01-10 01:21:25 +0200 |
| commit | 24313fbf7e3d69145bc18c089601ba7aea35d61c (patch) | |
| tree | c3a74af398cb43db56bcb18103abd5004a36aeda /src | |
| parent | Remove redundant stopThread() signal (diff) | |
| download | discoin-24313fbf7e3d69145bc18c089601ba7aea35d61c.tar.xz discoin-24313fbf7e3d69145bc18c089601ba7aea35d61c.zip | |
Remove redundant stopExecutor() signal
Diffstat (limited to 'src')
| -rw-r--r-- | src/qt/rpcconsole.cpp | 10 | ||||
| -rw-r--r-- | src/qt/rpcconsole.h | 1 |
2 files changed, 3 insertions, 8 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp index d062ea49b..0990370df 100644 --- a/src/qt/rpcconsole.cpp +++ b/src/qt/rpcconsole.cpp @@ -688,8 +688,7 @@ void RPCConsole::setClientModel(ClientModel *model) } if (!model) { // Client model is being set to 0, this means shutdown() is about to be called. - // Make sure we clean up the executor thread - Q_EMIT stopExecutor(); + thread.quit(); thread.wait(); } } @@ -975,11 +974,8 @@ void RPCConsole::startExecutor() // Requests from this object must go to executor connect(this, &RPCConsole::cmdRequest, executor, &RPCExecutor::request); - // On stopExecutor signal - // - quit the Qt event loop in the execution thread - connect(this, &RPCConsole::stopExecutor, &thread, &QThread::quit); - // - queue executor for deletion (in execution thread) - connect(&thread, &QThread::finished, executor, &RPCExecutor::deleteLater, Qt::DirectConnection); + // Make sure executor object is deleted in its own thread + connect(&thread, &QThread::finished, executor, &RPCExecutor::deleteLater); // Default implementation of QThread::run() simply spins up an event loop in the thread, // which is what we want. diff --git a/src/qt/rpcconsole.h b/src/qt/rpcconsole.h index 6c000ba09..79b0f3b19 100644 --- a/src/qt/rpcconsole.h +++ b/src/qt/rpcconsole.h @@ -132,7 +132,6 @@ public Q_SLOTS: Q_SIGNALS: // For RPC command executor - void stopExecutor(); void cmdRequest(const QString &command, const WalletModel* wallet_model); private: |