1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-26 17:58:43 -05:00

Call stopWork from destructor.

This commit is contained in:
Jon Beniston 2022-09-20 21:14:36 +01:00
parent 048d6830d9
commit 4cd2a2fdfa

View File

@ -66,6 +66,7 @@ SatelliteTrackerWorker::SatelliteTrackerWorker(SatelliteTracker* satelliteTracke
SatelliteTrackerWorker::~SatelliteTrackerWorker() SatelliteTrackerWorker::~SatelliteTrackerWorker()
{ {
qDebug() << "SatelliteTrackerWorker::~SatelliteTrackerWorker"; qDebug() << "SatelliteTrackerWorker::~SatelliteTrackerWorker";
stopWork();
m_inputMessageQueue.clear(); m_inputMessageQueue.clear();
} }
@ -74,7 +75,6 @@ void SatelliteTrackerWorker::startWork()
qDebug() << "SatelliteTrackerWorker::startWork"; qDebug() << "SatelliteTrackerWorker::startWork";
QMutexLocker mutexLocker(&m_mutex); QMutexLocker mutexLocker(&m_mutex);
connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages())); connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()));
connect(thread(), SIGNAL(finished()), this, SLOT(stopWork()));
m_recalculatePasses = true; m_recalculatePasses = true;
m_pollTimer.start((int)round(m_settings.m_updatePeriod*1000.0)); m_pollTimer.start((int)round(m_settings.m_updatePeriod*1000.0));