-
Notifications
You must be signed in to change notification settings - Fork 55
refactor: remove debug panel and legacy DBus code #1182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
1. Removed DataPanel.qml and related test functionality from NotifyHeader.qml 2. Removed legacy DBus notification handling code in notificationcenterpanel.cpp 3. Cleaned up NotifyAccessor by removing debug/test methods (addNotify, fetchDataInfo) 4. Simplified notification removal methods to only use new dataUpdater interface 5. Improved database error logging in DBAccessor 6. Enhanced notification logging in NotificationManager These changes remove unused debug/test code and legacy DBus interfaces that were replaced by the new dataUpdater system. The cleanup improves code maintainability and reduces potential security surface by removing unused code paths. The logging improvements provide better debugging information while removing redundant debug tools. refactor: 移除调试面板和遗留DBus代码 1. 移除DataPanel.qml及NotifyHeader.qml中的相关测试功能 2. 删除notificationcenterpanel.cpp中的遗留DBus通知处理代码 3. 清理NotifyAccessor中的调试/测试方法(addNotify, fetchDataInfo) 4. 简化通知移除方法,仅使用新的dataUpdater接口 5. 在DBAccessor中改进数据库错误日志记录 6. 在NotificationManager中增强通知日志记录 这些变更移除了未使用的调试/测试代码和被新dataUpdater系统取代的遗留DBus接 口。清理工作提高了代码可维护性,并通过移除未使用的代码路径减少了潜在的安 全风险。日志记录的改进在移除冗余调试工具的同时提供了更好的调试信息。
deepin pr auto review关键摘要:
是否建议立即修改:
|
Reviewer's GuideThis PR removes the unused debug panel and legacy DBus notification paths, consolidates NotifyAccessor’s removal logic onto the new dataUpdater interface, and tightens up logging in both the database accessor and notification manager for clearer diagnostics. Class diagram for NotifyAccessor after debug/test code removalclassDiagram
class NotifyAccessor {
+static NotifyAccessor* instance()
+void removeEntity(qint64 id)
+void removeEntityByApp(const QString &appName)
+void clear()
+void closeNotify(const NotifyEntity &entity, NotifyEntity::ClosedReason reason)
+void onNotificationStateChanged(qint64 id, int processedType)
+void onReceivedRecord(const QString &id)
+bool debugging() const
+void setDataUpdater(QObject *server)
+void setEnabled(bool enabled)
+void openNotificationSetting()
-DataAccessor *m_accessor
-QObject *m_dataUpdater
-QStringList m_pinnedApps
-bool m_debugging
-bool m_enabled
}
class DataAccessor
class NotifyEntity
NotifyAccessor --> DataAccessor
NotifyAccessor --> NotifyEntity
Class diagram for DBAccessor with improved error loggingclassDiagram
class DBAccessor {
+bool open(const QString &dataPath)
+bool isValid() const
+qint64 addEntity(const NotifyEntity &entity)
...
}
class QSqlDatabase
class QSqlError
DBAccessor --> QSqlDatabase
DBAccessor --> QSqlError
Class diagram for NotificationManager with enhanced loggingclassDiagram
class NotificationManager {
+uint Notify(const QString &appName, uint replacesId, const QString &appIcon, const QString &summary, const QString &body, const QStringList &actions, const QVariantMap &hints, int expireTimeout)
...
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @18202781743 - I've reviewed your changes and they look great!
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, yixinshark The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
NotifyHeader.qml
notificationcenterpanel.cpp
fetchDataInfo)
interface
These changes remove unused debug/test code and legacy DBus interfaces
that were replaced by the new dataUpdater system. The cleanup improves
code maintainability and reduces potential security surface by removing
unused code paths. The logging improvements provide better debugging
information while removing redundant debug tools.
refactor: 移除调试面板和遗留DBus代码
这些变更移除了未使用的调试/测试代码和被新dataUpdater系统取代的遗留DBus接
口。清理工作提高了代码可维护性,并通过移除未使用的代码路径减少了潜在的安
全风险。日志记录的改进在移除冗余调试工具的同时提供了更好的调试信息。
Summary by Sourcery
Remove unused debug panel and legacy DBus code, streamline notification removal through the new dataUpdater interface, and improve logging across the notification framework
Enhancements:
Build: