Commit 3cc4074
committed
refactor: remove redundant positionViewAtBeginning functions
Removed multiple positionViewAtBeginning() functions from various QML
view components (GridViewContainer, AnalysisView, FreeSortListView,
FrequentlyUsedView, RecentlyInstalledView, SearchResultView)
as they were redundant wrapper functions that simply called the
underlying QML view's positionViewAtBeginning() method. Added a new
itemBroughtToFront() signal to ItemArrangementProxyModel that triggers
automatic view repositioning in FreeSortListView when items are brought
to front, eliminating the need for manual view positioning calls.
Log: N/A
Influence:
1. Test that bringing items to front in free sort mode automatically
scrolls the view to beginning
2. Verify all grid and list views still function correctly without
explicit positionViewAtBeginning calls
3. Test search results display and navigation
4. Verify frequently used and recently installed views maintain proper
scrolling behavior
5. Test drag and drop operations in free sort mode
6. Verify view focus behavior remains intact
refactor: 移除冗余的positionViewAtBeginning函数
从多个QML视图组件(GridViewContainer、AnalysisView、FreeSortListView、
FrequentlyUsedView、RecentlyInstalledView、SearchResultView)中移除了
positionViewAtBeginning()函数,这些函数是冗余的包装函数,仅调用底层QML视
图的positionViewAtBeginning()方法。在ItemArrangementProxyModel中添加了新
的itemBroughtToFront()信号,当项目被置顶时自动触发FreeSortListView中的视
图重新定位,消除了手动调用视图定位的需求。
Log: 无
Influence:
1. 测试在自由排序模式下将项目置顶时是否自动滚动视图到起始位置
2. 验证所有网格和列表视图在没有显式positionViewAtBeginning调用的情况下仍
能正常工作
3. 测试搜索结果展示和导航功能
4. 验证常用应用和最近安装视图保持正确的滚动行为
5. 测试自由排序模式下的拖放操作
6. 验证视图焦点行为保持完整
PMS: BUG-3355351 parent 80fe34c commit 3cc4074
9 files changed
Lines changed: 16 additions & 35 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | 47 | | |
52 | 48 | | |
53 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | 24 | | |
30 | 25 | | |
31 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 28 | | |
33 | 29 | | |
34 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | 42 | | |
47 | 43 | | |
48 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | 27 | | |
32 | 28 | | |
33 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 28 | | |
33 | 29 | | |
34 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
69 | 71 | | |
70 | 72 | | |
71 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
0 commit comments