[kwin/genericscriptedkcm] Generate dbus interface from XML description
This commit is contained in:
parent
7ca25ac703
commit
8699fe5e5a
3 changed files with 7 additions and 8 deletions
|
@ -222,6 +222,7 @@ configure_file(config-kwin.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kwin.h )
|
||||||
|
|
||||||
|
|
||||||
########### global ###############
|
########### global ###############
|
||||||
|
set(kwin_effects_dbus_xml ${CMAKE_CURRENT_SOURCE_DIR}/org.kde.kwin.Effects.xml)
|
||||||
|
|
||||||
include_directories(BEFORE
|
include_directories(BEFORE
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/libkdecorations
|
${CMAKE_CURRENT_BINARY_DIR}/libkdecorations
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
set(kcm_kwin4_genericscripted_SRCS genericscriptedconfig.cpp)
|
set(kcm_kwin4_genericscripted_SRCS genericscriptedconfig.cpp)
|
||||||
|
qt5_add_dbus_interface(kcm_kwin4_genericscripted_SRCS ${kwin_effects_dbus_xml} kwineffects_interface)
|
||||||
add_library(kcm_kwin4_genericscripted MODULE ${kcm_kwin4_genericscripted_SRCS})
|
add_library(kcm_kwin4_genericscripted MODULE ${kcm_kwin4_genericscripted_SRCS})
|
||||||
target_link_libraries( kcm_kwin4_genericscripted
|
target_link_libraries( kcm_kwin4_genericscripted
|
||||||
KF5::ConfigWidgets #KCModule
|
KF5::ConfigWidgets #KCModule
|
||||||
|
|
|
@ -20,12 +20,11 @@
|
||||||
|
|
||||||
#include "genericscriptedconfig.h"
|
#include "genericscriptedconfig.h"
|
||||||
#include "config-kwin.h"
|
#include "config-kwin.h"
|
||||||
|
#include <kwineffects_interface.h>
|
||||||
#include <KAboutData>
|
#include <KAboutData>
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
#include <kconfigloader.h>
|
#include <kconfigloader.h>
|
||||||
|
|
||||||
#include <QDBusConnection>
|
|
||||||
#include <QDBusMessage>
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QUiLoader>
|
#include <QUiLoader>
|
||||||
|
@ -127,12 +126,10 @@ KConfigGroup ScriptedEffectConfig::configGroup()
|
||||||
|
|
||||||
void ScriptedEffectConfig::reload()
|
void ScriptedEffectConfig::reload()
|
||||||
{
|
{
|
||||||
QDBusMessage message = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kwin"),
|
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||||
QStringLiteral("/KWin"),
|
QStringLiteral("/Effects"),
|
||||||
QStringLiteral("org.kde.KWin"),
|
QDBusConnection::sessionBus());
|
||||||
QStringLiteral("reconfigureEffect"));
|
interface.reconfigureEffect(packageName());
|
||||||
message << QString(packageName());
|
|
||||||
QDBusConnection::sessionBus().send(message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptingConfig::ScriptingConfig(const QString &componentName, const QString &keyword, QWidget *parent, const QVariantList &args)
|
ScriptingConfig::ScriptingConfig(const QString &componentName, const QString &keyword, QWidget *parent, const QVariantList &args)
|
||||||
|
|
Loading…
Reference in a new issue