From 2d0659044d0027160d32f24eecae1a6991b820d5 Mon Sep 17 00:00:00 2001 From: zhangkun <2840441575@qq.com> Date: Wed, 24 Apr 2024 20:01:35 +0800 Subject: [PATCH] feat: Can emit correct remove signal when uninstalling applications patched by deepin-deb-fix check TryExec when doReloadApplications add deepin-deb-fix to Suggested dependency --- debian/control | 1 + src/dbus/applicationmanager1service.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/debian/control b/debian/control index 7af4914..09f01ae 100644 --- a/debian/control +++ b/debian/control @@ -15,6 +15,7 @@ Homepage: https://github.com/linuxdeepin/dde-application-manager Package: dde-application-manager Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} +Suggests: deepin-deb-fix Description: Application manager for DDE. Launch applications by systemd for more caps. diff --git a/src/dbus/applicationmanager1service.cpp b/src/dbus/applicationmanager1service.cpp index 7c1bb83..44f8cfd 100644 --- a/src/dbus/applicationmanager1service.cpp +++ b/src/dbus/applicationmanager1service.cpp @@ -650,6 +650,11 @@ void ApplicationManager1Service::doReloadApplications() } if (destApp != m_applicationList.cend() and apps.contains(destApp.key())) { + // Can emit correct remove signal when uninstalling applications patched by deepin-deb-fix + if (ApplicationFilter::tryExecCheck(*(destApp->data()->m_entry))) { + qDebug() << info.absolutePath() << "Checked TryExec failed and will be removed"; + return false; + } apps.removeOne(destApp.key()); updateApplication(destApp.value(), std::move(file)); return false;