Commit 49dcdec
committed
fix: fix DCI file engine compatibility issues in Qt6
1. Fixed DDciFileEngineIterator constructor signatures for Qt 6.8.0
and above
2. Updated file filtering logic to use new QDirListing::IteratorFlags in
Qt 6.8.0+
3. Modified fileName() method to return fileName() instead of baseName()
for BaseName case in Qt6
4. Added m_listingFilters member to store iterator flags in Qt 6.8.0+
5. Updated beginEntryList methods to pass path parameter to iterator
constructor
6. Fixed conditional compilation for different Qt versions to ensure
proper API usage
The changes address unit test failures in Qt6 environment by adapting to
API changes in Qt 6.8.0 and later versions. Specifically:
- Qt 6.8.0 introduced new iterator constructors requiring path parameter
- QDirListing::IteratorFlags replaced QDir::Filters for some APIs
- BaseName behavior changed in Qt6 requiring different implementation
- File filtering logic needed updates for new flag handling
Log: Fixed DCI file engine compatibility with Qt6
Influence:
1. Test file listing operations with various filter combinations
2. Verify file name extraction for different file types
3. Test symlink handling in file listings
4. Verify directory traversal functionality
5. Test cross-version compatibility with different Qt versions
6. Validate file engine operations in unit tests
fix: 修复DCI文件引擎在Qt6下的兼容性问题
1. 为Qt 6.8.0及以上版本修复DDciFileEngineIterator构造函数签名
2. 更新文件过滤逻辑以在Qt 6.8.0+中使用新的QDirListing::IteratorFlags
3. 修改fileName()方法,在Qt6中为BaseName情况返回fileName()而不是
baseName()
4. 添加m_listingFilters成员以在Qt 6.8.0+中存储迭代器标志
5. 更新beginEntryList方法以将路径参数传递给迭代器构造函数
6. 修复不同Qt版本的条件编译以确保正确的API使用
这些更改解决了Qt6环境中的单元测试失败问题,通过适配Qt 6.8.0及更高版本中
的API变更。具体包括:
- Qt 6.8.0引入了需要路径参数的新迭代器构造函数
- QDirListing::IteratorFlags在某些API中替换了QDir::Filters
- Qt6中BaseName行为变更需要不同的实现
- 文件过滤逻辑需要更新以适应新的标志处理方式
Log: 修复DCI文件引擎与Qt6的兼容性问题
Influence:
1. 测试使用各种过滤器组合的文件列表操作
2. 验证不同文件类型的文件名提取
3. 测试文件列表中的符号链接处理
4. 验证目录遍历功能
5. 测试与不同Qt版本的跨版本兼容性
6. 在单元测试中验证文件引擎操作1 parent d3b2ef9 commit 49dcdec
2 files changed
+46
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
79 | 80 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | 81 | | |
84 | | - | |
85 | 82 | | |
86 | | - | |
87 | 83 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
92 | 87 | | |
| 88 | + | |
93 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
94 | 93 | | |
95 | 94 | | |
96 | 95 | | |
| |||
116 | 115 | | |
117 | 116 | | |
118 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
119 | 130 | | |
120 | 131 | | |
121 | | - | |
122 | 132 | | |
123 | 133 | | |
124 | | - | |
| 134 | + | |
125 | 135 | | |
126 | 136 | | |
127 | | - | |
| 137 | + | |
128 | 138 | | |
129 | 139 | | |
130 | | - | |
| 140 | + | |
131 | 141 | | |
132 | 142 | | |
133 | 143 | | |
| |||
527 | 537 | | |
528 | 538 | | |
529 | 539 | | |
530 | | - | |
| 540 | + | |
| 541 | + | |
531 | 542 | | |
532 | 543 | | |
533 | 544 | | |
| |||
572 | 583 | | |
573 | 584 | | |
574 | 585 | | |
575 | | - | |
576 | | - | |
577 | | - | |
| 586 | + | |
578 | 587 | | |
579 | 588 | | |
580 | 589 | | |
581 | 590 | | |
582 | 591 | | |
583 | 592 | | |
584 | | - | |
585 | | - | |
| 593 | + | |
586 | 594 | | |
587 | 595 | | |
588 | 596 | | |
589 | 597 | | |
590 | 598 | | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
591 | 608 | | |
592 | 609 | | |
593 | 610 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
40 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
41 | 47 | | |
42 | 48 | | |
43 | 49 | | |
44 | 50 | | |
45 | 51 | | |
46 | | - | |
47 | 52 | | |
48 | 53 | | |
49 | 54 | | |
| |||
54 | 59 | | |
55 | 60 | | |
56 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
57 | 65 | | |
58 | 66 | | |
59 | 67 | | |
| |||
111 | 119 | | |
112 | 120 | | |
113 | 121 | | |
114 | | - | |
| 122 | + | |
115 | 123 | | |
116 | | - | |
117 | | - | |
118 | 124 | | |
119 | 125 | | |
120 | 126 | | |
| |||
0 commit comments