Commit ea051bd
committed
fix(thermal): eliminate async race condition in modal tab routing
- PopoutService: replace Qt.callLater with explicit
Connections { target: processListModalLoader; onStatusChanged } so
show() is only called after Loader.Ready, not just after setActive(true).
Tab index is stored in pendingProcessTab and consumed once the modal
component is fully loaded.
- ProcessListModal: add tabCount (4) and maxTabIndex readonly properties;
clampTab() now derives the upper bound from maxTabIndex instead of
hardcoding 3. nextTab()/previousTab() also use tabCount.
- ProcessListModal.show(): restore sort state by calling
DgopService.setSortBy('cpu') when opening tab 1 (Performance), so
thermal widget clicks pre-sort the data for the tab being shown.
- Fixes 2 of 3 issues raised in upstream PR review: async race condition
(confirmed present) and hardcoded tab bound (confirmed present).
Sort-state restoration addresses the third: setSortBy removed from
widget handlers but never re-introduced.1 parent 36fcf6b commit ea051bd
2 files changed
Lines changed: 33 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
16 | 21 | | |
17 | 22 | | |
18 | 23 | | |
| |||
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
27 | | - | |
| 32 | + | |
28 | 33 | | |
29 | 34 | | |
30 | 35 | | |
| |||
33 | 38 | | |
34 | 39 | | |
35 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
36 | 48 | | |
37 | 49 | | |
38 | 50 | | |
| |||
91 | 103 | | |
92 | 104 | | |
93 | 105 | | |
94 | | - | |
| 106 | + | |
95 | 107 | | |
96 | 108 | | |
97 | 109 | | |
98 | | - | |
| 110 | + | |
99 | 111 | | |
100 | 112 | | |
101 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| |||
763 | 765 | | |
764 | 766 | | |
765 | 767 | | |
| 768 | + | |
766 | 769 | | |
767 | | - | |
768 | 770 | | |
769 | 771 | | |
770 | 772 | | |
| |||
783 | 785 | | |
784 | 786 | | |
785 | 787 | | |
| 788 | + | |
786 | 789 | | |
787 | | - | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
788 | 804 | | |
789 | 805 | | |
790 | 806 | | |
| |||
0 commit comments