[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_PLUGIN_METADATA(IID KPluginFactory_iid FILE "fakeeffectplugin_version.json")
|
||||||
Q_INTERFACES(KPluginFactory)
|
Q_INTERFACES(KPluginFactory)
|
||||||
public:
|
public:
|
||||||
explicit FakeEffectPluginFactory(const char *a = 0, QObject *b = 0) : KWin::EffectPluginFactory(a, b) {}
|
FakeEffectPluginFactory() {}
|
||||||
~FakeEffectPluginFactory() {}
|
~FakeEffectPluginFactory() {}
|
||||||
KWin::Effect *createEffect() const override {
|
KWin::Effect *createEffect() const override {
|
||||||
return new KWin::FakeVersionEffect();
|
return new KWin::FakeVersionEffect();
|
||||||
|
|
|
@ -611,8 +611,7 @@ int Effect::requestedEffectChainPosition() const
|
||||||
//****************************************
|
//****************************************
|
||||||
// EffectFactory
|
// EffectFactory
|
||||||
//****************************************
|
//****************************************
|
||||||
EffectPluginFactory::EffectPluginFactory(const char *componentName, QObject *parent)
|
EffectPluginFactory::EffectPluginFactory()
|
||||||
: KPluginFactory(componentName, parent)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -587,7 +587,7 @@ class KWINEFFECTS_EXPORT EffectPluginFactory : public KPluginFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit EffectPluginFactory(const char *componentName = nullptr, QObject *parent = nullptr);
|
EffectPluginFactory();
|
||||||
virtual ~EffectPluginFactory();
|
virtual ~EffectPluginFactory();
|
||||||
/**
|
/**
|
||||||
* Returns whether the Effect is supported.
|
* Returns whether the Effect is supported.
|
||||||
|
@ -644,7 +644,7 @@ public:
|
||||||
Q_PLUGIN_METADATA(IID KPluginFactory_iid FILE jsonFile) \
|
Q_PLUGIN_METADATA(IID KPluginFactory_iid FILE jsonFile) \
|
||||||
Q_INTERFACES(KPluginFactory) \
|
Q_INTERFACES(KPluginFactory) \
|
||||||
public: \
|
public: \
|
||||||
explicit factoryName(const char *a = 0, QObject *b = 0) : KWin::EffectPluginFactory(a, b) {} \
|
explicit factoryName() {} \
|
||||||
~factoryName() {} \
|
~factoryName() {} \
|
||||||
bool isSupported() const override { \
|
bool isSupported() const override { \
|
||||||
supported \
|
supported \
|
||||||
|
|
|
@ -33,19 +33,14 @@
|
||||||
|
|
||||||
namespace KWin {
|
namespace KWin {
|
||||||
|
|
||||||
GenericScriptedConfigFactory::GenericScriptedConfigFactory()
|
|
||||||
: KPluginFactory("kcm_kwin4_genericscripted")
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
QObject *GenericScriptedConfigFactory::create(const char *iface, QWidget *parentWidget, QObject *parent, const QVariantList &args, const QString &keyword)
|
QObject *GenericScriptedConfigFactory::create(const char *iface, QWidget *parentWidget, QObject *parent, const QVariantList &args, const QString &keyword)
|
||||||
{
|
{
|
||||||
Q_UNUSED(iface)
|
Q_UNUSED(iface)
|
||||||
Q_UNUSED(parent)
|
Q_UNUSED(parent)
|
||||||
if (keyword.startsWith(QStringLiteral("kwin4_effect_"))) {
|
if (keyword.startsWith(QStringLiteral("kwin4_effect_"))) {
|
||||||
return new ScriptedEffectConfig(componentName(), keyword, parentWidget, args);
|
return new ScriptedEffectConfig(QStringLiteral("kcm_kwin4_genericscripted"), keyword, parentWidget, args);
|
||||||
} else {
|
} 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_OBJECT
|
||||||
Q_PLUGIN_METADATA(IID "org.kde.KPluginFactory" FILE "genericscriptedconfig.json" )
|
Q_PLUGIN_METADATA(IID "org.kde.KPluginFactory" FILE "genericscriptedconfig.json" )
|
||||||
Q_INTERFACES(KPluginFactory)
|
Q_INTERFACES(KPluginFactory)
|
||||||
public:
|
|
||||||
GenericScriptedConfigFactory();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QObject *create(const char *iface, QWidget *parentWidget, QObject *parent, const QVariantList &args, const QString &keyword) override;
|
QObject *create(const char *iface, QWidget *parentWidget, QObject *parent, const QVariantList &args, const QString &keyword) override;
|
||||||
|
|
Loading…
Reference in a new issue