From 0e04364d17301b4388f09caba88b832ac5dec010 Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Sat, 3 Jan 2026 09:24:41 -0500 Subject: [PATCH] refactor: use ArchDaemonWindows::daemonFailed directly remove now unused ArchMiscWindows::daemonFailed update copyright year --- src/lib/arch/IArchDaemon.h | 2 +- src/lib/arch/win32/ArchMiscWindows.cpp | 5 ----- src/lib/arch/win32/ArchMiscWindows.h | 6 ------ src/lib/deskflow/win32/AppUtilWindows.cpp | 4 +++- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/lib/arch/IArchDaemon.h b/src/lib/arch/IArchDaemon.h index 44a63e09e..3a78a6fc4 100644 --- a/src/lib/arch/IArchDaemon.h +++ b/src/lib/arch/IArchDaemon.h @@ -50,7 +50,7 @@ public: is called when the daemon must exit the main loop and it must cause \c runFunc to return. \c func should return what \c runDaemon() returns. \c func or \c runFunc can call - \c ArchMiscWindows::daemonFailed() to indicate startup failure. + \c ArchDaemonWindows::daemonFailed() to indicate startup failure. */ virtual int daemonize(DaemonFunc const &func) = 0; diff --git a/src/lib/arch/win32/ArchMiscWindows.cpp b/src/lib/arch/win32/ArchMiscWindows.cpp index dcd4eb9e4..2820ddc61 100644 --- a/src/lib/arch/win32/ArchMiscWindows.cpp +++ b/src/lib/arch/win32/ArchMiscWindows.cpp @@ -70,11 +70,6 @@ int ArchMiscWindows::runDaemon(RunFunc runFunc) return ArchDaemonWindows::runDaemon(runFunc); } -void ArchMiscWindows::daemonFailed(int result) -{ - ArchDaemonWindows::daemonFailed(result); -} - HKEY ArchMiscWindows::openKey(HKEY key, const TCHAR *keyName) { return openKey(key, keyName, false); diff --git a/src/lib/arch/win32/ArchMiscWindows.h b/src/lib/arch/win32/ArchMiscWindows.h index af155b65c..fe85b7184 100644 --- a/src/lib/arch/win32/ArchMiscWindows.h +++ b/src/lib/arch/win32/ArchMiscWindows.h @@ -47,12 +47,6 @@ public: */ static int runDaemon(RunFunc runFunc); - //! Indicate failure of running daemon - /*! - Delegates to ArchDaemonWindows. - */ - static void daemonFailed(int result); - //! Open and return a registry key, closing the parent key static HKEY openKey(HKEY parent, const TCHAR *child); diff --git a/src/lib/deskflow/win32/AppUtilWindows.cpp b/src/lib/deskflow/win32/AppUtilWindows.cpp index fa6829453..1b950c843 100644 --- a/src/lib/deskflow/win32/AppUtilWindows.cpp +++ b/src/lib/deskflow/win32/AppUtilWindows.cpp @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2026 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 - 2025 Symless Ltd. * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -8,6 +9,7 @@ #include "deskflow/win32/AppUtilWindows.h" #include "arch/Arch.h" +#include "arch/win32/ArchDaemonWindows.h" #include "arch/win32/ArchMiscWindows.h" #include "arch/win32/XArchWindows.h" #include "base/Event.h" @@ -71,7 +73,7 @@ void AppUtilWindows::exitApp(int code) switch (m_exitMode) { case kExitModeDaemon: - ArchMiscWindows::daemonFailed(code); + ArchDaemonWindows::daemonFailed(code); break; default: