Fix "Timers cannot be stopped from another thread" during shutdown (#876)

This commit is contained in:
LordGrey 2020-07-19 15:13:41 +02:00 committed by GitHub
parent c85b4c530c
commit 45303e1b64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 5 deletions

View File

@ -63,7 +63,7 @@ public:
/// ///
/// @param ledCount The number of leds /// @param ledCount The number of leds
/// ///
PriorityMuxer(int ledCount); PriorityMuxer(int ledCount, QObject * parent);
/// ///
/// Destructor /// Destructor

View File

@ -46,7 +46,7 @@ Hyperion::Hyperion(const quint8& instance)
, _componentRegister(this) , _componentRegister(this)
, _ledString(hyperion::createLedString(getSetting(settings::LEDS).array(), hyperion::createColorOrder(getSetting(settings::DEVICE).object()))) , _ledString(hyperion::createLedString(getSetting(settings::LEDS).array(), hyperion::createColorOrder(getSetting(settings::DEVICE).object())))
, _imageProcessor(new ImageProcessor(_ledString, this)) , _imageProcessor(new ImageProcessor(_ledString, this))
, _muxer(_ledString.leds().size()) , _muxer(_ledString.leds().size(), this)
, _raw2ledAdjustment(hyperion::createLedColorsAdjustment(_ledString.leds().size(), getSetting(settings::COLOR).object())) , _raw2ledAdjustment(hyperion::createLedColorsAdjustment(_ledString.leds().size(), getSetting(settings::COLOR).object()))
, _effectEngine(nullptr) , _effectEngine(nullptr)
, _messageForwarder(nullptr) , _messageForwarder(nullptr)

View File

@ -74,7 +74,7 @@ bool HyperionIManager::startInstance(const quint8& inst, const bool& block)
if(!_runningInstances.contains(inst) && !_startQueue.contains(inst)) if(!_runningInstances.contains(inst) && !_startQueue.contains(inst))
{ {
QThread* hyperionThread = new QThread(); QThread* hyperionThread = new QThread();
hyperionThread->setObjectName("HyperionIManagerThread"); hyperionThread->setObjectName("HyperionThread");
Hyperion* hyperion = new Hyperion(inst); Hyperion* hyperion = new Hyperion(inst);
hyperion->moveToThread(hyperionThread); hyperion->moveToThread(hyperionThread);
// setup thread management // setup thread management

View File

@ -14,8 +14,8 @@
const int PriorityMuxer::LOWEST_PRIORITY = std::numeric_limits<uint8_t>::max(); const int PriorityMuxer::LOWEST_PRIORITY = std::numeric_limits<uint8_t>::max();
PriorityMuxer::PriorityMuxer(int ledCount) PriorityMuxer::PriorityMuxer(int ledCount, QObject * parent)
: QObject() : QObject(parent)
, _log(Logger::getInstance("HYPERION")) , _log(Logger::getInstance("HYPERION"))
, _currentPriority(PriorityMuxer::LOWEST_PRIORITY) , _currentPriority(PriorityMuxer::LOWEST_PRIORITY)
, _manualSelectedPriority(256) , _manualSelectedPriority(256)