-
Notifications
You must be signed in to change notification settings - Fork 55
refactor: migrate taskmanager model to the new DockItemModel #1201
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
|
Skipping CI for Draft Pull Request. |
Reviewer's GuideThis PR migrates the TaskManager area to the new DockItemModel, refactoring window previews, monitors, TaskManager APIs, and QML delegates to operate on QModelIndexList and the AbstractTaskManagerInterface, while removing legacy AppItem/ItemModel code and updating tests. Sequence diagram for window preview request using new modelsequenceDiagram
participant User as actor User
participant AppItem as AppItem (QML)
participant TaskManagerQML as TaskManagerQML
participant TaskManager as TaskManager
participant AbstractWindowMonitor as AbstractWindowMonitor
participant X11WindowPreviewContainer as X11WindowPreviewContainer
User->>AppItem: Hover or click triggers preview
AppItem->>TaskManagerQML: requestPreview([modelIndex], Panel.rootObject, xOffset, yOffset, position)
TaskManagerQML->>TaskManager: requestPreview(...)
TaskManager->>AbstractWindowMonitor: requestPreview(QModelIndexList, ...)
AbstractWindowMonitor->>X11WindowPreviewContainer: showPreview(QModelIndexList, ...)
X11WindowPreviewContainer->>DockItemWindowModel: setData(QModelIndexList)
X11WindowPreviewContainer->>X11WindowPreviewContainer: updatePreviewIconFromBase64(...)
X11WindowPreviewContainer->>X11WindowPreviewContainer: updatePreviewTitle(...)
X11WindowPreviewContainer->>X11WindowPreviewContainer: updateSize(...)
Class diagram for TaskManager model migration to DockItemModelclassDiagram
class TaskManager {
+DockItemModel* dataModel() const
+void dropFilesOnItem(QString, QStringList)
+void hideItemPreview()
...
}
class DockItemModel {
+void setSourceModel(QAbstractItemModel*)
+void dumpItemInfo(QModelIndex)
...
}
class AbstractWindowMonitor {
+QPointer<AbstractWindow> getWindowByWindowId(ulong)
+void requestActivate(QModelIndex) const
+void requestPreview(QModelIndexList, QObject*, int32_t, int32_t, uint32_t) const
+void requestClose(QModelIndex, bool) const
...
}
class X11WindowMonitor {
+void requestPreview(QModelIndexList, QObject*, int32_t, int32_t, uint32_t) const
+void hideItemPreview()
...
}
class TreeLandWindowMonitor {
+void requestPreview(QModelIndexList, QObject*, int32_t, int32_t, uint32_t) const
+void hideItemPreview()
...
}
class DockItemWindowModel {
+int rowCount(QModelIndex) const
+QVariant data(QModelIndex, int) const
+void setData(QModelIndexList)
+void resetPreviewPixmap()
...
}
TaskManager --> DockItemModel : uses
TaskManager --> AbstractWindowMonitor : owns
AbstractWindowMonitor <|-- X11WindowMonitor
AbstractWindowMonitor <|-- TreeLandWindowMonitor
X11WindowMonitor --> DockItemWindowModel : uses
TreeLandWindowMonitor --> DockItemWindowModel : uses
Class diagram for QML delegate and AppItem changesclassDiagram
class AppItem {
+string itemId
+string name
+string iconName
+string icon
+list<string> windows
+int visualIndex
+var modelIndex
+signal dropFilesOnItem(itemId, files)
+signal dragFinished()
...
}
class TaskManagerQML {
+void requestActivate(var modelIndex)
+void requestNewInstance(var modelIndex, string action)
+void requestPreview(var indexes, QObject, int32_t, int32_t, uint32_t)
...
}
AppItem --> TaskManagerQML : calls methods
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
d243a0e to
0d7d711
Compare
|
TAG Bot New tag: 2.0.4 |
27eeb22 to
4af5797
Compare
|
TAG Bot New tag: 2.0.5 |
|
TAG Bot New tag: 2.0.6 |
|
关联: 在此分支合入前,提供一个供开发者使用的选项以供手动关闭基于 cgroups 的应用识别,解决没有 desktop-id 的应用程序被显示在父进程上的问题。 注意:上述 PR 所提供的选项不面向最终用户,主动调整相关选项的值后所遇到的其他 bug 不受任何支持。最终用户应当等待此 PR 的合入、集成、推送。 |
0159315 to
10ad22f
Compare
|
TAG Bot New tag: 2.0.7 |
This patch is to continue prepare for linuxdeepin#1201, by add previously missing changed signal for Docked and Menu role when docked state is changed, and implementing actions for menu entries. Log:
This patch is to continue prepare for linuxdeepin#1201, by add previously missing changed signal for Docked and Menu role when docked state is changed, and implementing actions for menu entries. This patch also make DnD on dock item works without using the legacy ItemModel class by implementing requestOpenUrls(). Log:
This patch is to continue prepare for #1201, by add previously missing changed signal for Docked and Menu role when docked state is changed, and implementing actions for menu entries. This patch also make DnD on dock item works without using the legacy ItemModel class by implementing requestOpenUrls(). Log:
784fdaf to
e0e5eb3
Compare
|
TAG Bot New tag: 2.0.8 |
25c2110 to
696ab2e
Compare
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.
Sorry @BLumia, you have reached your weekly rate limit for Sourcery. Please try again later
|
@sourcery-ai 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.
Sorry @BLumia, you have reached your weekly rate limit for Sourcery. Please try again later
SourceryAI
left a comment
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.
Sorry @BLumia, you have reached your weekly rate limit for Sourcery. Please try again later
|
@sourcery-ai 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.
Sorry @BLumia, you have reached your weekly rate limit for Sourcery. Please try again later
SourceryAI
left a comment
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.
Sorry @BLumia, you have reached your weekly rate limit for Sourcery. Please try again later
696ab2e to
5a3c52b
Compare
5a3c52b to
0992f72
Compare
切换 taskmanager 区域的 model 为新的 DockItemModel,以解决一系列问题: 1. 部分场景下企业微信和微信图标合并/钉钉和微信合并等问题 2. 终端执行 gitk/dde-dconfig-editor 时不会单独显示任务栏图标 3. 没有 desktop-id 的带界面的可执行程序不会单独显示任务栏图标 Log:
0992f72 to
5d9ad80
Compare
deepin pr auto review代码审查报告1. 语法逻辑分析
2. 代码质量分析
3. 代码性能分析
4. 代码安全分析
改进建议
总体而言,代码结构清晰,功能实现合理,但在健壮性和性能方面还有提升空间。建议优先处理边界检查和资源管理相关的问题。 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: BLumia, tsic404 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 |
PR 当前状态说明:
切换 taskmanager 区域的 model 为新的 DockItemModel,以解决一系列问题:
进展跟进:
状态说明:
Summary by Sourcery
Migrate the TaskManager from the old AppItem/ItemModel architecture to the new DockItemModel, refactor preview and activation APIs, and update QML bindings and tests accordingly.
New Features:
Bug Fixes:
Enhancements:
Tests: