fix: the signal is triggered repeatedly

Signed-off-by: ComixHe <heyuming@deepin.org>
This commit is contained in:
ComixHe 2024-03-06 16:33:25 +08:00 committed by Comix
parent 676e082b65
commit 3b2674023c
2 changed files with 4 additions and 2 deletions

View File

@ -599,7 +599,7 @@ void ApplicationManager1Service::updateApplication(const QSharedPointer<Applicat
return;
}
if (destApp->m_entry != newEntry) {
if (*(destApp->m_entry) != *newEntry) {
destApp->resetEntry(newEntry);
destApp->detachAllInstance();
}
@ -620,7 +620,8 @@ void ApplicationManager1Service::ReloadApplications()
m_reloadTimer.start();
const auto &desktopFileDirs = getDesktopFileDirs();
auto desktopFileDirs = getDesktopFileDirs();
desktopFileDirs.append(getAutoStartDirs()); // detect autostart apps add/remove/update
auto apps = m_applicationList.keys();

View File

@ -893,6 +893,7 @@ void ApplicationService::resetEntry(DesktopEntry *newEntry) noexcept
emit MimeTypesChanged();
emit terminalChanged();
emit scaleFactorChanged();
emit launchedTimesChanged();
}
std::optional<QStringList> ApplicationService::unescapeExecArgs(const QString &str) noexcept