diff --git a/0003-feature-dbus-Generate-adapter-and-interface-classes-the-qt5DBus.patch b/0003-feature-dbus-Generate-adapter-and-interface-classes-the-qt5DBus.patch new file mode 100644 index 0000000000000000000000000000000000000000..0ce9c78cab39813c69322ab0cf97f912bfa43e70 --- /dev/null +++ b/0003-feature-dbus-Generate-adapter-and-interface-classes-the-qt5DBus.patch @@ -0,0 +1,111 @@ +diff -ruN kiran-session-manager-2.4.0/src/core/app/app.cpp kiran-session-manager-2.4.0-new/src/core/app/app.cpp +--- kiran-session-manager-2.4.0/src/core/app/app.cpp 2022-11-04 17:38:25.000000000 +0800 ++++ kiran-session-manager-2.4.0-new/src/core/app/app.cpp 2023-04-11 13:52:11.494661182 +0800 +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + #include "lib/base/base.h" + + #include "src/core/app/app-manager.h" +diff -ruN kiran-session-manager-2.4.0/src/core/client/client-xsmp.h kiran-session-manager-2.4.0-new/src/core/client/client-xsmp.h +--- kiran-session-manager-2.4.0/src/core/client/client-xsmp.h 2022-11-04 17:38:25.000000000 +0800 ++++ kiran-session-manager-2.4.0-new/src/core/client/client-xsmp.h 2023-04-11 13:52:11.494661182 +0800 +@@ -15,6 +15,7 @@ + #pragma once + + #include "src/core/client/client.h" ++#include + + struct _SmsConn; + typedef struct _SmsConn *SmsConn; +diff -ruN kiran-session-manager-2.4.0/src/core/CMakeLists.txt kiran-session-manager-2.4.0-new/src/core/CMakeLists.txt +--- kiran-session-manager-2.4.0/src/core/CMakeLists.txt 2022-11-04 17:38:25.000000000 +0800 ++++ kiran-session-manager-2.4.0-new/src/core/CMakeLists.txt 2023-04-11 13:53:10.397660957 +0800 +@@ -3,12 +3,12 @@ + 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 @@ + 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 @@ + ${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 @@ + set(TARGET_NAME kiran-session-manager) + + set(TS_FILES "${PROJECT_SOURCE_DIR}/translations/${TARGET_NAME}.zh_CN.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 -ruN kiran-session-manager-2.4.0/src/core/main.cpp kiran-session-manager-2.4.0-new/src/core/main.cpp +--- kiran-session-manager-2.4.0/src/core/main.cpp 2022-11-04 17:38:25.000000000 +0800 ++++ kiran-session-manager-2.4.0-new/src/core/main.cpp 2023-04-11 13:52:11.494661182 +0800 +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + #include "config.h" + #include "lib/base/base.h" + #include "src/core/app/app-manager.h" +diff -ruN kiran-session-manager-2.4.0/src/idle/CMakeLists.txt kiran-session-manager-2.4.0-new/src/idle/CMakeLists.txt +--- kiran-session-manager-2.4.0/src/idle/CMakeLists.txt 2022-11-04 17:38:25.000000000 +0800 ++++ kiran-session-manager-2.4.0-new/src/idle/CMakeLists.txt 2023-04-11 13:52:11.494661182 +0800 +@@ -3,7 +3,7 @@ + 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 -ruN kiran-session-manager-2.4.0/src/ui/CMakeLists.txt kiran-session-manager-2.4.0-new/src/ui/CMakeLists.txt +--- kiran-session-manager-2.4.0/src/ui/CMakeLists.txt 2022-11-04 17:38:25.000000000 +0800 ++++ kiran-session-manager-2.4.0-new/src/ui/CMakeLists.txt 2023-04-11 13:53:44.453660827 +0800 +@@ -8,7 +8,7 @@ + ${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 @@ + ${CMAKE_CURRENT_SOURCE_DIR}/inhibitor-row.ui) + + set(TS_FILES "${PROJECT_SOURCE_DIR}/translations/${TARGET_NAME}.zh_CN.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/kiran-session-manager.spec b/kiran-session-manager.spec index 93e7570e4f03f5f441ce0a7b22707b33638e4ed5..63e7a4ad9561d2f3665c568d56b98fc1d4a33b99 100644 --- a/kiran-session-manager.spec +++ b/kiran-session-manager.spec @@ -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 - 2.4.0-4 +- KYOS-F: Generate adapter and interface classes using the qt5 D-Bus interface. + * Mon Apr 10 2023 wangyucheng - 2.4.0-3 - KYOS-T: add some translation