Commit f2f0ead
fix: support string list in notification hints
1. Added LIST_VALUE_SEGMENT constant for string list serialization
2. Modified convertHintsToString to handle QStringList values by joining
with separator
3. Updated parseHint to reconstruct QStringList from serialized format
4. Improved action handling in NotificationManager to properly process
string list hints
5. Added deprecation warning for old string format hints
These changes were necessary to properly support complex hint values
in notifications, particularly for action parameters that may contain
multiple values. The previous implementation only supported simple
string values, which limited functionality.
fix: 支持通知提示中的字符串列表
1. 添加 LIST_VALUE_SEGMENT 常量用于字符串列表序列化
2. 修改 convertHintsToString 方法以处理 QStringList 值并使用分隔符连接
3. 更新 parseHint 方法从序列化格式重建 QStringList
4. 改进 NotificationManager 中的动作处理以正确处理字符串列表提示
5. 为旧的字符串格式提示添加弃用警告
这些变更是为了在通知中正确支持复杂的提示值,特别是可能包含多个值的动作参
数。之前的实现仅支持简单字符串值,限制了功能。
pms: BUG-3176491 parent 099fb8a commit f2f0ead
File tree
2 files changed
+23
-3
lines changed- panels/notification
- common
- server
2 files changed
+23
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
294 | 295 | | |
295 | 296 | | |
296 | 297 | | |
297 | | - | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
298 | 305 | | |
299 | 306 | | |
300 | 307 | | |
| |||
328 | 335 | | |
329 | 336 | | |
330 | 337 | | |
331 | | - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
332 | 345 | | |
333 | 346 | | |
334 | 347 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
512 | 512 | | |
513 | 513 | | |
514 | 514 | | |
515 | | - | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
516 | 523 | | |
517 | 524 | | |
518 | 525 | | |
| |||
0 commit comments