[kwin] Fix genericscripted config
* Use metadata as json * set Q_PLUGIN_METADATA and Q_INTERFACES * port away from kde4_add_plugin Only tested with effects, scripts might need further adjustements. REVIEW: 116862
This commit is contained in:
parent
c8b4f1e9e2
commit
0d07738ca9
3 changed files with 12 additions and 4 deletions
|
@ -1,10 +1,9 @@
|
|||
set(kcm_kwin4_genericscripted_SRCS genericscriptedconfig.cpp)
|
||||
kde4_add_plugin( kcm_kwin4_genericscripted ${kcm_kwin4_genericscripted_SRCS} )
|
||||
add_library(kcm_kwin4_genericscripted MODULE ${kcm_kwin4_genericscripted_SRCS})
|
||||
target_link_libraries( kcm_kwin4_genericscripted
|
||||
KF5::ConfigWidgets #KCModule
|
||||
KF5::I18n
|
||||
KF5::Service
|
||||
KF5::Plasma
|
||||
Qt5::DBus
|
||||
Qt5::UiTools )
|
||||
install( TARGETS kcm_kwin4_genericscripted DESTINATION ${PLUGIN_INSTALL_DIR} )
|
||||
install( TARGETS kcm_kwin4_genericscripted DESTINATION ${PLUGIN_INSTALL_DIR}/kwin/effects/configs )
|
||||
|
|
|
@ -30,11 +30,13 @@ namespace KWin
|
|||
class GenericScriptedConfigFactory : public KPluginFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.kde.KPluginFactory" FILE "genericscriptedconfig.json" )
|
||||
Q_INTERFACES(KPluginFactory)
|
||||
public:
|
||||
GenericScriptedConfigFactory();
|
||||
|
||||
protected:
|
||||
virtual QObject *create(const char *iface, QWidget *parentWidget, QObject *parent, const QVariantList &args, const QString &keyword);
|
||||
QObject *create(const char *iface, QWidget *parentWidget, QObject *parent, const QVariantList &args, const QString &keyword) override;
|
||||
};
|
||||
|
||||
class GenericScriptedConfig : public KCModule
|
||||
|
|
7
scripting/genericscriptedconfig.json
Normal file
7
scripting/genericscriptedconfig.json
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"Type": "Service",
|
||||
"X-KDE-Library": "kcm_kwin4_genericscripted",
|
||||
"X-KDE-ServiceTypes": [
|
||||
"KCModule"
|
||||
]
|
||||
}
|
Loading…
Reference in a new issue