-
Notifications
You must be signed in to change notification settings - Fork 40
fix: maintain the monitor info in special machine. #496
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
Maintain the monitor info of supported resolutions in special machine. Log: Maintain the monitor info in special machine. Bug: https://pms.uniontech.com/bug-view-325731.html Change-Id: Iddfadc1ab05f3b81df5469240fde4346ac35e378
Reviewer's GuideIntroduce conditional logic around Common::specialComType to manage monitor resolution info maintenance and UI updates on special machines, and remove unused debug code. Sequence diagram for monitor info update with special machine conditionsequenceDiagram
participant MainWindow
participant DeviceWidget
participant Common
participant QtConcurrent
MainWindow->>DeviceWidget: updateDevice(currentIndex, lst)
MainWindow->>Common: check specialComType
alt specialComType <= 0
MainWindow->>DeviceWidget: currentIndex() == "Monitor"
MainWindow->>QtConcurrent: run (emit itemClicked after delay)
else specialComType > 0
Note right of MainWindow: Skip UI update for monitor
end
Sequence diagram for DeviceMonitor setting monitor resolution infosequenceDiagram
participant DeviceMonitor
participant Common
DeviceMonitor->>Common: check specialComType
alt specialComType > 0
DeviceMonitor->>DeviceMonitor: setAttribute("Resolution", m_SupportResolution)
DeviceMonitor->>DeviceMonitor: Parse and format m_SupportResolution
else specialComType <= 0
DeviceMonitor->>DeviceMonitor: Skip setting m_SupportResolution
end
Class diagram for DeviceMonitor and conditional monitor info maintenanceclassDiagram
class DeviceMonitor {
+void setInfoFromHwinfo(const QMap<QString, QString> &mapInfo)
+bool setInfoFromXradr(const QString &main, const QString &edid, const QString &xrandr)
-QString m_SupportResolution
}
class Common {
+static int specialComType
}
DeviceMonitor ..> Common : uses
Class diagram for MainWindow and conditional UI updateclassDiagram
class MainWindow {
+void slotLoadingFinish(const QString &message)
-mp_DeviceWidget
}
class DeviceWidget {
+void updateDevice(int index, QList<QMap<QString, QString>> lst)
+QString currentIndex()
+void itemClicked(QString index)
}
class Common {
+static int specialComType
}
MainWindow ..> DeviceWidget : uses
MainWindow ..> Common : uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review代码审查意见:
|
|
[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) |
b71dbea
into
linuxdeepin:develop/eagle
Maintain the monitor info of supported resolutions in special machine.
Log: Maintain the monitor info in special machine.
Bug: https://pms.uniontech.com/bug-view-325731.html
Change-Id: Iddfadc1ab05f3b81df5469240fde4346ac35e378
Summary by Sourcery
Ensure monitor resolution information is correctly maintained for special machines and restrict certain operations to normal machines.
Bug Fixes:
Enhancements: