-
Notifications
You must be signed in to change notification settings - Fork 73
feat: [session] add session manager to save/restore workspace state #1003
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
|
Note
详情{
"src/plugins/core/uicontroller/controller.cpp": [
{
"line": " QDesktopServices::openUrl(QUrl(\"https://github.com/linuxdeepin/deepin-unioncode/issues\"));",
"line_number": 1199,
"rule": "S35",
"reason": "Url link | f8f0d2a7c7"
},
{
"line": " QDesktopServices::openUrl(QUrl(\"https://uosdn.uniontech.com/#document2?dirid=656d40a9bd766615b0b02e5e\"));",
"line_number": 1206,
"rule": "S35",
"reason": "Url link | f9197a3d4e"
}
]
} |
Implement session management functionality to persist and restore workspace state across IDE sessions. This includes: - Add SessionManager class to handle session operations - Save/restore opened files and current file in editor - Save/restore breakpoints with conditions in debugger - Save/restore project list and active project - Add session events for coordination between components - Integrate session loading/saving with core components The session manager provides a centralized way to persist workspace state and restore it when reopening projects. Log: add session manager to save and restore workspace state
|
Note
详情{
"src/plugins/core/uicontroller/controller.cpp": [
{
"line": " QDesktopServices::openUrl(QUrl(\"https://github.com/linuxdeepin/deepin-unioncode/issues\"));",
"line_number": 1199,
"rule": "S35",
"reason": "Url link | f8f0d2a7c7"
},
{
"line": " QDesktopServices::openUrl(QUrl(\"https://uosdn.uniontech.com/#document2?dirid=656d40a9bd766615b0b02e5e\"));",
"line_number": 1206,
"rule": "S35",
"reason": "Url link | f9197a3d4e"
}
]
} |
| tabWidget->deleteLater(); | ||
| } | ||
|
|
||
| tabWidgetList.first()->closeAllEditor(); |
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.
tabWidgetList有可能为空吗
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.
不可能,构造的时候就会放一个进去
| void setAutoLoadLastSession(bool autoLoad); | ||
|
|
||
| public: | ||
| SessionManager *q; |
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.
规范:初始化
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.
构造函数初始化列表
| const auto &name = info.baseName(); | ||
| d->sessionDateTimes.insert(name, info.lastModified()); | ||
| const auto lastActiveTime = lastActiveTimes.find(name); | ||
| // clang-format off |
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.
这里的注释:// clang-format off ,是什么意思?
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.
禁用和开启clang的代码格式化功能
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: deepin-mozart, Kakueeen, LiHua000 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Implement session management functionality to persist and restore workspace
state across IDE sessions. This includes:
The session manager provides a centralized way to persist workspace state
and restore it when reopening projects.
Log: add session manager to save and restore workspace state