From c8e0feab4ecedf3e699f97404a3083dbbfe276de Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Sat, 11 Apr 2026 10:39:14 -0400 Subject: [PATCH] build(arch): remove ArchDaemonNone and do not subclass Arch from ARCH_DAEMON on unix --- src/lib/arch/Arch.h | 5 ++++- src/lib/arch/ArchDaemonNone.h | 38 ----------------------------------- src/lib/arch/CMakeLists.txt | 1 - 3 files changed, 4 insertions(+), 40 deletions(-) delete mode 100644 src/lib/arch/ArchDaemonNone.h diff --git a/src/lib/arch/Arch.h b/src/lib/arch/Arch.h index ddf24e896..d1d75da9c 100644 --- a/src/lib/arch/Arch.h +++ b/src/lib/arch/Arch.h @@ -31,7 +31,6 @@ #include "arch/win32/ArchMultithreadWindows.h" #include "arch/win32/ArchNetworkWinsock.h" #else -#include "arch/ArchDaemonNone.h" #include "arch/unix/ArchLogUnix.h" #include "arch/unix/ArchMultithreadPosix.h" #include "arch/unix/ArchNetworkBSD.h" @@ -53,7 +52,11 @@ to each method to those implementations. Clients should use the exactly one of these objects before attempting to call any method, typically at the beginning of \c main(). */ +#if defined(Q_OS_WIN) class Arch : public ARCH_DAEMON, public ARCH_LOG, public ARCH_MULTITHREAD, public ARCH_NETWORK +#else +class Arch : public ARCH_LOG, public ARCH_MULTITHREAD, public ARCH_NETWORK +#endif { public: Arch(); diff --git a/src/lib/arch/ArchDaemonNone.h b/src/lib/arch/ArchDaemonNone.h deleted file mode 100644 index c8a7fd6b0..000000000 --- a/src/lib/arch/ArchDaemonNone.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Deskflow -- mouse and keyboard sharing utility - * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers. - * SPDX-FileCopyrightText: (C) 2012 - 2016 Symless Ltd. - * SPDX-FileCopyrightText: (C) 2002 Chris Schoeneman - * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception - */ - -#pragma once - -#include "arch/IArchDaemon.h" - -#define ARCH_DAEMON ArchDaemonNone - -//! Dummy implementation of IArchDaemon -/*! -This class implements IArchDaemon for a platform that does not have daemons. -The query functions return false, and \c daemonize() simply calls the passed -function and returns its result. -*/ -class ArchDaemonNone : public IArchDaemon -{ -public: - ArchDaemonNone() = default; - ~ArchDaemonNone() override = default; - - // IArchDaemon overrides - int daemonize(DaemonFunc const &func) override - { - // simply forward the call to func. obviously, this doesn't - // do any daemonizing. - return func(); - } - QString commandLine() const override - { - return {}; - } -}; diff --git a/src/lib/arch/CMakeLists.txt b/src/lib/arch/CMakeLists.txt index 5d5004fb8..f5af8e1b3 100644 --- a/src/lib/arch/CMakeLists.txt +++ b/src/lib/arch/CMakeLists.txt @@ -36,7 +36,6 @@ endif() add_library(arch STATIC ${PLATFORM_CODE} Arch.cpp Arch.h - ArchDaemonNone.h ArchException.h IArchDaemon.h IArchLog.h