From d34a20869732ea83345588730abfa224a4c9816b Mon Sep 17 00:00:00 2001 From: Robertkill Date: Fri, 27 Feb 2026 14:04:06 +0800 Subject: [PATCH] fix: remove MAC address validator from cloned MAC field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Removed the RegularExpressionValidator that enforced MAC address format validation on the cloned-mac-address field 2. This change allows users to input any text value in the cloned MAC address field without format restrictions 3. The validator was likely too restrictive for certain use cases where non-standard MAC address formats might be needed 4. The field still retains its basic functionality but without the format validation constraint Influence: 1. Test entering various text values in the cloned MAC address field including valid MAC addresses, invalid formats, and arbitrary text 2. Verify that all input values are accepted without validation errors 3. Ensure the application doesn't crash when saving non-standard MAC address values 4. Test that the cloned MAC address functionality still works correctly with valid MAC addresses 5. Verify that the UI properly displays whatever value is entered in the field fix: 从克隆MAC地址字段移除MAC地址验证器 1. 移除了对克隆MAC地址字段强制实施MAC地址格式验证的 RegularExpressionValidator 2. 此更改允许用户在克隆MAC地址字段中输入任何文本值,不受格式限制 3. 验证器可能对某些需要非标准MAC地址格式的使用场景过于严格 4. 该字段仍保留其基本功能,但不再有格式验证约束 Influence: 1. 测试在克隆MAC地址字段中输入各种文本值,包括有效的MAC地址、无效格式和 任意文本 2. 验证所有输入值都能被接受,不会出现验证错误 3. 确保应用程序在保存非标准MAC地址值时不会崩溃 4. 测试克隆MAC地址功能在使用有效MAC地址时仍能正常工作 5. 验证UI能正确显示输入到字段中的任何值 PMS: BUG-351321 --- dcc-network/qml/SectionDevice.qml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dcc-network/qml/SectionDevice.qml b/dcc-network/qml/SectionDevice.qml index 4698c610..a0a6b479 100644 --- a/dcc-network/qml/SectionDevice.qml +++ b/dcc-network/qml/SectionDevice.qml @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2024 - 2027 UnionTech Software Technology Co., Ltd. +// SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd. // SPDX-License-Identifier: GPL-3.0-or-later import QtQuick 2.15 import QtQuick.Controls 2.15 @@ -137,9 +137,6 @@ DccTitleObject { pageType: DccObject.Editor page: D.LineEdit { text: root.config.hasOwnProperty("cloned-mac-address") ? root.config["cloned-mac-address"] : "" - validator: RegularExpressionValidator { - regularExpression: NetUtils.macRegExp - } onTextChanged: { if (showAlert) { errorKey = ""