diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2019-01-17 14:28:48 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2019-01-17 14:40:26 +0100 |
commit | 7ee604487f547cc63413bc691609f38703dc6d6a (patch) | |
tree | 7bd80c4f01773b19aa85618e344d34867a758fb7 /src/qt/intro.cpp | |
parent | fcb6694a9945d2a02f40587e18bd395ef64048e0 (diff) | |
parent | 24313fbf7e3d69145bc18c089601ba7aea35d61c (diff) |
Merge #14250: qt: Remove redundant stopThread() and stopExecutor() signals
24313fbf7e3d69145bc18c089601ba7aea35d61c Remove redundant stopExecutor() signal (Hennadii Stepanov)
1c0e0a5e38102a67cb66cf6eef4098bdb64bb0f5 Remove redundant stopThread() signal (Hennadii Stepanov)
Pull request description:
The `QThread::finished` signal do this work.
Tree-SHA512: 1afce23d30232276d50c3af5af79d83b88e390a2b71f7df585cc1079585d330447d179bbc34c0a89599beb2da035dfd5b9ce23238171490825cabc3a19ae6e67
Diffstat (limited to 'src/qt/intro.cpp')
-rw-r--r-- | src/qt/intro.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp index fa9a50b1ed..69972fce3b 100644 --- a/src/qt/intro.cpp +++ b/src/qt/intro.cpp @@ -156,7 +156,7 @@ Intro::~Intro() { delete ui; /* Ensure thread is finished before it is deleted */ - Q_EMIT stopThread(); + thread->quit(); thread->wait(); } @@ -311,8 +311,7 @@ void Intro::startThread() connect(executor, &FreespaceChecker::reply, this, &Intro::setStatus); connect(this, &Intro::requestCheck, executor, &FreespaceChecker::check); /* make sure executor object is deleted in its own thread */ - connect(this, &Intro::stopThread, executor, &QObject::deleteLater); - connect(this, &Intro::stopThread, thread, &QThread::quit); + connect(thread, &QThread::finished, executor, &QObject::deleteLater); thread->start(); } |