switch subgraph to RegisterPlugin macro

master
Zithia Satazaki 2022-03-28 16:49:13 -04:00
parent b615b18d45
commit 22b06c465a
2 changed files with 11 additions and 12 deletions

7
notes
View File

@ -35,9 +35,12 @@ TODO {
about-license info
}
pool I guess
rework RegisterPlugin slightly to automatically give a file-scope access to the PluginInfo
^ use in graph
implement dlmalloc as backend for some things
- pool I guess
? implement dlmalloc as backend for some things
more ui options for laptop stuff {
invert scrollwheel (knobs)

View File

@ -15,20 +15,16 @@ using namespace Xybrid::Config;
#include <QMetaType>
#include <QMetaEnum>
#define qs QStringLiteral
namespace { // clazy:excludeall=non-pod-global-static
std::shared_ptr<PluginInfo> inf;
bool c = PluginRegistry::enqueueRegistration([] {
auto i = std::make_shared<PluginInfo>();
i->id = "graph";
i->displayName = "Subgraph";
i->createInstance = []{ return std::make_shared<Graph>(); };
PluginRegistry::registerPlugin(i);
inf = i;
});
}
RegisterPlugin(Graph, {
i->id = "graph";
i->displayName = "Subgraph";
inf = i;
})
//std::string Graph::pluginName() const { return "Subgraph"; }
Graph::Graph() {