diff options
| author | LostDragonist <lost.dragonist@gmail.com> | 2019-03-23 21:21:51 -0500 |
|---|---|---|
| committer | LostDragonist <lost.dragonist@gmail.com> | 2019-03-23 21:21:51 -0500 |
| commit | 1f3133059e3c821e92dbaa6e3149dd59ce86c245 (patch) | |
| tree | 64b5cb49486d23e200ba3f25bc56ed10855437b4 /src/plugincontainer.cpp | |
| parent | ff7fd68c0b8f861ac294a3876485c59de94a67cd (diff) | |
Prevent diagnose plugins that return false for isActive from reporting notifications
Diffstat (limited to 'src/plugincontainer.cpp')
| -rw-r--r-- | src/plugincontainer.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugincontainer.cpp b/src/plugincontainer.cpp index 46a95f0c..2126c5ef 100644 --- a/src/plugincontainer.cpp +++ b/src/plugincontainer.cpp @@ -84,6 +84,10 @@ void PluginContainer::registerGame(IPluginGame *game) bool PluginContainer::registerPlugin(QObject *plugin, const QString &fileName)
{
+ // Storing the original QObject* is a bit of a hack as I couldn't figure out any
+ // way to cast directly between IPlugin* and IPluginDiagnose*
+ bf::at_key<QObject>(m_Plugins).push_back(plugin);
+
{ // generic treatment for all plugins
IPlugin *pluginObj = qobject_cast<IPlugin*>(plugin);
if (pluginObj == nullptr) {
|
