Generate adapter and interface classes using the qt5 D-Bus interface.
Signed-off-by: huangjiawen <huangjiawen@kylinsec.com.cn>
This commit is contained in:
parent
0d2b23aa77
commit
915b345642
@ -0,0 +1,141 @@
|
||||
From 84128419ca0aef23c2b76c515b69ce47bcb3bc11 Mon Sep 17 00:00:00 2001
|
||||
From: huangjiawen <huangjiawen@kylinsec.com.cn>
|
||||
Date: Tue, 11 Apr 2023 11:36:59 +0800
|
||||
Subject: [PATCH] feature(dbus): Generate adapter and interface classes using
|
||||
the qt5 D-Bus interface
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
- 使用qt5 D-Bus接口生成适配器类和接口类
|
||||
|
||||
Signed-off-by: huangjiawen <huangjiawen@kylinsec.com.cn>
|
||||
---
|
||||
src/core/CMakeLists.txt | 10 +++++-----
|
||||
src/core/app/app.cpp | 1 +
|
||||
src/core/client/client-xsmp.h | 1 +
|
||||
src/core/main.cpp | 1 +
|
||||
src/idle/CMakeLists.txt | 2 +-
|
||||
src/ui/CMakeLists.txt | 4 ++--
|
||||
6 files changed, 11 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
|
||||
index bf53180..249e281 100644
|
||||
--- a/src/core/CMakeLists.txt
|
||||
+++ b/src/core/CMakeLists.txt
|
||||
@@ -3,12 +3,12 @@ cmake_minimum_required(VERSION 3.0)
|
||||
file(GLOB_RECURSE SRC_H_FILES ./*.h)
|
||||
file(GLOB_RECURSE SRC_CPP_FILES ./*.cpp)
|
||||
|
||||
-qt_add_dbus_adaptor(
|
||||
+qt5_add_dbus_adaptor(
|
||||
SESSION_MANAGER_SRCS ${CMAKE_SOURCE_DIR}/data/org.gnome.SessionManager.xml
|
||||
${CMAKE_SOURCE_DIR}/src/core/session-manager.h Kiran::SessionManager
|
||||
session_manager_adaptor SessionManagerAdaptor)
|
||||
|
||||
-qt_add_dbus_adaptor(
|
||||
+qt5_add_dbus_adaptor(
|
||||
CLIENT_PRIVATE_SRCS
|
||||
${CMAKE_SOURCE_DIR}/data/org.gnome.SessionManager.ClientPrivate.xml
|
||||
${CMAKE_SOURCE_DIR}/src/core/client/client-dbus.h
|
||||
@@ -16,7 +16,7 @@ qt_add_dbus_adaptor(
|
||||
client_dbus_adaptor
|
||||
ClientDBusAdaptor)
|
||||
|
||||
-qt_add_dbus_adaptor(
|
||||
+qt5_add_dbus_adaptor(
|
||||
PRESENCE_SRCS ${CMAKE_SOURCE_DIR}/data/org.gnome.SessionManager.Presence.xml
|
||||
${CMAKE_SOURCE_DIR}/src/core/presence.h Kiran::Presence presence_adaptor
|
||||
PresenceAdaptor)
|
||||
@@ -25,7 +25,7 @@ set_source_files_properties(
|
||||
${CMAKE_SOURCE_DIR}/data/com.kylinsec.Kiran.SessionManager.IdleMonitor.xml
|
||||
PROPERTIES CLASSNAME IdleMonitorProxy NO_NAMESPACE true)
|
||||
|
||||
-qt_add_dbus_interface(
|
||||
+qt5_add_dbus_interface(
|
||||
IDLE_MONITOR_SRCS
|
||||
${CMAKE_SOURCE_DIR}/data/com.kylinsec.Kiran.SessionManager.IdleMonitor.xml
|
||||
idle_monitor_proxy)
|
||||
@@ -33,7 +33,7 @@ qt_add_dbus_interface(
|
||||
set(TARGET_NAME kiran-session-manager)
|
||||
|
||||
file(GLOB TS_FILES "${PROJECT_SOURCE_DIR}/translations/${TARGET_NAME}.*.ts")
|
||||
-qt_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
|
||||
+qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
|
||||
|
||||
add_executable(
|
||||
${TARGET_NAME}
|
||||
diff --git a/src/core/app/app.cpp b/src/core/app/app.cpp
|
||||
index 4e1a101..0fc995b 100644
|
||||
--- a/src/core/app/app.cpp
|
||||
+++ b/src/core/app/app.cpp
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <KService>
|
||||
#include <QFileInfo>
|
||||
#include <QProcess>
|
||||
+#include <QUrl>
|
||||
#include "lib/base/base.h"
|
||||
|
||||
#include "src/core/app/app-manager.h"
|
||||
diff --git a/src/core/client/client-xsmp.h b/src/core/client/client-xsmp.h
|
||||
index 2f5e6be..dbdc38e 100644
|
||||
--- a/src/core/client/client-xsmp.h
|
||||
+++ b/src/core/client/client-xsmp.h
|
||||
@@ -15,6 +15,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "src/core/client/client.h"
|
||||
+#include <QVector>
|
||||
|
||||
struct _SmsConn;
|
||||
typedef struct _SmsConn *SmsConn;
|
||||
diff --git a/src/core/main.cpp b/src/core/main.cpp
|
||||
index 8244df7..7ce98db 100644
|
||||
--- a/src/core/main.cpp
|
||||
+++ b/src/core/main.cpp
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <QTranslator>
|
||||
#include <QtGlobal>
|
||||
#include <iostream>
|
||||
+#include <unistd.h>
|
||||
#include "config.h"
|
||||
#include "lib/base/base.h"
|
||||
#include "src/core/app/app-manager.h"
|
||||
diff --git a/src/idle/CMakeLists.txt b/src/idle/CMakeLists.txt
|
||||
index 7245af8..a5c62ec 100644
|
||||
--- a/src/idle/CMakeLists.txt
|
||||
+++ b/src/idle/CMakeLists.txt
|
||||
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.0)
|
||||
file(GLOB_RECURSE IDLE_H_FILES ./*.h)
|
||||
file(GLOB_RECURSE IDLE_CPP_FILES ./*.cpp)
|
||||
|
||||
-qt_add_dbus_adaptor(
|
||||
+qt5_add_dbus_adaptor(
|
||||
IDLE_MONITOR_SRCS
|
||||
${CMAKE_SOURCE_DIR}/data/com.kylinsec.Kiran.SessionManager.IdleMonitor.xml
|
||||
${CMAKE_SOURCE_DIR}/src/idle/idle-monitor.h
|
||||
diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt
|
||||
index 574f3eb..adc7aed 100644
|
||||
--- a/src/ui/CMakeLists.txt
|
||||
+++ b/src/ui/CMakeLists.txt
|
||||
@@ -8,7 +8,7 @@ set_source_files_properties(
|
||||
${CMAKE_SOURCE_DIR}/data/org.gnome.SessionManager.xml
|
||||
PROPERTIES CLASSNAME SessionManagerProxy NO_NAMESPACE true)
|
||||
|
||||
-qt_add_dbus_interface(
|
||||
+qt5_add_dbus_interface(
|
||||
SESSION_MANAGER_SRCS ${CMAKE_SOURCE_DIR}/data/org.gnome.SessionManager.xml
|
||||
session_manager_interface)
|
||||
|
||||
@@ -18,7 +18,7 @@ qt5_wrap_ui(UI_FILES ${CMAKE_CURRENT_SOURCE_DIR}/exit-query-window.ui
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/inhibitor-row.ui)
|
||||
|
||||
file(GLOB TS_FILES "${PROJECT_SOURCE_DIR}/translations/${TARGET_NAME}.*.ts")
|
||||
-qt_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
|
||||
+qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TS_FILES})
|
||||
|
||||
add_executable(
|
||||
${TARGET_NAME}
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
Name: kiran-session-manager
|
||||
Version: 2.4.0
|
||||
Release: 3
|
||||
Release: 4
|
||||
Summary: Session manager for KIRAN desktop environment
|
||||
|
||||
License: MulanPSL-2.0
|
||||
@ -8,6 +8,7 @@ Source0: %{name}-%{version}.tar.gz
|
||||
|
||||
Patch1001: 0001-feature-wayland-Support-wayland-session-by-launching.patch
|
||||
Patch1002: 0002-fix-translate-add-some-translation.patch
|
||||
Patch1003: 0003-feature-dbus-Generate-adapter-and-interface-classes-the-qt5DBus.patch
|
||||
|
||||
BuildRequires: cmake >= 3.2
|
||||
BuildRequires: pkgconfig(gio-unix-2.0)
|
||||
@ -88,6 +89,9 @@ make %{?_smp_mflags}
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Apr 10 2023 huangjiawen <huangjiawen@kylinsec.om.cn> - 2.4.0-4
|
||||
- KYOS-F: Generate adapter and interface classes using the qt5 D-Bus interface.
|
||||
|
||||
* Mon Apr 10 2023 wangyucheng <wangyucheng@kylinsec.om.cn> - 2.4.0-3
|
||||
- KYOS-T: add some translation
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user