From 17523794f035c7e66c232a799830c994da1a8a1b Mon Sep 17 00:00:00 2001 From: liuxinhao Date: Fri, 2 Jun 2023 15:05:34 +0800 Subject: [PATCH 8/9] fix(default device): Update the logic of the default authentication device MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复更新默认认证设备的逻辑,更新翻译 --- src/daemon/device/device-adaptor.cpp | 7 +++++-- translations/kiran-authentication-daemon.zh_CN.ts | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/daemon/device/device-adaptor.cpp b/src/daemon/device/device-adaptor.cpp index 32c768f..369554d 100644 --- a/src/daemon/device/device-adaptor.cpp +++ b/src/daemon/device/device-adaptor.cpp @@ -92,13 +92,14 @@ void DeviceAdaptor::updateDBusDeviceProxy(QSharedPointer dbusDe { RETURN_IF_FALSE(dbusDeviceProxy); + DEVICE_DEBUG() << "update auth device"; if (!this->m_dbusDeviceProxy || this->m_dbusDeviceProxy->deviceID() != dbusDeviceProxy->deviceID()) { if (this->m_dbusDeviceProxy) { - this->m_dbusDeviceProxy->disconnect(); - this->m_dbusDeviceProxy = nullptr; + this->m_dbusDeviceProxy->disconnect(this); + this->m_dbusDeviceProxy.clear(); } this->m_dbusDeviceProxy = dbusDeviceProxy; @@ -108,6 +109,8 @@ void DeviceAdaptor::updateDBusDeviceProxy(QSharedPointer dbusDe connect(this->m_dbusDeviceProxy.get(), &AuthDeviceProxy::EnrollStatus, this, &DeviceAdaptor::onEnrollStatus); connect(this->m_dbusDeviceProxy.get(), &AuthDeviceProxy::IdentifyStatus, this, &DeviceAdaptor::onIdentifyStatus); + + DEVICE_DEBUG() << "update auth device finished"; this->schedule(); } } diff --git a/translations/kiran-authentication-daemon.zh_CN.ts b/translations/kiran-authentication-daemon.zh_CN.ts index 8c03e2c..e74195f 100644 --- a/translations/kiran-authentication-daemon.zh_CN.ts +++ b/translations/kiran-authentication-daemon.zh_CN.ts @@ -27,7 +27,7 @@ 请输入PIN码。 - + can not find %1 device 未能检测到%1设备 -- 2.33.0