From c4c1d725685976c4c5aaf5f62e7a79ab43c30a8f Mon Sep 17 00:00:00 2001 From: black-desk Date: Mon, 14 Aug 2023 13:24:00 +0800 Subject: [PATCH] refact: hidden escaped app id in dbus object path Signed-off-by: black-desk --- src/dbus/applicationservice.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/dbus/applicationservice.h b/src/dbus/applicationservice.h index 9a759a7..ddeb44a 100644 --- a/src/dbus/applicationservice.h +++ b/src/dbus/applicationservice.h @@ -75,7 +75,12 @@ private: auto dbusAppid = m_desktopSource.m_file.desktopId(); if constexpr (std::is_same_v) { - m_applicationPath = QDBusObjectPath{objectPath + escapeToObjectPath(dbusAppid)}; + m_applicationPath = +#ifdef QT_DEBUG + QDBusObjectPath{objectPath + escapeToObjectPath(dbusAppid)}; +#else + QDBusObjectPath{objectPath + QUuid::createUuid().toString(QUuid::Id128)}; +#endif m_isPersistence = true; sourceFile.setFileName(m_desktopSource.m_file.filePath()); if (!sourceFile.open(QFile::ExistingOnly | QFile::ReadOnly | QFile::Text)) {