-
Notifications
You must be signed in to change notification settings - Fork 40
fix: disable bluetooth failed #584
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
disable bluetooth failed due to name log: fix the disable bluetooth failed bug: https://pms.uniontech.com/bug-view-341783.html Change-Id: I4495dc67a1480ae3695c253b474e3dd45c11442a
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts how the Bluetooth device name attribute is set from hciconfig so that disabling Bluetooth is not blocked by missing or malformed Name data. Class diagram for updated DeviceBluetooth attribute handlingclassDiagram
class DeviceBluetooth {
- QString m_Name
- QString m_Alias
- QString m_Vendor
- QString m_Version
+ DeviceBluetooth()
+ void setInfoFromHciconfig(QMap~QString, QString~ mapInfo)
+ void setAttribute(QMap~QString, QString~ mapInfo, QString key, QString& target)
+ void setAttribute(QMap~QString, QString~ mapInfo, QString key, QString& target, bool required)
}
DeviceBluetooth : setInfoFromHciconfig() uses setAttribute(mapInfo, Name, m_Name, required = false)
DeviceBluetooth : setInfoFromHciconfig() uses setAttribute(mapInfo, Alias, m_Alias)
DeviceBluetooth : setInfoFromHciconfig() uses setAttribute(mapInfo, Manufacturer, m_Vendor)
DeviceBluetooth : setInfoFromHciconfig() uses setAttribute(mapInfo, HCI_Version, m_Version, required = true)
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review我来对这个代码变更进行审查:
改进建议:
enum class AttributeHandling {
Default,
Special
};
总体来说,这是一个合理的修改,提高了代码的明确性,但可以通过上述建议进一步提升代码质量。 |
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 there - I've reviewed your changes - here's some feedback:
- Consider adding a brief code comment or using a more self-descriptive parameter (e.g., via an enum or named constant) for the
falseargument tosetAttribute(mapInfo, "Name", m_Name, false)so future readers understand why the behavior forNamediffers from other attributes.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider adding a brief code comment or using a more self-descriptive parameter (e.g., via an enum or named constant) for the `false` argument to `setAttribute(mapInfo, "Name", m_Name, false)` so future readers understand why the behavior for `Name` differs from other attributes.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: add-uos, max-lvs 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 |
|
/forcemerge |
|
This pr force merged! (status: unstable) |
bc08e5b
into
linuxdeepin:develop/eagle
disable bluetooth failed due to name
log: fix the disable bluetooth failed
bug: https://pms.uniontech.com/bug-view-341783.html
Change-Id: I4495dc67a1480ae3695c253b474e3dd45c11442a
Summary by Sourcery
Bug Fixes: