-
Notifications
You must be signed in to change notification settings - Fork 48
fix: resolve WiFi connection notification issue on login screen #434
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
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR resolves the missing WiFi connection notifications on the login screen by removing redundant flag-related members and methods, migrating notification logic to use the NetManagerFlags system, updating the logging configuration, and cleaning up obsolete code. Sequence diagram for WiFi connection notification logic using NetManagerFlagssequenceDiagram
participant NetManagerThreadPrivate
participant NetworkManager_Device
NetManagerThreadPrivate->>NetworkManager_Device: addDeviceNotify(path)
alt Net_MonitorNotify flag is set
NetManagerThreadPrivate->>NetworkManager_Device: Notify device status changed
else Net_MonitorNotify flag is not set
NetManagerThreadPrivate-->>NetworkManager_Device: (No notification sent)
end
Sequence diagram for logging configuration updatesequenceDiagram
participant NetworkController
participant DtkCoreLoggerInstance
NetworkController->>DtkCoreLoggerInstance: setDefaultCategory(DNC().categoryName())
Class diagram for updated NetManagerThreadPrivate and NetManagerPrivateclassDiagram
class NetManagerThreadPrivate {
+bool AirplaneModeEnabled()
+void setEnabled(bool enabled)
+void setAutoScanInterval(int ms)
+void setAutoScanEnabled(bool enabled)
+void setServerKey(const QString &serverKey)
+void setNetCheckAvailable(bool available)
+void setSecretAgent(QObject *agent)
+void setFlags(NetType::NetManagerFlags flags)
-NetType::NetManagerFlags m_flags
-bool m_isInitialized
-bool m_enabled
-int m_autoScanInterval
// Removed:
// -bool m_monitorNetworkNotify
// -bool m_useSecretAgent
// -void setMonitorNetworkNotify(bool monitor)
// -void setUseSecretAgent(bool enabled)
}
class NetManagerPrivate {
+void setAutoScanInterval(int ms)
+void setAutoScanEnabled(bool enabled)
+void setEnabled(bool enabled)
// Removed:
// -void setMonitorNetworkNotify(bool monitor)
// -void setUseSecretAgent(bool enabled)
}
NetManagerThreadPrivate <|-- NetManagerPrivate
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.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: caixr23, robertkill 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 |
Fixed the issue where WiFi connection notifications were not appearing on the login screen. The problem was caused by incorrect flag handling for network monitoring and secret agent usage. Removed redundant member variables and methods that were duplicating functionality already provided by the NetManagerFlags system. Now properly uses flag-based configuration for network monitoring notifications. The changes include: 1. Removed m_monitorNetworkNotify and m_useSecretAgent member variables 2. Removed setMonitorNetworkNotify() and setUseSecretAgent() methods 3. Updated notification checks to use NetType::NetManagerFlag::Net_MonitorNotify flag 4. Fixed logging configuration to use setDefaultCategory() instead of logToGlobalInstance() 5. Cleaned up commented code and unused methods Log: Fixed WiFi connection notifications not showing on login screen Influence: 1. Test WiFi connection notifications on login screen 2. Verify network status changes trigger proper notifications 3. Check that secret agent functionality works correctly 4. Test network auto-scan functionality 5. Verify logging system works properly after configuration change fix: 修复登录界面连接WiFi无通知问题 修复了登录界面连接WiFi时没有通知显示的问题。问题原因是网络监控和密码代理 的标志处理不正确。移除了与NetManagerFlags系统功能重复的冗余成员变量和方 法。现在正确使用基于标志的配置来处理网络监控通知。 修改内容包括: 1. 移除m_monitorNetworkNotify和m_useSecretAgent成员变量 2. 移除setMonitorNetworkNotify()和setUseSecretAgent()方法 3. 更新通知检查以使用NetType::NetManagerFlag::Net_MonitorNotify标志 4. 修复日志配置,使用setDefaultCategory()替代logToGlobalInstance() 5. 清理注释代码和未使用方法 Log: 修复登录界面WiFi连接通知不显示问题 Influence: 1. 测试登录界面的WiFi连接通知功能 2. 验证网络状态变化是否触发正确的通知 3. 检查密码代理功能是否正常工作 4. 测试网络自动扫描功能 5. 验证日志系统在配置更改后正常工作 PMS: BUG-315291
deepin pr auto review我来对这段代码修改进行审查分析:
建议改进:
总体来说,这次改动提升了代码的可维护性和一致性,是一次很好的重构。 |
Fixed the issue where WiFi connection notifications were not appearing on the login screen. The problem was caused by incorrect flag handling for network monitoring and secret agent usage. Removed redundant member variables and methods that were duplicating functionality already provided by the NetManagerFlags system. Now properly uses flag-based configuration for network monitoring notifications.
The changes include:
Log: Fixed WiFi connection notifications not showing on login screen
Influence:
fix: 修复登录界面连接WiFi无通知问题
修复了登录界面连接WiFi时没有通知显示的问题。问题原因是网络监控和密码代理
的标志处理不正确。移除了与NetManagerFlags系统功能重复的冗余成员变量和方
法。现在正确使用基于标志的配置来处理网络监控通知。
修改内容包括:
Log: 修复登录界面WiFi连接通知不显示问题
Influence:
PMS: BUG-315291
Summary by Sourcery
Use flag-based configuration for network monitoring and secret agent, fix missing WiFi notifications on the login screen, and clean up redundant code and logging setup
Bug Fixes:
Enhancements: