feat(dock): pass launch_type when launching apps from taskbar#1590
Merged
Ivy233 merged 1 commit intolinuxdeepin:masterfrom May 8, 2026
Merged
feat(dock): pass launch_type when launching apps from taskbar#1590Ivy233 merged 1 commit intolinuxdeepin:masterfrom
Ivy233 merged 1 commit intolinuxdeepin:masterfrom
Conversation
f100f03 to
41b2257
Compare
2b0a626 to
a8034b8
Compare
BLumia
approved these changes
May 8, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: BLumia, Ivy233 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 |
任务栏启动应用时传入 launch_type 参数,用于应用启动埋点统计。 launch_type=2 表示从任务栏快捷启动。涵盖直接 DBus 调用 和 dde-am CLI 两种启动路径。 Pass launch_type parameter when launching applications from taskbar for application launch event reporting. launch_type=2 indicates the app was launched from the taskbar. Covers both direct DBus calls and dde-am CLI launch paths. PMS: TASK-388657
a8034b8 to
5f95c98
Compare
deepin pr auto reviewGit Diff 代码审查报告总体评价这段代码主要是为 DDE (Deepin Desktop Environment) 的任务管理器添加了启动类型标识功能,并通过条件编译来支持不同环境。整体逻辑清晰,但有一些可以改进的地方。 详细审查1. 依赖版本变更 (debian/control)- dde-application-manager-api (>= 1.2.48),
+ dde-application-manager-api (>> 1.2.51),问题与建议:
2. 代码格式问题 (CMakeLists.txt)+
if (BUILD_WITH_X11)问题与建议:
3. 版权年份更新-// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
+// SPDX-FileCopyrightText: 2023 - 2026 UnionTech Software Technology Co., Ltd.问题与建议:
4. 启动类型标识添加m_applicationInterface->Launch(QString(), urls, QVariantMap{{QStringLiteral("_launch_type"), QStringLiteral("dde-shell")}});问题与建议:
5. 条件编译使用#ifdef HAVE_DDE_API_EVENTLOGGER
process.start("dde-am", {"--by-user", "--launch-type", "dde-shell", path, action});
#else
process.start("dde-am", {"--by-user", path, action});
#endif问题与建议:
6. 进程启动和等待process.start("dde-am", {"--by-user", "--launch-type", "dde-shell", path, action});
if (!process.waitForFinished()) {
qWarning() << "Failed to launch the path:" << path << process.errorString();
return;
}问题与建议:
7. 代码重复问题在 建议:
安全性建议
性能建议
总结这段代码整体质量良好,主要功能是添加启动类型标识。主要改进方向包括:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
任务栏启动应用时传入 launch_type 参数,用于应用启动埋点统计。
launch_type=2 表示从任务栏快捷启动。涵盖直接 DBus 调用
和 dde-am CLI 两种启动路径。
Pass launch_type parameter when launching applications from taskbar for application launch event reporting. launch_type=2 indicates the app was launched from the taskbar. Covers both direct DBus calls and dde-am CLI launch paths.
PMS: TASK-388657