mirror of
https://github.com/KDE/krfb
synced 2026-07-01 07:31:16 -07:00
Simplify plugin declaration using K_PLUGIN_CLASS_WITH_JSON
This way we do not need to take care of setting the factory name and typing out the registration manually
This commit is contained in:
@@ -24,8 +24,7 @@
|
||||
#include <KPluginFactory>
|
||||
#include <QX11Info>
|
||||
|
||||
K_PLUGIN_FACTORY_WITH_JSON(X11EventsPluginFactory, "krfb_events_x11.json",
|
||||
registerPlugin<X11EventsPlugin>();)
|
||||
K_PLUGIN_CLASS_WITH_JSON(X11EventsPlugin, "krfb_events_x11.json")
|
||||
|
||||
X11EventsPlugin::X11EventsPlugin(QObject *parent, const QVariantList &args)
|
||||
: EventsPlugin(parent, args)
|
||||
|
||||
@@ -25,8 +25,7 @@
|
||||
|
||||
#include <KPluginFactory>
|
||||
|
||||
K_PLUGIN_FACTORY_WITH_JSON(XdpEventsPluginFactory, "krfb_events_xdp.json",
|
||||
registerPlugin<XdpEventsPlugin>();)
|
||||
K_PLUGIN_CLASS_WITH_JSON(XdpEventsPlugin, "krfb_events_xdp.json")
|
||||
|
||||
XdpEventsPlugin::XdpEventsPlugin(QObject *parent, const QVariantList &args)
|
||||
: EventsPlugin(parent, args)
|
||||
|
||||
Reference in New Issue
Block a user