[kwin] Adapt to KPluginFactory change
KPluginFactory's constructor no longer takes arguments, since plugin root objects are not passed any arguments.
This commit is contained in:
parent
b0e892e359
commit
4d88fcdff6
5 changed files with 6 additions and 14 deletions
|
@ -38,7 +38,7 @@ class FakeEffectPluginFactory : public KWin::EffectPluginFactory
|
|||
Q_PLUGIN_METADATA(IID KPluginFactory_iid FILE "fakeeffectplugin_version.json")
|
||||
Q_INTERFACES(KPluginFactory)
|
||||
public:
|
||||
explicit FakeEffectPluginFactory(const char *a = 0, QObject *b = 0) : KWin::EffectPluginFactory(a, b) {}
|
||||
FakeEffectPluginFactory() {}
|
||||
~FakeEffectPluginFactory() {}
|
||||
KWin::Effect *createEffect() const override {
|
||||
return new KWin::FakeVersionEffect();
|
||||
|
|
|
@ -611,8 +611,7 @@ int Effect::requestedEffectChainPosition() const
|
|||
//****************************************
|
||||
// EffectFactory
|
||||
//****************************************
|
||||
EffectPluginFactory::EffectPluginFactory(const char *componentName, QObject *parent)
|
||||
: KPluginFactory(componentName, parent)
|
||||
EffectPluginFactory::EffectPluginFactory()
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -587,7 +587,7 @@ class KWINEFFECTS_EXPORT EffectPluginFactory : public KPluginFactory
|
|||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit EffectPluginFactory(const char *componentName = nullptr, QObject *parent = nullptr);
|
||||
EffectPluginFactory();
|
||||
virtual ~EffectPluginFactory();
|
||||
/**
|
||||
* Returns whether the Effect is supported.
|
||||
|
@ -644,7 +644,7 @@ public:
|
|||
Q_PLUGIN_METADATA(IID KPluginFactory_iid FILE jsonFile) \
|
||||
Q_INTERFACES(KPluginFactory) \
|
||||
public: \
|
||||
explicit factoryName(const char *a = 0, QObject *b = 0) : KWin::EffectPluginFactory(a, b) {} \
|
||||
explicit factoryName() {} \
|
||||
~factoryName() {} \
|
||||
bool isSupported() const override { \
|
||||
supported \
|
||||
|
|
|
@ -33,19 +33,14 @@
|
|||
|
||||
namespace KWin {
|
||||
|
||||
GenericScriptedConfigFactory::GenericScriptedConfigFactory()
|
||||
: KPluginFactory("kcm_kwin4_genericscripted")
|
||||
{
|
||||
}
|
||||
|
||||
QObject *GenericScriptedConfigFactory::create(const char *iface, QWidget *parentWidget, QObject *parent, const QVariantList &args, const QString &keyword)
|
||||
{
|
||||
Q_UNUSED(iface)
|
||||
Q_UNUSED(parent)
|
||||
if (keyword.startsWith(QStringLiteral("kwin4_effect_"))) {
|
||||
return new ScriptedEffectConfig(componentName(), keyword, parentWidget, args);
|
||||
return new ScriptedEffectConfig(QStringLiteral("kcm_kwin4_genericscripted"), keyword, parentWidget, args);
|
||||
} else {
|
||||
return new ScriptingConfig(componentName(), keyword, parentWidget, args);
|
||||
return new ScriptingConfig(QStringLiteral("kcm_kwin4_genericscripted"), keyword, parentWidget, args);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,8 +32,6 @@ class GenericScriptedConfigFactory : public KPluginFactory
|
|||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.kde.KPluginFactory" FILE "genericscriptedconfig.json" )
|
||||
Q_INTERFACES(KPluginFactory)
|
||||
public:
|
||||
GenericScriptedConfigFactory();
|
||||
|
||||
protected:
|
||||
QObject *create(const char *iface, QWidget *parentWidget, QObject *parent, const QVariantList &args, const QString &keyword) override;
|
||||
|
|
Loading…
Reference in a new issue