Merge PR #248: Disconnect all slots of nymea:core on shutdown

pull/263/head
Jenkins nymea 2020-01-29 21:44:34 +01:00
commit b7ac4ec806
2 changed files with 6 additions and 5 deletions

View File

@ -221,12 +221,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";