refactor: explicit constructor for PlatformScreen, FileTail, FunctionJob, FunctionEventJob, ServerConfig, ScreenSettingsDialog, KeySequenceWidget, NetworkAddress, AddClientDialog, ConfigReadContext, LockCursorToScreenAction, RestartServer And KeyboardBroadcastAction
This commit is contained in:
@ -17,7 +17,7 @@ class FunctionEventJob : public IEventJob
|
||||
{
|
||||
public:
|
||||
//! run() invokes \c func(arg)
|
||||
FunctionEventJob(void (*func)(const Event &, void *), void *arg = nullptr);
|
||||
explicit FunctionEventJob(void (*func)(const Event &, void *), void *arg = nullptr);
|
||||
~FunctionEventJob() override = default;
|
||||
|
||||
// IEventJob overrides
|
||||
|
||||
@ -17,7 +17,7 @@ class FunctionJob : public IJob
|
||||
{
|
||||
public:
|
||||
//! run() invokes \c func(arg)
|
||||
FunctionJob(void (*func)(void *), void *arg = nullptr);
|
||||
explicit FunctionJob(void (*func)(void *), void *arg = nullptr);
|
||||
~FunctionJob() override = default;
|
||||
|
||||
// IJob overrides
|
||||
|
||||
@ -21,7 +21,7 @@ subclasses to implement the rest.
|
||||
class PlatformScreen : public IPlatformScreen
|
||||
{
|
||||
public:
|
||||
PlatformScreen(
|
||||
explicit PlatformScreen(
|
||||
IEventQueue *events, deskflow::ClientScrollDirection scrollDirection = deskflow::ClientScrollDirection::Normal
|
||||
);
|
||||
~PlatformScreen() override = default;
|
||||
|
||||
@ -18,7 +18,7 @@ class FileTail : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FileTail(const QString &filePath, QObject *parent = nullptr);
|
||||
explicit FileTail(const QString &filePath, QObject *parent = nullptr);
|
||||
|
||||
Q_SIGNALS:
|
||||
void newLine(const QString &line);
|
||||
|
||||
@ -46,7 +46,7 @@ class ServerConfig : public ScreenConfig, public deskflow::gui::IServerConfig
|
||||
friend QTextStream &operator<<(QTextStream &outStream, const ServerConfig &config);
|
||||
|
||||
public:
|
||||
ServerConfig(MainWindow &mainWindow, int columns = kDefaultColumns, int rows = kDefaultRows);
|
||||
explicit ServerConfig(MainWindow &mainWindow, int columns = kDefaultColumns, int rows = kDefaultRows);
|
||||
~ServerConfig() override = default;
|
||||
|
||||
bool operator==(const ServerConfig &sc) const;
|
||||
|
||||
@ -29,7 +29,7 @@ class AddClientDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AddClientDialog(const QString &clientName, QWidget *parent = nullptr);
|
||||
explicit AddClientDialog(const QString &clientName, QWidget *parent = nullptr);
|
||||
~AddClientDialog() override;
|
||||
|
||||
AddAction addResult() const
|
||||
|
||||
@ -24,7 +24,7 @@ class ScreenSettingsDialog : public QDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ScreenSettingsDialog(QWidget *parent, Screen *pScreen = nullptr, const ScreenList *pScreens = nullptr);
|
||||
explicit ScreenSettingsDialog(QWidget *parent, Screen *pScreen = nullptr, const ScreenList *pScreens = nullptr);
|
||||
~ScreenSettingsDialog() override;
|
||||
|
||||
public Q_SLOTS:
|
||||
|
||||
@ -16,7 +16,7 @@ class KeySequenceWidget : public QPushButton
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
KeySequenceWidget(QWidget *parent, const KeySequence &seq = KeySequence());
|
||||
explicit KeySequenceWidget(QWidget *parent, const KeySequence &seq = KeySequence());
|
||||
|
||||
Q_SIGNALS:
|
||||
void keySequenceChanged();
|
||||
|
||||
@ -38,7 +38,7 @@ public:
|
||||
is thrown with an error of \c XSocketAddress::kBadPort. The hostname
|
||||
is not resolved by the c'tor; use \c resolve to do that.
|
||||
*/
|
||||
NetworkAddress(const std::string &hostname, int port = 0);
|
||||
explicit NetworkAddress(const std::string &hostname, int port = 0);
|
||||
|
||||
NetworkAddress(const NetworkAddress &);
|
||||
|
||||
|
||||
@ -488,7 +488,7 @@ class ConfigReadContext
|
||||
public:
|
||||
using ArgList = std::vector<std::string>;
|
||||
|
||||
ConfigReadContext(std::istream &, int32_t firstLine = 1);
|
||||
explicit ConfigReadContext(std::istream &, int32_t firstLine = 1);
|
||||
~ConfigReadContext() = default;
|
||||
|
||||
bool readLine(std::string &);
|
||||
|
||||
@ -139,7 +139,7 @@ public:
|
||||
kToggle
|
||||
};
|
||||
|
||||
LockCursorToScreenAction(IEventQueue *events, Mode = kToggle);
|
||||
explicit LockCursorToScreenAction(IEventQueue *events, Mode = kToggle);
|
||||
|
||||
Mode getMode() const;
|
||||
|
||||
@ -161,7 +161,7 @@ public:
|
||||
restart
|
||||
};
|
||||
|
||||
RestartServer(IEventQueue *events, Mode = restart);
|
||||
explicit RestartServer(IEventQueue *events, Mode = restart);
|
||||
|
||||
Mode getMode() const;
|
||||
|
||||
@ -222,8 +222,8 @@ public:
|
||||
kToggle
|
||||
};
|
||||
|
||||
KeyboardBroadcastAction(IEventQueue *events, Mode = kToggle);
|
||||
KeyboardBroadcastAction(IEventQueue *events, Mode, const std::set<std::string> &screens);
|
||||
explicit KeyboardBroadcastAction(IEventQueue *events, Mode = kToggle);
|
||||
explicit KeyboardBroadcastAction(IEventQueue *events, Mode, const std::set<std::string> &screens);
|
||||
|
||||
Mode getMode() const;
|
||||
std::set<std::string> getScreens() const;
|
||||
|
||||
Reference in New Issue
Block a user