Skip to content

Commit 0c88e49

Browse files
committed
feat: pass launch_type when launching apps from launcher
启动器启动应用时传入 launch_type 参数,用于应用启动埋点统计。 launch_type=1 表示从启动器点击启动。 Pass launch_type parameter when launching applications from launcher for application launch event reporting. launch_type=1 indicates the app was launched from the launcher. PMS: TASK-388657
1 parent 2f9b210 commit 0c88e49

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Architecture: any
3535
Depends:
3636
${shlibs:Depends},
3737
${misc:Depends},
38-
dde-application-manager (>> 1.2.2),
38+
dde-application-manager (>> 1.2.51),
3939
dde-application-wizard-daemon-compat,
4040
libdtk6gui(>= 6.0.19),
4141
libdtk6declarative(>= 6.0.19),

src/ddeintegration/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,8 @@ PUBLIC
145145
Qt::Concurrent
146146
PRIVATE
147147
Qt::Core Qt::Gui ${DTK_NS}::Core ${ASQT_NS} launcher-utils)
148+
149+
if (HAVE_DDE_API_EVENTLOGGER)
150+
target_compile_definitions(dde-integration-dbus PRIVATE HAVE_DDE_API_EVENTLOGGER)
151+
target_link_libraries(dde-integration-dbus PRIVATE DDEAPI::EventLogger)
152+
endif()

src/ddeintegration/appmgr.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,11 @@ bool AppMgr::launchApp(const QString &desktopId)
184184
const auto path = amAppIface->path();
185185
QProcess process;
186186
process.setProcessChannelMode(QProcess::MergedChannels);
187+
#ifdef HAVE_DDE_API_EVENTLOGGER
188+
process.start("dde-am", {"--by-user", "--launch-type", "dde-launchpad", path});
189+
#else
187190
process.start("dde-am", {"--by-user", path});
191+
#endif
188192
if (!process.waitForFinished()) {
189193
qCWarning(logDdeIntegration) << "Failed to launch the desktopId:" << desktopId << process.errorString();
190194
return false;

0 commit comments

Comments
 (0)