Simplified module registration
This commit is contained in:
parent
456180325e
commit
a29671593e
5 changed files with 24 additions and 13 deletions
|
|
@ -143,9 +143,4 @@ void CrudPageModule::moduleAction_open(
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace {
|
REGISTER_PLUGIN_MODULE(CrudPageModule, "CRUD tool", "pglab.crudpage")
|
||||||
|
|
||||||
std::weak_ptr<PluginModule> register_variable = createPluginModule<CrudPageModule>
|
|
||||||
("CRUD tool", "pglab.crudpage");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -684,10 +684,4 @@ void QueryToolModule::new_triggered()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
REGISTER_PLUGIN_MODULE(QueryToolModule, "Query tool", "pglab.querytool")
|
||||||
namespace {
|
|
||||||
|
|
||||||
std::weak_ptr<PluginModule> register_variable = createPluginModule<QueryToolModule>
|
|
||||||
("Query tool", "pglab.querytool");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
||||||
6
pglab/plugin_support/MenuAction.cpp
Normal file
6
pglab/plugin_support/MenuAction.cpp
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
#include "MenuAction.h"
|
||||||
|
|
||||||
|
MenuAction::MenuAction()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
11
pglab/plugin_support/MenuAction.h
Normal file
11
pglab/plugin_support/MenuAction.h
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
#ifndef MENUACTION_H
|
||||||
|
#define MENUACTION_H
|
||||||
|
|
||||||
|
|
||||||
|
class MenuAction
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MenuAction();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MENUACTION_H
|
||||||
|
|
@ -53,5 +53,10 @@ std::shared_ptr<PluginModule> createPluginModule(QString name, QString ident)
|
||||||
return std::move(module);
|
return std::move(module);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define REGISTER_PLUGIN_MODULE(module, name, ident) \
|
||||||
|
namespace {\
|
||||||
|
std::weak_ptr<PluginModule> register_variable = createPluginModule<module>\
|
||||||
|
(#name, #ident);}
|
||||||
|
|
||||||
|
|
||||||
#endif // PLUGIN_SUPPORTPLUGINMODULE_H
|
#endif // PLUGIN_SUPPORTPLUGINMODULE_H
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue