Disconnect all slots of nymea:core on shutdown

pull/248/head
Michael Zanetti 2020-01-15 13:17:18 +01:00
parent 6cdcd47f9b
commit de0395f115
2 changed files with 6 additions and 5 deletions

View File

@ -207,12 +207,13 @@ void NymeaCore::init() {
/*! Destructor of the \l{NymeaCore}. */
NymeaCore::~NymeaCore()
{
qCDebug(dcApplication()) << "Shutting down NymeaCore";
m_logger->logSystemEvent(m_timeManager->currentDateTime(), false);
// Disconnect everything that could still spawn events
disconnect(m_deviceManager);
disconnect(m_ruleEngine);
disconnect(m_timeManager);
// Disconnect all signals/slots, we're going down now
m_timeManager->disconnect(this);
m_deviceManager->disconnect(this);
m_ruleEngine->disconnect(this);
// At very first, cut off the outside world
qCDebug(dcApplication) << "Shutting down \"Server Manager\"";

View File

@ -62,7 +62,7 @@ void NymeaTestBase::initTestCase()
NymeaSettings nymeadSettings(NymeaSettings::SettingsRoleGlobal);
nymeadSettings.clear();
QLoggingCategory::setFilterRules("*.debug=false\nTests.debug=true\nMockDevice.debug=true");
QLoggingCategory::setFilterRules("*.debug=false\nApplication.debug=true\nTests.debug=true\nMockDevice.debug=true");
// Start the server
qCDebug(dcTests()) << "Setting up nymea core instance";