Commit 0d8cc44e authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

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
parent d7c559b0
......@@ -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)
......
......@@ -22,9 +22,7 @@
#include "pw_framebuffer.h"
#include <KPluginFactory>
K_PLUGIN_FACTORY_WITH_JSON(PWFrameBufferPluginFactory, "krfb_framebuffer_pw.json",
registerPlugin<PWFrameBufferPlugin>();)
K_PLUGIN_CLASS_WITH_JSON(PWFrameBufferPlugin, "krfb_framebuffer_pw.json")
PWFrameBufferPlugin::PWFrameBufferPlugin(QObject *parent, const QVariantList &args)
: FrameBufferPlugin(parent, args)
......
......@@ -24,8 +24,7 @@
#include <KPluginFactory>
K_PLUGIN_FACTORY_WITH_JSON(QtFrameBufferPluginFactory, "krfb_framebuffer_qt.json",
registerPlugin<QtFrameBufferPlugin>();)
K_PLUGIN_CLASS_WITH_JSON(QtFrameBufferPlugin, "krfb_framebuffer_qt.json")
QtFrameBufferPlugin::QtFrameBufferPlugin(QObject *parent, const QVariantList &args)
: FrameBufferPlugin(parent, args)
......
......@@ -22,9 +22,7 @@
#include "xcb_framebuffer.h"
#include <KPluginFactory>
K_PLUGIN_FACTORY_WITH_JSON(XCBFrameBufferPluginFactory, "krfb_framebuffer_xcb.json",
registerPlugin<XCBFrameBufferPlugin>();)
K_PLUGIN_CLASS_WITH_JSON(XCBFrameBufferPlugin, "krfb_framebuffer_xcb.json")
XCBFrameBufferPlugin::XCBFrameBufferPlugin(QObject *parent, const QVariantList &args)
: FrameBufferPlugin(parent, args)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment