Disconnect simulator plugin signals before unloading

When we unload a simulator plugin, we don't need to listen to any
of its events anymore. Therefore disconnect its signals before
unloading.
The disconnect already existing before this commit probably had the
same intention but did the wrong thing.

refs #801
This commit is contained in:
Roland Winklmeier
2016-11-15 22:16:54 +01:00
committed by Klaus Basan
parent 096e1e9a81
commit d6deb077a7

View File

@@ -484,8 +484,8 @@ namespace BlackCore
if (sim)
{
// disconnect signals and delete
sim->disconnect(this);
sim->unload();
this->disconnect(sim);
sim->deleteLater();
emit simulatorPluginChanged(CSimulatorPluginInfo());
}
@@ -611,8 +611,6 @@ namespace BlackCore
void CContextSimulator::restoreSimulatorPlugins()
{
//! \todo #801, this shutdown flag should not be required
if (this->getRuntime()->isShuttingDown()) { return; }
stopSimulatorListeners();
auto enabledSimulators = m_enabledSimulators.getThreadLocal();