[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 ###############
|
||||
set(kwin_effects_dbus_xml ${CMAKE_CURRENT_SOURCE_DIR}/org.kde.kwin.Effects.xml)
|
||||
|
||||
include_directories(BEFORE
|
||||
${CMAKE_CURRENT_BINARY_DIR}/libkdecorations
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
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})
|
||||
target_link_libraries( kcm_kwin4_genericscripted
|
||||
KF5::ConfigWidgets #KCModule
|
||||
|
|
|
@ -20,12 +20,11 @@
|
|||
|
||||
#include "genericscriptedconfig.h"
|
||||
#include "config-kwin.h"
|
||||
#include <kwineffects_interface.h>
|
||||
#include <KAboutData>
|
||||
#include <KLocalizedString>
|
||||
#include <kconfigloader.h>
|
||||
|
||||
#include <QDBusConnection>
|
||||
#include <QDBusMessage>
|
||||
#include <QFile>
|
||||
#include <QLabel>
|
||||
#include <QUiLoader>
|
||||
|
@ -127,12 +126,10 @@ KConfigGroup ScriptedEffectConfig::configGroup()
|
|||
|
||||
void ScriptedEffectConfig::reload()
|
||||
{
|
||||
QDBusMessage message = QDBusMessage::createMethodCall(QStringLiteral("org.kde.kwin"),
|
||||
QStringLiteral("/KWin"),
|
||||
QStringLiteral("org.kde.KWin"),
|
||||
QStringLiteral("reconfigureEffect"));
|
||||
message << QString(packageName());
|
||||
QDBusConnection::sessionBus().send(message);
|
||||
OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.kwin.Effects"),
|
||||
QStringLiteral("/Effects"),
|
||||
QDBusConnection::sessionBus());
|
||||
interface.reconfigureEffect(packageName());
|
||||
}
|
||||
|
||||
ScriptingConfig::ScriptingConfig(const QString &componentName, const QString &keyword, QWidget *parent, const QVariantList &args)
|
||||
|
|
Loading…
Reference in a new issue