aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoin.cpp
diff options
context:
space:
mode:
authorHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2018-09-18 01:17:22 +0300
committerHennadii Stepanov <32963518+hebasto@users.noreply.github.com>2019-01-10 01:21:18 +0200
commit1c0e0a5e38102a67cb66cf6eef4098bdb64bb0f5 (patch)
treedcbac450d88cea65cd0cf1d57daf2642022d7178 /src/qt/bitcoin.cpp
parent5da08e0ac51682376767d823e76d2a92c61a5d97 (diff)
downloadbitcoin-1c0e0a5e38102a67cb66cf6eef4098bdb64bb0f5.tar.xz
Remove redundant stopThread() signal
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r--src/qt/bitcoin.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 6e08dae3c4..050c1071de 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -212,7 +212,7 @@ BitcoinApplication::~BitcoinApplication()
if(coreThread)
{
qDebug() << __func__ << ": Stopping thread";
- Q_EMIT stopThread();
+ coreThread->quit();
coreThread->wait();
qDebug() << __func__ << ": Stopped thread";
}
@@ -279,8 +279,7 @@ void BitcoinApplication::startThread()
connect(this, &BitcoinApplication::requestedInitialize, executor, &BitcoinCore::initialize);
connect(this, &BitcoinApplication::requestedShutdown, executor, &BitcoinCore::shutdown);
/* make sure executor object is deleted in its own thread */
- connect(this, &BitcoinApplication::stopThread, executor, &QObject::deleteLater);
- connect(this, &BitcoinApplication::stopThread, coreThread, &QThread::quit);
+ connect(coreThread, &QThread::finished, executor, &QObject::deleteLater);
coreThread->start();
}