From f1a6a5fb130113bdd39c2500f640d759a2eabe71 Mon Sep 17 00:00:00 2001 From: liuxinhao Date: Tue, 5 Sep 2023 15:01:55 +0800 Subject: [PATCH] fix(qt5.9.7): fits the Qt5.9.7 interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 适配Qt5.9.7接口,修复编译报错 --- ...x-qt5.9.7-fits-the-Qt5.9.7-interface.patch | 45 +++++++++++++++++++ kiran-qt5-integration.spec | 6 ++- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 0009-fix-qt5.9.7-fits-the-Qt5.9.7-interface.patch diff --git a/0009-fix-qt5.9.7-fits-the-Qt5.9.7-interface.patch b/0009-fix-qt5.9.7-fits-the-Qt5.9.7-interface.patch new file mode 100644 index 0000000..51c7eff --- /dev/null +++ b/0009-fix-qt5.9.7-fits-the-Qt5.9.7-interface.patch @@ -0,0 +1,45 @@ +From e58669401e8e2b2a9e5c5654a2bd58444756ad71 Mon Sep 17 00:00:00 2001 +From: liuxinhao +Date: Tue, 5 Sep 2023 14:30:25 +0800 +Subject: [PATCH] fix(qt5.9.7): fits the Qt5.9.7 interface +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- 适配Qt5.9.7接口,修复编译报错 +--- + style/src/style.cpp | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/style/src/style.cpp b/style/src/style.cpp +index abe5517..2161c65 100644 +--- a/style/src/style.cpp ++++ b/style/src/style.cpp +@@ -93,12 +93,15 @@ int Style::styleHint(QStyle::StyleHint hint, const QStyleOption *option, const Q + // 弹出菜单是否支持用户在跨越菜单的其他项时将鼠标光标移动到子菜单 + case SH_Menu_SloppySubMenus: + return true; ++#if (QT_VERSION < QT_VERSION_CHECK(5, 10, 0)) + // 该值目前亦废弃,改用SH_Widget_Animation_Duration + case SH_Widget_Animate: + return true; ++#else + // 动画持续时间ms,0代表禁用 + case SH_Widget_Animation_Duration: + return 100; ++#endif + // 确定样式是在菜单中显示节,还是将其视为普通分隔符。节是带有文本和图标提示的分隔符 + case SH_Menu_SupportsSections: + return true; +@@ -327,7 +330,7 @@ void Style::drawPrimitive(QStyle::PrimitiveElement element, const QStyleOption * + + // clang-format off + switch (element) +- { ++ { + case PE_Frame: func = &drawPEFrame; break; + case PE_FrameFocusRect: func = &drawPEFrameFocusRect; break; + case PE_FrameGroupBox: func = &drawPEFrameGroupBox; break; +-- +2.33.0 + diff --git a/kiran-qt5-integration.spec b/kiran-qt5-integration.spec index c532e20..a898c26 100644 --- a/kiran-qt5-integration.spec +++ b/kiran-qt5-integration.spec @@ -1,6 +1,6 @@ Name: kiran-qt5-integration Version: 2.4.0 -Release: 11 +Release: 12 Summary: Kiran desktop platform integration plugin. License: MulanPSL-2.0 @@ -14,6 +14,7 @@ Patch0005: 0005-fix-style-add-ksl-os-gui-to-the-Style-whitelist.patch Patch0006: 0006-feat-cursor-theme-When-the-cursor-theme-changes-let-.patch Patch0007: 0007-fix-style-add-ksl-server-gui-and-ks-scmc-gui-to-kira.patch Patch0008: 0008-fix-cmake-target-change-cmake-target-name.patch +Patch0009: 0009-fix-qt5.9.7-fits-the-Qt5.9.7-interface.patch BuildRequires: cmake >= 3.2 BuildRequires: gcc-c++ @@ -69,6 +70,9 @@ make %{?_smp_mflags} %{_libdir}/pkgconfig/kiran-style-helper.pc %changelog +* Tue Sep 05 2023 liuxinhao - 2.4.0-12 +- KYOS-F: fits the Qt5.9.7 interface + * Mon Sep 04 2023 liuxinhao - 2.4.0-11 - KYOS-F: fix cmake target name test cause build error. -- Gitee