chore: rm Unused ServerConfig::m_pMainwindow
This commit is contained in:
parent
2efcc76933
commit
31573bf6e8
3 changed files with 21 additions and 29 deletions
|
|
@ -62,7 +62,7 @@ using CoreProcessState = CoreProcess::ProcessState;
|
|||
|
||||
MainWindow::MainWindow()
|
||||
: ui{std::make_unique<Ui::MainWindow>()},
|
||||
m_serverConfig(*this),
|
||||
m_serverConfig(),
|
||||
m_coreProcess(m_serverConfig),
|
||||
m_serverConnection(this, m_serverConfig),
|
||||
m_clientConnection(this),
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
#include "ServerConfig.h"
|
||||
|
||||
#include "Hotkey.h"
|
||||
#include "MainWindow.h"
|
||||
#include "common/Settings.h"
|
||||
#include "dialogs/AddClientDialog.h"
|
||||
|
||||
|
|
@ -36,11 +35,7 @@ static const struct
|
|||
|
||||
const int serverDefaultIndex = 7;
|
||||
|
||||
ServerConfig::ServerConfig(MainWindow &mainWindow, int columns, int rows)
|
||||
: m_pMainWindow(&mainWindow),
|
||||
m_Screens(columns),
|
||||
m_Columns(columns),
|
||||
m_Rows(rows)
|
||||
ServerConfig::ServerConfig(int columns, int rows) : m_Screens(columns), m_Columns(columns), m_Rows(rows)
|
||||
{
|
||||
recall();
|
||||
}
|
||||
|
|
@ -59,25 +54,24 @@ bool ServerConfig::save(const QString &fileName) const
|
|||
|
||||
bool ServerConfig::operator==(const ServerConfig &sc) const
|
||||
{
|
||||
return m_Screens == sc.m_Screens && //
|
||||
m_Columns == sc.m_Columns && //
|
||||
m_Rows == sc.m_Rows && //
|
||||
m_HasHeartbeat == sc.m_HasHeartbeat && //
|
||||
m_Heartbeat == sc.m_Heartbeat && //
|
||||
m_Protocol == sc.m_Protocol && //
|
||||
m_RelativeMouseMoves == sc.m_RelativeMouseMoves && //
|
||||
m_Win32KeepForeground == sc.m_Win32KeepForeground && //
|
||||
m_HasSwitchDelay == sc.m_HasSwitchDelay && //
|
||||
m_SwitchDelay == sc.m_SwitchDelay && //
|
||||
m_HasSwitchDoubleTap == sc.m_HasSwitchDoubleTap && //
|
||||
m_SwitchDoubleTap == sc.m_SwitchDoubleTap && //
|
||||
m_SwitchCornerSize == sc.m_SwitchCornerSize && //
|
||||
m_SwitchCorners == sc.m_SwitchCorners && //
|
||||
m_Hotkeys == sc.m_Hotkeys && //
|
||||
m_DisableLockToScreen == sc.m_DisableLockToScreen && //
|
||||
m_ClipboardSharing == sc.m_ClipboardSharing && //
|
||||
m_ClipboardSharingSize == sc.m_ClipboardSharingSize && //
|
||||
m_pMainWindow == sc.m_pMainWindow;
|
||||
return m_Screens == sc.m_Screens && //
|
||||
m_Columns == sc.m_Columns && //
|
||||
m_Rows == sc.m_Rows && //
|
||||
m_HasHeartbeat == sc.m_HasHeartbeat && //
|
||||
m_Heartbeat == sc.m_Heartbeat && //
|
||||
m_Protocol == sc.m_Protocol && //
|
||||
m_RelativeMouseMoves == sc.m_RelativeMouseMoves && //
|
||||
m_Win32KeepForeground == sc.m_Win32KeepForeground && //
|
||||
m_HasSwitchDelay == sc.m_HasSwitchDelay && //
|
||||
m_SwitchDelay == sc.m_SwitchDelay && //
|
||||
m_HasSwitchDoubleTap == sc.m_HasSwitchDoubleTap && //
|
||||
m_SwitchDoubleTap == sc.m_SwitchDoubleTap && //
|
||||
m_SwitchCornerSize == sc.m_SwitchCornerSize && //
|
||||
m_SwitchCorners == sc.m_SwitchCorners && //
|
||||
m_Hotkeys == sc.m_Hotkeys && //
|
||||
m_DisableLockToScreen == sc.m_DisableLockToScreen && //
|
||||
m_ClipboardSharing == sc.m_ClipboardSharing && //
|
||||
m_ClipboardSharingSize == sc.m_ClipboardSharingSize;
|
||||
}
|
||||
|
||||
void ServerConfig::save(QFile &file) const
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ class QSettings;
|
|||
class QString;
|
||||
class QFile;
|
||||
class ServerConfigDialog;
|
||||
class MainWindow;
|
||||
|
||||
namespace deskflow::gui {
|
||||
|
||||
|
|
@ -46,7 +45,7 @@ class ServerConfig : public ScreenConfig, public deskflow::gui::IServerConfig
|
|||
friend QTextStream &operator<<(QTextStream &outStream, const ServerConfig &config);
|
||||
|
||||
public:
|
||||
explicit ServerConfig(MainWindow &mainWindow, int columns = kDefaultColumns, int rows = kDefaultRows);
|
||||
explicit ServerConfig(int columns = kDefaultColumns, int rows = kDefaultRows);
|
||||
~ServerConfig() override = default;
|
||||
|
||||
bool operator==(const ServerConfig &sc) const;
|
||||
|
|
@ -266,7 +265,6 @@ private:
|
|||
QList<bool> m_SwitchCorners;
|
||||
HotkeyList m_Hotkeys;
|
||||
|
||||
MainWindow *m_pMainWindow;
|
||||
ScreenList m_Screens;
|
||||
int m_Columns;
|
||||
int m_Rows;
|
||||
|
|
|
|||
Loading…
Reference in a new issue