Commit 6f3fb61
committed
fix: fix null pointer and improve DNS/IP configuration
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是否正确更新1 parent 1cf9591 commit 6f3fb61
File tree
5 files changed
+112
-151
lines changed- dcc-network/qml
- src/impl/networkmanager
5 files changed
+112
-151
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
| 252 | + | |
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
109 | 119 | | |
110 | 120 | | |
111 | 121 | | |
| |||
153 | 163 | | |
154 | 164 | | |
155 | 165 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
178 | 192 | | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
183 | 201 | | |
184 | 202 | | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
192 | 212 | | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
211 | 219 | | |
212 | 220 | | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
230 | 237 | | |
231 | 238 | | |
232 | 239 | | |
233 | 240 | | |
234 | 241 | | |
235 | 242 | | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | 243 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
134 | 144 | | |
135 | 145 | | |
136 | 146 | | |
| |||
246 | 256 | | |
247 | 257 | | |
248 | 258 | | |
249 | | - | |
250 | | - | |
251 | | - | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
252 | 262 | | |
253 | | - | |
254 | 263 | | |
255 | 264 | | |
256 | 265 | | |
| |||
290 | 299 | | |
291 | 300 | | |
292 | 301 | | |
293 | | - | |
294 | | - | |
295 | | - | |
| 302 | + | |
296 | 303 | | |
297 | 304 | | |
298 | 305 | | |
| |||
309 | 316 | | |
310 | 317 | | |
311 | 318 | | |
312 | | - | |
313 | | - | |
314 | | - | |
| 319 | + | |
315 | 320 | | |
316 | 321 | | |
317 | 322 | | |
| |||
424 | 429 | | |
425 | 430 | | |
426 | 431 | | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | 432 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
124 | 134 | | |
125 | 135 | | |
126 | 136 | | |
| |||
247 | 257 | | |
248 | 258 | | |
249 | 259 | | |
250 | | - | |
251 | | - | |
252 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
253 | 263 | | |
254 | | - | |
255 | 264 | | |
256 | 265 | | |
257 | 266 | | |
| |||
292 | 301 | | |
293 | 302 | | |
294 | 303 | | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
300 | | - | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
301 | 308 | | |
302 | 309 | | |
303 | 310 | | |
| |||
314 | 321 | | |
315 | 322 | | |
316 | 323 | | |
317 | | - | |
318 | | - | |
319 | | - | |
| 324 | + | |
320 | 325 | | |
321 | 326 | | |
322 | 327 | | |
| |||
434 | 439 | | |
435 | 440 | | |
436 | 441 | | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | 442 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
384 | | - | |
| 384 | + | |
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
| |||
0 commit comments