Commit a671a09
committed
fix: use QPointer for default sink DBus interface
1. Changed m_defaultSinkInter from raw DBusSink pointer to
QPointer<DBusSink>
2. This prevents potential dangling pointer issues when the DBus object
is destroyed
3. QPointer automatically becomes null when the referenced QObject is
deleted
4. Improves memory safety and prevents crashes in the sound controller
Influence:
1. Test sound plugin functionality after system sound service restarts
2. Verify no crashes occur when default audio sink changes
3. Test volume control and mute functionality stability
4. Verify plugin correctly handles DBus service disappearance and
reappearance
fix: 使用 QPointer 管理默认音频接收器的 DBus 接口
1. 将 m_defaultSinkInter 从原始 DBusSink 指针改为 QPointer<DBusSink>
2. 防止当 DBus 对象被销毁时出现悬空指针问题
3. QPointer 在被引用的 QObject 删除时会自动变为 null
4. 提高内存安全性,防止声音控制器崩溃
Influence:
1. 测试系统声音服务重启后声音插件的功能
2. 验证默认音频接收器更改时不会发生崩溃
3. 测试音量控制和静音功能的稳定性
4. 验证插件正确处理 DBus 服务消失和重新出现的情况
PMS: BUG-3471991 parent adb65c2 commit a671a09
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
0 commit comments