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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user