diff --git a/pglab/CrudTab.cpp b/pglab/CrudTab.cpp index 7865faf..0b03ef1 100644 --- a/pglab/CrudTab.cpp +++ b/pglab/CrudTab.cpp @@ -143,9 +143,4 @@ void CrudPageModule::moduleAction_open( } -namespace { - - std::weak_ptr register_variable = createPluginModule - ("CRUD tool", "pglab.crudpage"); - -} +REGISTER_PLUGIN_MODULE(CrudPageModule, "CRUD tool", "pglab.crudpage") diff --git a/pglab/QueryTab.cpp b/pglab/QueryTab.cpp index fd33353..a2db049 100644 --- a/pglab/QueryTab.cpp +++ b/pglab/QueryTab.cpp @@ -684,10 +684,4 @@ void QueryToolModule::new_triggered() { } - -namespace { - - std::weak_ptr register_variable = createPluginModule - ("Query tool", "pglab.querytool"); - -} +REGISTER_PLUGIN_MODULE(QueryToolModule, "Query tool", "pglab.querytool") diff --git a/pglab/plugin_support/MenuAction.cpp b/pglab/plugin_support/MenuAction.cpp new file mode 100644 index 0000000..87199e2 --- /dev/null +++ b/pglab/plugin_support/MenuAction.cpp @@ -0,0 +1,6 @@ +#include "MenuAction.h" + +MenuAction::MenuAction() +{ + +} diff --git a/pglab/plugin_support/MenuAction.h b/pglab/plugin_support/MenuAction.h new file mode 100644 index 0000000..95409c5 --- /dev/null +++ b/pglab/plugin_support/MenuAction.h @@ -0,0 +1,11 @@ +#ifndef MENUACTION_H +#define MENUACTION_H + + +class MenuAction +{ +public: + MenuAction(); +}; + +#endif // MENUACTION_H \ No newline at end of file diff --git a/pglab/plugin_support/PluginModule.h b/pglab/plugin_support/PluginModule.h index 68b147c..c5aa8a0 100644 --- a/pglab/plugin_support/PluginModule.h +++ b/pglab/plugin_support/PluginModule.h @@ -53,5 +53,10 @@ std::shared_ptr createPluginModule(QString name, QString ident) return std::move(module); } +#define REGISTER_PLUGIN_MODULE(module, name, ident) \ + namespace {\ + std::weak_ptr register_variable = createPluginModule\ + (#name, #ident);} + #endif // PLUGIN_SUPPORTPLUGINMODULE_H