diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d79a78..5b368b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(THREADS_PREFER_PTHREAD_FLAG ON) set(BUILD_EXAMPLES ON CACHE BOOL "Whether to build examples or not.") -set(DEBUG_MODE ON CACHE BOOL "start a dde-applicatiom-manager service for debug") +set(DDE_DDE_DEBUG_MODE ON CACHE BOOL "start a dde-applicatiom-manager service for debug") set(PROFILING_MODE OFF CACHE BOOL "run a valgrind performance profiling.") find_package(Qt6 REQUIRED COMPONENTS Core DBus Concurrent) @@ -22,8 +22,8 @@ find_package(Threads REQUIRED) set(APP_LAUNCH_HELPER_BIN app-launch-helper) -if(DEBUG_MODE) - add_compile_definitions(-DDEBUG_MODE) +if(DDE_DEBUG_MODE) + add_compile_definitions(-DDDE_DEBUG_MODE) endif() if(PROFILING_MODE) diff --git a/src/constant.h b/src/constant.h index 71a8c71..0d2bb35 100644 --- a/src/constant.h +++ b/src/constant.h @@ -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 DEBUG_MODE +#ifdef DDE_DEBUG_MODE 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 DEBUG_MODE +#ifdef DDE_DEBUG_MODE u8"deepin_application_manager_debug_server_bus"; #else u8"deepin_application_manager_server_bus"; #endif constexpr auto ApplicationManagerDestDBusName = -#ifdef DEBUG_MODE +#ifdef DDE_DEBUG_MODE u8"deepin_application_manager_debug_dest_bus"; #else u8"deepin_application_manager_dest_bus"; diff --git a/src/desktopentry.cpp b/src/desktopentry.cpp index d0167d1..57eddea 100644 --- a/src/desktopentry.cpp +++ b/src/desktopentry.cpp @@ -426,7 +426,7 @@ std::optional DesktopEntry::value(const QString &groupKey, { const auto &destGroup = group(groupKey); if (!destGroup) { -#ifdef DEBUG_MODE +#ifdef DDE_DEBUG_MODE qWarning() << "group " << groupKey << " can't be found."; #endif return std::nullopt; @@ -434,7 +434,7 @@ std::optional DesktopEntry::value(const QString &groupKey, auto it = destGroup->find(valueKey); if (it == destGroup->cend()) { -#ifdef DEBUG_MODE +#ifdef DDE_DEBUG_MODE qWarning() << "value " << valueKey << " can't be found."; #endif return std::nullopt; diff --git a/tools/profiling.sh b/tools/profiling.sh index ff8a4cc..1377674 100755 --- a/tools/profiling.sh +++ b/tools/profiling.sh @@ -10,7 +10,7 @@ BUILD_DIR=${BUILD_DIR:="build-prof"} cmake -B "$BUILD_DIR" \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -DDEBUG_MODE=OFF \ + -DDDE_DEBUG_MODE=OFF \ -DPROFILING_MODE=ON cmake --build "$BUILD_DIR" -j$(nproc)