refactor: remove debug panel and legacy DBus code#1182
Merged
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.
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.
yixinshark
approved these changes
Jul 10, 2025
|
[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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: