From 236cfda5a92227bf5769e0b4b00b387ea40c7ac3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 17 Dec 2025 07:24:49 +0000 Subject: [PATCH 1/3] Initial plan From a7cfe9b0edce1273e5e568d0f8ca8e5f38983d45 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 17 Dec 2025 07:31:45 +0000 Subject: [PATCH 2/3] Replace KD_UNUSED macro with [[maybe_unused]] attribute Co-authored-by: MiKom <104767+MiKom@users.noreply.github.com> --- .../xcb/linux_xcb_platform_event_loop.cpp | 9 +++------ .../xcb/linux_xcb_platform_integration.cpp | 3 +-- src/KDGui/window.cpp | 18 ++++++------------ 3 files changed, 10 insertions(+), 20 deletions(-) diff --git a/src/KDGui/platform/linux/xcb/linux_xcb_platform_event_loop.cpp b/src/KDGui/platform/linux/xcb/linux_xcb_platform_event_loop.cpp index 47ffe51f..1b6463d1 100644 --- a/src/KDGui/platform/linux/xcb/linux_xcb_platform_event_loop.cpp +++ b/src/KDGui/platform/linux/xcb/linux_xcb_platform_event_loop.cpp @@ -89,8 +89,7 @@ void LinuxXcbPlatformEventLoop::processXcbEvents() switch (eventType) { case XCB_EXPOSE: { - const auto *expose = reinterpret_cast(xcbEvent); - KD_UNUSED(expose); // Silence unused warning in Release build + [[maybe_unused]] const auto *expose = reinterpret_cast(xcbEvent); SPDLOG_LOGGER_DEBUG(m_logger, "{}: Window {} exposed. Region to be redrawn at location ({}, {}), with dimension ({}, {})", xcbEvent->sequence, expose->window, expose->x, expose->y, expose->width, expose->height); @@ -257,8 +256,7 @@ void LinuxXcbPlatformEventLoop::processXcbEvents() } case XCB_MAP_NOTIFY: { - const auto *mapEvent = reinterpret_cast(xcbEvent); - KD_UNUSED(mapEvent); // Silence unused warning in Release build + [[maybe_unused]] const auto *mapEvent = reinterpret_cast(xcbEvent); SPDLOG_LOGGER_DEBUG(m_logger, "Map event for window {}", mapEvent->window); @@ -266,8 +264,7 @@ void LinuxXcbPlatformEventLoop::processXcbEvents() } case XCB_UNMAP_NOTIFY: { - const auto *unmapEvent = reinterpret_cast(xcbEvent); - KD_UNUSED(unmapEvent); // Silence unused warning in Release build + [[maybe_unused]] const auto *unmapEvent = reinterpret_cast(xcbEvent); SPDLOG_LOGGER_DEBUG(m_logger, "Unmap event for window {}", unmapEvent->window); diff --git a/src/KDGui/platform/linux/xcb/linux_xcb_platform_integration.cpp b/src/KDGui/platform/linux/xcb/linux_xcb_platform_integration.cpp index 04d8b0ca..6fabcfb4 100644 --- a/src/KDGui/platform/linux/xcb/linux_xcb_platform_integration.cpp +++ b/src/KDGui/platform/linux/xcb/linux_xcb_platform_integration.cpp @@ -138,9 +138,8 @@ bool LinuxXcbPlatformIntegration::initializeXkbExtension() return true; } -void LinuxXcbPlatformIntegration::dumpScreenInfo(xcb_screen_t *screen) +void LinuxXcbPlatformIntegration::dumpScreenInfo([[maybe_unused]] xcb_screen_t *screen) { - KD_UNUSED(screen); // for release builds, debug log isn't compiled in SPDLOG_DEBUG("Information about screen {}", screen->root); SPDLOG_DEBUG(" width.........: {}", screen->width_in_pixels); SPDLOG_DEBUG(" height........: {}", screen->height_in_pixels); diff --git a/src/KDGui/window.cpp b/src/KDGui/window.cpp index f1e70e94..157a3514 100644 --- a/src/KDGui/window.cpp +++ b/src/KDGui/window.cpp @@ -222,9 +222,8 @@ void Window::resizeEvent(ResizeEvent *ev) ev->setAccepted(true); } -void Window::mousePressEvent(MousePressEvent *ev) +void Window::mousePressEvent([[maybe_unused]] MousePressEvent *ev) { - KD_UNUSED(ev); // for release builds, debug log isn't compiled in SPDLOG_LOGGER_DEBUG(m_logger, "{}() buttons = {} at pos = ({}, {})", __FUNCTION__, @@ -233,9 +232,8 @@ void Window::mousePressEvent(MousePressEvent *ev) ev->yPos()); } -void Window::mouseReleaseEvent(MouseReleaseEvent *ev) +void Window::mouseReleaseEvent([[maybe_unused]] MouseReleaseEvent *ev) { - KD_UNUSED(ev); // for release builds, debug log isn't compiled in SPDLOG_LOGGER_DEBUG(m_logger, "{}() buttons = {} at pos = ({}, {})", __FUNCTION__, @@ -244,9 +242,8 @@ void Window::mouseReleaseEvent(MouseReleaseEvent *ev) ev->yPos()); } -void Window::mouseMoveEvent(MouseMoveEvent *ev) +void Window::mouseMoveEvent([[maybe_unused]] MouseMoveEvent *ev) { - KD_UNUSED(ev); // for release builds, debug log isn't compiled in SPDLOG_LOGGER_DEBUG(m_logger, "{}() buttons = {} at pos = ({}, {})", __FUNCTION__, @@ -255,9 +252,8 @@ void Window::mouseMoveEvent(MouseMoveEvent *ev) ev->yPos()); } -void Window::mouseWheelEvent(MouseWheelEvent *ev) +void Window::mouseWheelEvent([[maybe_unused]] MouseWheelEvent *ev) { - KD_UNUSED(ev); // for release builds, debug log isn't compiled in SPDLOG_LOGGER_DEBUG(m_logger, "{}() xDelta = {} yDelta = {}", __FUNCTION__, @@ -265,14 +261,12 @@ void Window::mouseWheelEvent(MouseWheelEvent *ev) ev->yDelta()); } -void Window::keyPressEvent(KeyPressEvent *ev) +void Window::keyPressEvent([[maybe_unused]] KeyPressEvent *ev) { - KD_UNUSED(ev); // for release builds, debug log isn't compiled in SPDLOG_LOGGER_DEBUG(m_logger, "{}() key = {}", __FUNCTION__, ev->key()); } -void Window::keyReleaseEvent(KeyReleaseEvent *ev) +void Window::keyReleaseEvent([[maybe_unused]] KeyReleaseEvent *ev) { - KD_UNUSED(ev); // for release builds, debug log isn't compiled in SPDLOG_LOGGER_DEBUG(m_logger, "{}() key = {}", __FUNCTION__, ev->key()); } From 7465b3aa019a89c1a44a27e44ac4722bc2e2382f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 17 Dec 2025 07:33:21 +0000 Subject: [PATCH 3/3] Complete replacement of KD_UNUSED with [[maybe_unused]] Co-authored-by: MiKom <104767+MiKom@users.noreply.github.com> --- _codeql_detected_source_root | 1 + 1 file changed, 1 insertion(+) create mode 120000 _codeql_detected_source_root diff --git a/_codeql_detected_source_root b/_codeql_detected_source_root new file mode 120000 index 00000000..945c9b46 --- /dev/null +++ b/_codeql_detected_source_root @@ -0,0 +1 @@ +. \ No newline at end of file