!24 适配qt低版本的QUuid::WithoutBraces

From: @niko_yhc 
Reviewed-by: @liubuguiii 
Signed-off-by: @liubuguiii
This commit is contained in:
openeuler-ci-bot 2023-09-07 10:02:27 +00:00 committed by Gitee
commit f59eb17cda
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,33 @@
From 580281e9fb8001874f99324085fc2437d018b536 Mon Sep 17 00:00:00 2001
From: niko_yhc <yinhongchang@kylinsec.com.cn>
Date: Thu, 7 Sep 2023 17:11:53 +0800
Subject: [PATCH] fix(kiran-authentication-devices):fix QUuid::WithoutBraces
for qt low version
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
适配qt低版本的QUuid::WithoutBraces
---
src/device/auth-device.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/device/auth-device.cpp b/src/device/auth-device.cpp
index a321723..02dd411 100644
--- a/src/device/auth-device.cpp
+++ b/src/device/auth-device.cpp
@@ -40,7 +40,11 @@ bool AuthDevice::init()
return false;
}
m_dbusAdaptor = QSharedPointer<AuthDeviceAdaptor>(new AuthDeviceAdaptor(this));
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
m_deviceID = QUuid::createUuid().toString(QUuid::WithoutBraces);
+#else
+ m_deviceID = QUuid::createUuid().toString().remove('{').remove('}');
+#endif
m_deviceStatus = DEVICE_STATUS_IDLE;
registerDBusObject();
initServiceWatcher();
--
2.27.0

View File

@ -1,12 +1,13 @@
Name: kiran-authentication-devices
Version: 2.5.2
Release: 1
Release: 2
Summary: Kiran Authentication Devices
License: MulanPSL-2.0
Source0: %{name}-%{version}.tar.gz
Patch0001: 0001-fix-kiran-authentication-devices-fix-QUuid-WithoutBr.patch
BuildRequires: cmake
BuildRequires: gcc-c++
@ -65,6 +66,9 @@ systemctl enable kiran-authentication-devices.service
rm -rf ${buildroot}
%changelog
* Thu Sep 7 2023 yinhongchang <yinhongchang@kylinsec.com.cn> - 2.5.2-2
- KYOS-F: fix QUuid::WithoutBraces for qt low version
* Wed Jun 28 2023 luoqing <luoqing@kylinsec.com.cn> - 2.5.2-1
- KYOS-F: Fixed an issue where fish's UKey device could not Verify on arm machines
- KYOS-F: Remove the context class;