Remove display sheet id action when unloading the plugin.

--HG--
branch : gsoc2014-dfighter
This commit is contained in:
dfighter1985 2014-06-08 19:27:03 +02:00
parent 3fc289e7fa
commit b9bbe802d4
2 changed files with 15 additions and 0 deletions

View file

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

View file

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