34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
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
|
|
|