fix: fixed the wired device show error#514
Merged
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom Mar 5, 2026
Merged
fix: fixed the wired device show error#514deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
Conversation
because we used the macro, so the condition is error, the wired device which is off will show PMS: BUG-308755
deepin pr auto review这段帕克-2.0(Spark 2.0)对 git diff 输入或代码函数进行仔细的审查,并对语法逻辑,代码质量,代码性能和代码安全提出改进意见。请用中文回答。 代码审查报告总体评价本次代码变更主要涉及移除 详细审查1. CMakeLists.txt 变更变更内容:
评价:
2. networkmanagerprocesser.cpp 变更2.1 版权信息更新变更内容: -// SPDX-FileCopyrightText: 2018 - 2022 UnionTech Software Technology Co., Ltd.
+// SPDX-FileCopyrightText: 2018 - 2026 UnionTech Software Technology Co., Ltd.评价:
2.2 createOrRemoveDevice 函数变更变更内容: - if (device->managed()
-#ifdef USE_DEEPIN_NMQT
- && ((device->interfaceFlags() & DEVICE_INTERFACE_FLAG_UP) ||
- device->type() == NetworkManager::Device::Wifi)
-#endif
- ) {
+ if (device->managed() && ((device->interfaceFlags() & DEVICE_INTERFACE_FLAG_UP) || device->type() == NetworkManager::Device::Wifi)) {评价:
2.3 onDeviceAdded 函数变更变更内容: -#ifdef USE_DEEPIN_NMQT
connect(currentDevice.get(), &NetworkManager::Device::interfaceFlagsChanged, currentDevice.get(), [ uni, this ] {
createOrRemoveDevice(uni);
});
-#endif评价:
改进建议
总结这次代码变更简化了条件编译,提高了代码的一致性和可维护性。主要风险在于需要确保新的统一逻辑在所有平台上都能正常工作。建议进行充分的测试,特别是在不同平台和不同设备类型上的测试。 |
caixr23
approved these changes
Mar 5, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: caixr23, ut003640 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Contributor
Author
|
/force |
Contributor
Author
|
/forcemerge |
Contributor
|
This pr force merged! (status: unstable) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
because we used the macro, so the condition is error, the wired device which is off will show
PMS: BUG-308755