Remove sheet builder action when unloading the plugin.

This commit is contained in:
dfighter1985 2014-06-08 18:56:40 +02:00
parent 8111d9b9a5
commit 4096166e66
2 changed files with 14 additions and 0 deletions

View file

@ -35,6 +35,18 @@
using namespace Plugin;
SheetBuilderPlugin::SheetBuilderPlugin()
{
}
SheetBuilderPlugin::~SheetBuilderPlugin()
{
Core::MenuManager *menuManager = Core::ICore::instance()->menuManager();
QAction *a = menuManager->action( "SheetBuilder" );
menuManager->unregisterAction( "SheetBuilder" );
delete a;
}
bool SheetBuilderPlugin::initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString)
{
Q_UNUSED(errorString);

View file

@ -36,6 +36,8 @@ class SheetBuilderPlugin : public QObject, public ExtensionSystem::IPlugin
Q_OBJECT
Q_INTERFACES(ExtensionSystem::IPlugin)
public:
SheetBuilderPlugin();
~SheetBuilderPlugin();
bool initialize(ExtensionSystem::IPluginManager *pluginManager, QString *errorString);
void extensionsInitialized();
void setNelContext(NLMISC::INelContext *nelContext);