MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / stopAllPlugins

Method stopAllPlugins

app/src/Misc/ExtensionManager.cpp:1693–1716  ·  view source on GitHub ↗

* @brief Stops all running plugins. Called on application shutdown. */

Source from the content-addressed store, hash-verified

1691 * @brief Stops all running plugins. Called on application shutdown.
1692 */
1693void Misc::ExtensionManager::stopAllPlugins()
1694{
1695 const auto ids = m_plugins.keys();
1696 m_settings.setValue("RunningPlugins", QStringList(ids));
1697
1698 for (const auto& id : ids) {
1699 auto* process = m_plugins.value(id);
1700 if (!process)
1701 continue;
1702
1703 process->disconnect(this);
1704 process->terminate();
1705 if (!process->waitForFinished(3000))
1706 process->kill();
1707
1708 delete process;
1709 }
1710
1711 m_plugins.clear();
1712 m_runningPlugins.clear();
1713 Q_EMIT runningPluginsChanged();
1714 applyFilter();
1715 rebuildInstalledPlugins();
1716}
1717
1718/**
1719 * @brief Restores plugins that were running in the previous session.

Callers 1

onQuitMethod · 0.80

Calls 5

keysMethod · 0.80
valueMethod · 0.45
disconnectMethod · 0.45
killMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected