aboutsummaryrefslogtreecommitdiff
path: root/src/qt
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
parent5da08e0ac51682376767d823e76d2a92c61a5d97 (diff)
downloadbitcoin-1c0e0a5e38102a67cb66cf6eef4098bdb64bb0f5.tar.xz
Remove redundant stopThread() signal
Diffstat (limited to 'src/qt')
-rw-r--r--src/qt/bitcoin.cpp5
-rw-r--r--src/qt/bitcoin.h1
-rw-r--r--src/qt/intro.cpp5
-rw-r--r--src/qt/intro.h1
4 files changed, 4 insertions, 8 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();
}
diff --git a/src/qt/bitcoin.h b/src/qt/bitcoin.h
index 48b5907570..ffed45236c 100644
--- a/src/qt/bitcoin.h
+++ b/src/qt/bitcoin.h
@@ -99,7 +99,6 @@ public Q_SLOTS:
Q_SIGNALS:
void requestedInitialize();
void requestedShutdown();
- void stopThread();
void splashFinished();
void windowShown(BitcoinGUI* window);
diff --git a/src/qt/intro.cpp b/src/qt/intro.cpp
index 0b61b05318..62c642ee76 100644
--- a/src/qt/intro.cpp
+++ b/src/qt/intro.cpp
@@ -158,7 +158,7 @@ Intro::~Intro()
{
delete ui;
/* Ensure thread is finished before it is deleted */
- Q_EMIT stopThread();
+ thread->quit();
thread->wait();
}
@@ -306,8 +306,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();
}
diff --git a/src/qt/intro.h b/src/qt/intro.h
index 2b3da963e2..a38dbccebc 100644
--- a/src/qt/intro.h
+++ b/src/qt/intro.h
@@ -54,7 +54,6 @@ public:
Q_SIGNALS:
void requestCheck();
- void stopThread();
public Q_SLOTS:
void setStatus(int status, const QString &message, quint64 bytesAvailable);