chore: mark explicit methods

This commit is contained in:
sithlord48
2025-05-20 21:09:55 -04:00
committed by Nick Bolton
parent 293c5e394c
commit 04805d9a7e
31 changed files with 41 additions and 39 deletions

View File

@ -27,8 +27,8 @@ LOGC() provide convenient access.
class Log
{
public:
Log(bool singleton = true);
Log(Log *src);
explicit Log(bool singleton = true);
explicit Log(Log *src);
Log(Log const &) = delete;
Log(Log &&) = delete;
~Log();

View File

@ -20,7 +20,7 @@ public:
//! Use getWhat() as the result of what()
XBase();
//! Use \c msg as the result of what()
XBase(const std::string &msg);
explicit XBase(const std::string &msg);
~XBase() throw() override = default;
//! Reason for exception

View File

@ -43,7 +43,7 @@ public:
class FailInfo
{
public:
FailInfo(const char *what) : m_retry(false), m_what(what)
explicit FailInfo(const char *what) : m_retry(false), m_what(what)
{
// do nothing
}

View File

@ -21,7 +21,7 @@ class ArgParser
{
public:
ArgParser(App *app);
explicit ArgParser(App *app);
bool parseServerArgs(deskflow::ServerArgs &args, int argc, const char *const *argv);
bool parseClientArgs(deskflow::ClientArgs &args, int argc, const char *const *argv);

View File

@ -12,7 +12,7 @@
class Chunk : public EventData
{
public:
Chunk(size_t size);
explicit Chunk(size_t size);
Chunk(Chunk const &) = delete;
Chunk(Chunk &&) = delete;
~Chunk() override;

View File

@ -23,7 +23,7 @@ class ISocketFactory;
class ClientApp : public App
{
public:
ClientApp(IEventQueue *events);
explicit ClientApp(IEventQueue *events);
~ClientApp() override = default;
//

View File

@ -21,7 +21,7 @@ class IStream;
class ClipboardChunk : public Chunk
{
public:
ClipboardChunk(size_t size);
explicit ClipboardChunk(size_t size);
static ClipboardChunk *start(ClipboardID id, uint32_t sequence, const std::string &size);
static ClipboardChunk *data(ClipboardID id, uint32_t sequence, const std::string &data);

View File

@ -12,12 +12,12 @@
class DisplayInvalidException : public std::runtime_error
{
public:
DisplayInvalidException(const char *msg) : std::runtime_error(msg)
explicit DisplayInvalidException(const char *msg) : std::runtime_error(msg)
{
// do nothing
}
DisplayInvalidException(std::string msg) : std::runtime_error(msg)
explicit DisplayInvalidException(std::string msg) : std::runtime_error(msg)
{
// do nothing
}

View File

@ -23,7 +23,7 @@ to synthesize key events.
class IKeyState : public IInterface
{
public:
IKeyState(IEventQueue *events);
explicit IKeyState(IEventQueue *events);
enum
{

View File

@ -28,7 +28,7 @@ public:
//! @name manipulators
//@{
IPlatformScreen(IEventQueue *events) : IKeyState(events)
explicit IPlatformScreen(IEventQueue *events) : IKeyState(events)
{
// do nothing
}

View File

@ -45,7 +45,7 @@ class ServerApp : public App
using ServerConfig = deskflow::server::Config;
public:
ServerApp(IEventQueue *events);
explicit ServerApp(IEventQueue *events);
~ServerApp() override = default;
//

View File

@ -65,7 +65,7 @@ a client that is already connected.
class XDuplicateClient : public XDeskflow
{
public:
XDuplicateClient(const std::string &name);
explicit XDuplicateClient(const std::string &name);
~XDuplicateClient() throw() override = default;
//! @name accessors
@ -91,7 +91,7 @@ unknown to the server.
class XUnknownClient : public XDeskflow
{
public:
XUnknownClient(const std::string &name);
explicit XUnknownClient(const std::string &name);
~XUnknownClient() throw() override = default;
//! @name accessors
@ -118,7 +118,7 @@ exit(int).
class XExitApp : public XDeskflow
{
public:
XExitApp(int code);
explicit XExitApp(int code);
~XExitApp() throw() override = default;
//! Get the exit code

View File

@ -36,7 +36,7 @@ public:
\c timeUntilRetry is the suggested time the caller should wait until
trying to open the screen again.
*/
XScreenUnavailable(double timeUntilRetry);
explicit XScreenUnavailable(double timeUntilRetry);
~XScreenUnavailable() throw() override = default;
//! @name manipulators

View File

@ -16,7 +16,7 @@ class IEventQueue;
class AppUtilUnix : public AppUtil
{
public:
AppUtilUnix(IEventQueue *events);
explicit AppUtilUnix(IEventQueue *events);
~AppUtilUnix() override = default;
int run(int argc, char **argv) override;

View File

@ -29,7 +29,7 @@ enum AppExitMode
class AppUtilWindows : public AppUtil
{
public:
AppUtilWindows(IEventQueue *events);
explicit AppUtilWindows(IEventQueue *events);
~AppUtilWindows() override;
static AppUtilWindows &instance();

View File

@ -17,7 +17,7 @@ class NewScreenWidget : public QLabel
Q_OBJECT
public:
NewScreenWidget(QWidget *parent);
explicit NewScreenWidget(QWidget *parent);
protected:
void mousePressEvent(QMouseEvent *event) override;

View File

@ -23,7 +23,7 @@ class ScreenSetupView : public QTableView
Q_OBJECT
public:
ScreenSetupView(QWidget *parent);
explicit ScreenSetupView(QWidget *parent);
public:
void setModel(QAbstractItemModel *model) override;

View File

@ -18,7 +18,7 @@ class TrashScreenWidget : public QLabel
Q_OBJECT
public:
TrashScreenWidget(QWidget *parent) : QLabel(parent)
explicit TrashScreenWidget(QWidget *parent) : QLabel(parent)
{
// do nothing
}

View File

@ -27,7 +27,7 @@ public:
associated mutex. The mutex needn't be unique to one condition
variable.
*/
CondVarBase(Mutex *mutex);
explicit CondVarBase(Mutex *mutex);
~CondVarBase();
//! @name manipulators

View File

@ -23,9 +23,9 @@ class Lock
{
public:
//! Lock the mutex \c mutex
Lock(const Mutex *mutex);
explicit Lock(const Mutex *mutex);
//! Lock the condition variable \c cv
Lock(const CondVarBase *cv);
explicit Lock(const CondVarBase *cv);
//! Unlock the mutex or condition variable
~Lock();

View File

@ -37,7 +37,7 @@ public:
Create and start a new thread executing the \c adoptedJob. The
new thread takes ownership of \c adoptedJob and will delete it.
*/
Thread(IJob *adoptedJob);
explicit Thread(IJob *adoptedJob);
//! Duplicate a thread handle
/*!
@ -190,7 +190,7 @@ public:
//@}
private:
Thread(ArchThread);
explicit Thread(ArchThread);
static void *threadFunc(void *);

View File

@ -19,7 +19,7 @@ class XThreadExit : public XThread
{
public:
//! \c result is the result of the thread
XThreadExit(void *result) : m_result(result)
explicit XThreadExit(void *result) : m_result(result)
{
// do nothing
}

View File

@ -22,15 +22,16 @@ public:
class ConnectionFailedInfo
{
public:
ConnectionFailedInfo(const char *what) : m_what(what)
explicit ConnectionFailedInfo(const char *what) : m_what(what)
{
// do nothing
}
std::string m_what;
};
IDataSocket(IEventQueue *events)
explicit IDataSocket(IEventQueue *events)
{
// do nothing
}
//! @name manipulators

View File

@ -26,7 +26,7 @@ public:
Construct the wildcard address with the given port. \c port must
not be zero.
*/
NetworkAddress(int port);
explicit NetworkAddress(int port);
/*!
Construct the network address for the given \c hostname and \c port.

View File

@ -164,7 +164,7 @@ private:
class HotKeySet
{
public:
HotKeySet(KeyID keyid);
explicit HotKeySet(KeyID keyid);
KeyID keyid() const
{
return id_;

View File

@ -13,7 +13,7 @@
class XWindowsClipboardBMPConverter : public IXWindowsClipboardConverter
{
public:
XWindowsClipboardBMPConverter(Display *display);
explicit XWindowsClipboardBMPConverter(Display *display);
~XWindowsClipboardBMPConverter() override = default;
// IXWindowsClipboardConverter overrides

View File

@ -125,7 +125,7 @@ public:
/*!
Ignore X11 errors.
*/
ErrorLock(Display *);
explicit ErrorLock(Display *);
ErrorLock(ErrorLock const &) = delete;
ErrorLock(ErrorLock &&) = delete;

View File

@ -20,7 +20,7 @@ public:
/*!
\c name is the name of the client.
*/
BaseClientProxy(const std::string &name);
explicit BaseClientProxy(const std::string &name);
~BaseClientProxy() override = default;
//! @name manipulators

View File

@ -201,7 +201,7 @@ public:
internal_const_iterator m_i;
};
Config(IEventQueue *events);
explicit Config(IEventQueue *events);
virtual ~Config() = default;
//! @name manipulators

View File

@ -301,7 +301,7 @@ public:
{
public:
Rule();
Rule(Condition *adopted);
explicit Rule(Condition *adopted);
Rule(const Rule &);
~Rule();
@ -355,7 +355,7 @@ public:
// -------------------------------------------------------------------------
using RuleList = std::vector<Rule>;
InputFilter(IEventQueue *events);
explicit InputFilter(IEventQueue *events);
InputFilter(const InputFilter &);
virtual ~InputFilter();

View File

@ -86,8 +86,9 @@ public:
class ScreenConnectedInfo
{
public:
ScreenConnectedInfo(std::string screen) : m_screen(screen)
explicit ScreenConnectedInfo(std::string screen) : m_screen(screen)
{
// do nothing
}
public: