You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(dock): integrate optional event logging support
Add conditional event logging support for dock-related modules and wire
the required build detection and package dependency. The implementation
keeps the logging integration optional when the event logger headers are
unavailable.
Refactor event logging code to reduce duplication and fix a UI-blocking
issue: extract shared logDockConfig() helper in DockSettings and
updateAndLogTrayPluginList() helper in DockDBusProxy, unify
visiblePluginList/visiblePluginCount into VisiblePluginStats, simplify
timer wiring, and move dpkg-query off the UI thread using
QtConcurrent::run with pre-start in the constructor.
Consolidate EventLogger::init() into DockPanel::load() so it runs
before any sub-component writes events, and move startup log calls
from constructors to init() methods to ensure the logger is ready.
Minimize #ifdef HAVE_DDE_API_EVENTLOGGER to only guard the
dde-api/eventlogger.hpp include and writeEventLog() calls; logging
functions are always compiled and become no-ops when the header is
absent. Use find_path with NO_CACHE for better portability.
feat(dock): 集成可选事件日志支持
为 dock 相关模块添加条件事件日志支持,并接入所需的构建检测与包依赖。
该实现会在缺少事件日志头文件时保持日志集成可选。
重构事件日志代码以减少重复并修复 UI 阻塞问题:在 DockSettings 中
提取 logDockConfig() 辅助方法,在 DockDBusProxy 中提取
updateAndLogTrayPluginList() 辅助方法,将 visiblePluginList 和
visiblePluginCount 统一为 VisiblePluginStats,简化定时器连接,
并使用 QtConcurrent::run 将 dpkg-query 移至后台线程,在构造函数
中预启动以确保首次使用时结果已就绪。
将 EventLogger::init() 统一到 DockPanel::load() 中,确保在任何
子组件写入事件前完成初始化;将启动日志调用从构造函数移至 init()
方法以保证 logger 已就绪。将 #ifdef HAVE_DDE_API_EVENTLOGGER
缩减至仅包裹 dde-api/eventlogger.hpp 的 include 和 writeEventLog()
调用,日志函数始终编译,在缺少头文件时为空操作。使用 find_path
的 NO_CACHE 提升可移植性。
PMS: TASK-388657
0 commit comments