-
Notifications
You must be signed in to change notification settings - Fork 57
sync: from linuxdeepin/dde-session-shell #447
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
Synchronize source files from linuxdeepin/dde-session-shell. Source-pull-request: linuxdeepin/dde-session-shell#29
Reviewer's GuideThis PR syncs updates from linuxdeepin/dde-session-shell, integrating a display manager–based session filtering workaround, refining user login state logic, and correcting CMake install directives for the greeter executable. Sequence diagram for updated user login state filtering via DisplayManagersequenceDiagram
participant SessionBaseModel
participant DBusDisplayManager
participant DBusDisplayManagerSession
actor Systemd
SessionBaseModel->>DBusDisplayManager: Query sessions()
loop For each session
DBusDisplayManager->>DBusDisplayManagerSession: Get session path
DBusDisplayManagerSession->>DBusDisplayManagerSession: Get UserName property
alt UserName is not empty
SessionBaseModel->>SessionBaseModel: Add to loggedUserNameList
end
end
SessionBaseModel->>SessionBaseModel: Use loggedUserNameList to filter logined users
Note right of SessionBaseModel: Only users present in DisplayManager sessions are considered logged in
Systemd-->>SessionBaseModel: (Sessions may be stale if kwin crashes)
Class diagram for updated SessionBaseModel user login logicclassDiagram
class SessionBaseModel {
- m_loginedUsers: QMap
- m_users: QMap
+ updateLoginedUserList(list: QString)
+ addUser(path: QString)
}
class DBusDisplayManager {
+ sessions(): QList<Session>
}
class DBusDisplayManagerSession {
+ path(): QString
+ property(name: QString): QVariant
}
SessionBaseModel --> DBusDisplayManager : uses
DBusDisplayManager --> DBusDisplayManagerSession : manages
SessionBaseModel --> DBusDisplayManagerSession : queries
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review代码审查意见:
总体来说,代码的修改看起来是合理的,但是需要注意确保所有新增的 |
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 @deepin-ci-robot - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `src/session-widgets/sessionbasemodel.cpp:480` </location>
<code_context>
+ loggedUserNameList.append(userName);
+ }
+ }
+ qInfo(DDE_SHELL) << "Logined users from display manager: " << loggedUserNameList;
QList<QString> loginedUsersTmp = m_loginedUsers->keys();
</code_context>
<issue_to_address>
Consider using 'Logged-in' instead of 'Logined' in log messages.
Using standard terminology like 'Logged-in' enhances clarity and maintainability.
Suggested implementation:
```cpp
qInfo(DDE_SHELL) << "Logged-in users from display manager: " << loggedUserNameList;
QList<QString> loggedInUsersTmp = m_loginedUsers->keys();
```
If `loginedUsersTmp` is used elsewhere in this function or file, you should also rename those occurrences to `loggedInUsersTmp` for consistency.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| loggedUserNameList.append(userName); | ||
| } | ||
| } | ||
| qInfo(DDE_SHELL) << "Logined users from display manager: " << loggedUserNameList; |
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.
nitpick (typo): Consider using 'Logged-in' instead of 'Logined' in log messages.
Using standard terminology like 'Logged-in' enhances clarity and maintainability.
Suggested implementation:
qInfo(DDE_SHELL) << "Logged-in users from display manager: " << loggedUserNameList;
QList<QString> loggedInUsersTmp = m_loginedUsers->keys();
If loginedUsersTmp is used elsewhere in this function or file, you should also rename those occurrences to loggedInUsersTmp for consistency.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: deepin-ci-robot, 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 |
Synchronize source files from linuxdeepin/dde-session-shell.
Source-pull-request: linuxdeepin/dde-session-shell#29
Summary by Sourcery
Sync session-shell changes to filter stale sessions, prevent login state crashes for custom accounts, and correct greeter installation in CMake.
Bug Fixes:
Enhancements:
Build: