Merge #14250: qt: Remove redundant stopThread() and stopExecutor() signals
24313fbf7eRemove redundant stopExecutor() signal (Hennadii Stepanov)1c0e0a5e38Remove redundant stopThread() signal (Hennadii Stepanov) Pull request description: The `QThread::finished` signal do this work. Tree-SHA512: 1afce23d30232276d50c3af5af79d83b88e390a2b71f7df585cc1079585d330447d179bbc34c0a89599beb2da035dfd5b9ce23238171490825cabc3a19ae6e67
This commit is contained in:
+2
-3
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user