Commit 2d77e26
refactor: use QDBusServiceWatcher to detect frontend exit
Replace polling-based frontend exit detection with event-driven
DBus NameOwnerChanged signal monitoring.
Changes:
- Use QDBusServiceWatcher to monitor frontend DBus name unregistration
- Remove QTimer-based /proc/<pid>/exe polling
- Simplify command-line arguments (remove PID, keep DBus name only)
Benefits:
- Event-driven instead of polling, more efficient
- No dependency on Linux-specific /proc filesystem
- More reliable detection via DBus daemon guarantees
Task: https://pms.uniontech.com/task-view-388685.html1 parent 7639e43 commit 2d77e26
2 files changed
Lines changed: 15 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | 18 | | |
30 | 19 | | |
31 | 20 | | |
| |||
40 | 29 | | |
41 | 30 | | |
42 | 31 | | |
43 | | - | |
44 | 32 | | |
45 | | - | |
| 33 | + | |
46 | 34 | | |
47 | 35 | | |
48 | 36 | | |
49 | 37 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
54 | 41 | | |
55 | 42 | | |
56 | | - | |
57 | 43 | | |
58 | 44 | | |
59 | 45 | | |
| |||
96 | 82 | | |
97 | 83 | | |
98 | 84 | | |
99 | | - | |
100 | | - | |
101 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
102 | 94 | | |
103 | | - | |
104 | 95 | | |
105 | 96 | | |
106 | 97 | | |
0 commit comments