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