Commit 6ffef3a
zhangjiarui
fix(editor): support opening files with MIME subtypes via parent type inheritance
- Refactor isMimeTypeSupport() to retain QMimeDatabase and QMimeType objects for further queries
- Replace QStringList stream insertion with initializer list construction
- Add parentMimeTypes() lookup to match MIME subtypes against the whitelist (e.g. application/schema+json → application/json)
修复(editor): 通过父类型继承支持打开 MIME 子类型文件
- 重构 isMimeTypeSupport(),保留 QMimeDatabase 和 QMimeType 对象以供后续查询
- 将 QStringList 的流插入替换为初始化列表构造
- 新增 parentMimeTypes() 查找,将 MIME 子类型与白名单匹配(如 application/schema+json → application/json)
Log: 修复 JSON Schema 等 MIME 子类型文件无法被编辑器打开的问题,通过检查父 MIME 类型继承关系扩展白名单匹配范围
Bug: https://pms.uniontech.com/bug-view-362023.html1 parent 86ad04a commit 6ffef3a
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
539 | 539 | | |
540 | 540 | | |
541 | 541 | | |
| 542 | + | |
542 | 543 | | |
543 | 544 | | |
544 | 545 | | |
| |||
564 | 565 | | |
565 | 566 | | |
566 | 567 | | |
| 568 | + | |
567 | 569 | | |
568 | 570 | | |
569 | 571 | | |
| |||
0 commit comments