fix(qt5.9.7): fits the Qt5.9.7 interface

- 适配Qt5.9.7接口,修复编译报错
This commit is contained in:
liuxinhao 2023-09-05 15:01:55 +08:00
parent ac7d2bb405
commit 64172fbb5f
2 changed files with 50 additions and 1 deletions

View File

@ -0,0 +1,45 @@
From e58669401e8e2b2a9e5c5654a2bd58444756ad71 Mon Sep 17 00:00:00 2001
From: liuxinhao <liuxinhao@kylinsec.com.cn>
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

View File

@ -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 <liuxinhao@kylinsec.com.cn> - 2.4.0-12
- KYOS-F: fits the Qt5.9.7 interface
* Mon Sep 04 2023 liuxinhao <liuxinhao@kylinsec.com.cn> - 2.4.0-11
- KYOS-F: fix cmake target name test cause build error.