build(arch): remove ArchDaemonNone and do not subclass Arch from ARCH_DAEMON on unix

This commit is contained in:
sithlord48 2026-04-11 10:39:14 -04:00 committed by Nick Bolton
parent e33bef1b95
commit c8e0feab4e
3 changed files with 4 additions and 40 deletions

View file

@ -31,7 +31,6 @@
#include "arch/win32/ArchMultithreadWindows.h" #include "arch/win32/ArchMultithreadWindows.h"
#include "arch/win32/ArchNetworkWinsock.h" #include "arch/win32/ArchNetworkWinsock.h"
#else #else
#include "arch/ArchDaemonNone.h"
#include "arch/unix/ArchLogUnix.h" #include "arch/unix/ArchLogUnix.h"
#include "arch/unix/ArchMultithreadPosix.h" #include "arch/unix/ArchMultithreadPosix.h"
#include "arch/unix/ArchNetworkBSD.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, exactly one of these objects before attempting to call any method,
typically at the beginning of \c main(). 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 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: public:
Arch(); Arch();

View file

@ -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 {};
}
};

View file

@ -36,7 +36,6 @@ endif()
add_library(arch STATIC ${PLATFORM_CODE} add_library(arch STATIC ${PLATFORM_CODE}
Arch.cpp Arch.cpp
Arch.h Arch.h
ArchDaemonNone.h
ArchException.h ArchException.h
IArchDaemon.h IArchDaemon.h
IArchLog.h IArchLog.h