summaryrefslogtreecommitdiff
path: root/src/plugincontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugincontainer.cpp')
-rw-r--r--src/plugincontainer.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugincontainer.cpp b/src/plugincontainer.cpp
index c4640cc3..61169196 100644
--- a/src/plugincontainer.cpp
+++ b/src/plugincontainer.cpp
@@ -467,8 +467,8 @@ IPlugin* PluginContainer::registerPlugin(QObject *plugin, const QString& filepat
}
}
else {
- log::warn("Trying to register two plugins with the name '{}', the second one will not be registered.",
- pluginObj->name());
+ log::warn("Trying to register two plugins with the name '{}' (from {} and {}), the second one will not be registered.",
+ pluginObj->name(), this->filepath(other), QDir::cleanPath(filepath));
return nullptr;
}
}
@@ -481,6 +481,7 @@ IPlugin* PluginContainer::registerPlugin(QObject *plugin, const QString& filepat
bf::at_key<QObject>(m_Plugins).push_back(plugin);
plugin->setProperty("filepath", QDir::cleanPath(filepath));
+ plugin->setParent(this);
if (m_Organizer) {
m_Organizer->settings().plugins().registerPlugin(pluginObj);
@@ -921,6 +922,8 @@ void PluginContainer::unloadPlugin(MOBase::IPlugin* plugin, QObject* object)
}
+ object->deleteLater();
+
// Do this at the end.
m_Requirements.erase(plugin);
}