Conversation
Fixed a null pointer access issue in PageSystemProxy.qml by adding a null check before accessing the visibleToApp property. This prevents potential crashes when the ignoreHosts object is not available. Refactored DNS, IPv4, and IPv6 configuration sections to use DccRepeater for dynamic item management instead of manual component creation and destruction. This simplifies the code structure and eliminates the need for separate arrays to track created items. Added helper functions addAddressData() and removeAddressData() to centralize data manipulation logic. In the IPv6 validation logic, added null checks for gateway values to prevent errors when gateway fields are empty. This ensures proper validation of IPv6 configurations. Log: Fixed system proxy page visibility issue and improved DNS/IP configuration management Influence: 1. Test system proxy settings to ensure the "Ignore hosts" option appears correctly 2. Verify DNS configuration by adding and removing DNS servers 3. Test IPv4 configuration by adding multiple IP addresses 4. Test IPv6 configuration with empty and populated gateway fields 5. Validate all network configuration changes are properly saved 6. Check that UI updates correctly when modifying network settings fix: 修复空指针问题并改进DNS/IP配置 修复了PageSystemProxy.qml中的空指针访问问题,在访问visibleToApp属性前添 加了空值检查,防止ignoreHosts对象不可用时导致程序崩溃。 重构了DNS、IPv4和IPv6配置部分,使用DccRepeater进行动态项管理,替代了手动 创建和销毁组件的方式。这简化了代码结构,并消除了单独跟踪已创建项的需要。 添加了addAddressData()和removeAddressData()辅助函数来集中数据操作逻辑。 在IPv6验证逻辑中,为网关值添加了空值检查,防止网关字段为空时出现错误。这 确保了IPv6配置的正确验证。 Log: 修复系统代理页面显示问题并改进DNS/IP配置管理 Influence: 1. 测试系统代理设置,确保"忽略主机"选项正确显示 2. 验证DNS配置,测试添加和删除DNS服务器 3. 测试IPv4配置,添加多个IP地址 4. 测试IPv6配置,包括空和已填充的网关字段 5. 验证所有网络配置更改是否正确保存 6. 检查修改网络设置时UI是否正确更新
Reviewer's GuideThis PR fixes a null-pointer visibility issue on the system proxy page, refactors DNS/IPv4/IPv6 address editors to use DccRepeater with centralized add/remove helpers, and hardens IPv6 gateway validation and connectivity handling logic. Sequence diagram for DNS entry add/remove using DccRepeatersequenceDiagram
actor User
participant SectionDNS
participant DnsItem as DnsEditorItem
participant Config as DnsConfigArray
User->>DnsItem: Click add_icon
DnsItem->>SectionDNS: addAddressData("")
SectionDNS->>Config: push("")
SectionDNS->>SectionDNS: configChanged()
SectionDNS->>SectionDNS: editClicked()
Note over SectionDNS,Config: DccRepeater automatically reflects new config length
User->>DnsItem: Click delete_icon
DnsItem->>SectionDNS: removeAddressData(index)
SectionDNS->>Config: splice(index,1)
SectionDNS->>SectionDNS: configChanged()
SectionDNS->>SectionDNS: editClicked()
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In the IPv4/IPv6/DNS sections,
addAddressData/removeAddressDatanow encapsulate list mutations and notifications; consider removing any remainingipItems/similar tracking state or helper functions that are no longer used to avoid confusion about the source of truth. - In
onConnectivityChanged,ctityis initialized fromm_connectivitybut then immediately reassigned in the switch; if the intent is to preserve the previous value for unhandled enum cases, it would be clearer to add an explicitdefaultbranch that documents this behavior rather than relying on the initial value.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In the IPv4/IPv6/DNS sections, `addAddressData`/`removeAddressData` now encapsulate list mutations and notifications; consider removing any remaining `ipItems`/similar tracking state or helper functions that are no longer used to avoid confusion about the source of truth.
- In `onConnectivityChanged`, `ctity` is initialized from `m_connectivity` but then immediately reassigned in the switch; if the intent is to preserve the previous value for unhandled enum cases, it would be clearer to add an explicit `default` branch that documents this behavior rather than relying on the initial value.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
18202781743
approved these changes
Apr 8, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, caixr23 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 |
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.
Fixed a null pointer access issue in PageSystemProxy.qml by adding a null check before accessing the visibleToApp property. This prevents potential crashes when the ignoreHosts object is not available.
Refactored DNS, IPv4, and IPv6 configuration sections to use DccRepeater for dynamic item management instead of manual component creation and destruction. This simplifies the code structure and eliminates the need for separate arrays to track created items. Added helper functions addAddressData() and removeAddressData() to centralize data manipulation logic.
In the IPv6 validation logic, added null checks for gateway values to prevent errors when gateway fields are empty. This ensures proper validation of IPv6 configurations.
Log: Fixed system proxy page visibility issue and improved DNS/IP configuration management
Influence:
fix: 修复空指针问题并改进DNS/IP配置
修复了PageSystemProxy.qml中的空指针访问问题,在访问visibleToApp属性前添 加了空值检查,防止ignoreHosts对象不可用时导致程序崩溃。
重构了DNS、IPv4和IPv6配置部分,使用DccRepeater进行动态项管理,替代了手动
创建和销毁组件的方式。这简化了代码结构,并消除了单独跟踪已创建项的需要。
添加了addAddressData()和removeAddressData()辅助函数来集中数据操作逻辑。
在IPv6验证逻辑中,为网关值添加了空值检查,防止网关字段为空时出现错误。这
确保了IPv6配置的正确验证。
Log: 修复系统代理页面显示问题并改进DNS/IP配置管理
Influence:
Summary by Sourcery
Refine network configuration UI and stability by refactoring dynamic DNS/IP address handling and hardening proxy/connectivity logic.
Bug Fixes:
Enhancements: