build: DDE_DEBUG_MODE->USE_DEBUG_DBUS_NAME

Signed-off-by: black-desk <me@black-desk.cn>
This commit is contained in:
black-desk
2023-08-30 12:12:53 +08:00
committed by Comix
parent c85f3d0950
commit 3df26e4fc2
5 changed files with 9 additions and 18 deletions

View File

@ -9,7 +9,7 @@ constexpr auto SystemdService = u8"org.freedesktop.systemd1";
constexpr auto SystemdObjectPath = u8"/org/freedesktop/systemd1";
constexpr auto SystemdInterfaceName = u8"org.freedesktop.systemd1.Manager";
constexpr auto DDEApplicationManager1ServiceName =
#ifdef DDE_DEBUG_MODE
#ifdef DDE_AM_USE_DEBUG_DBUS_NAME
u8"org.deepin.dde.debug.ApplicationManager1";
#else
u8"org.deepin.dde.ApplicationManager1";
@ -22,14 +22,14 @@ constexpr auto DesktopFileEntryKey = u8"Desktop Entry";
constexpr auto DesktopFileActionKey = u8"Desktop Action ";
constexpr auto ApplicationManagerServerDBusName =
#ifdef DDE_DEBUG_MODE
#ifdef DDE_AM_USE_DEBUG_DBUS_NAME
u8"deepin_application_manager_debug_server_bus";
#else
u8"deepin_application_manager_server_bus";
#endif
constexpr auto ApplicationManagerDestDBusName =
#ifdef DDE_DEBUG_MODE
#ifdef DDE_AM_USE_DEBUG_DBUS_NAME
u8"deepin_application_manager_debug_dest_bus";
#else
u8"deepin_application_manager_dest_bus";

View File

@ -426,17 +426,13 @@ std::optional<DesktopEntry::Value> DesktopEntry::value(const QString &groupKey,
{
const auto &destGroup = group(groupKey);
if (!destGroup) {
#ifdef DDE_DEBUG_MODE
qWarning() << "group " << groupKey << " can't be found.";
#endif
qDebug() << "group " << groupKey << " can't be found.";
return std::nullopt;
}
auto it = destGroup->find(valueKey);
if (it == destGroup->cend()) {
#ifdef DDE_DEBUG_MODE
qWarning() << "value " << valueKey << " can't be found.";
#endif
qDebug() << "value " << valueKey << " can't be found.";
return std::nullopt;
}
return *it;