diff --git a/ChangeLog b/ChangeLog index 4bff49dc8..4129ef047 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ v1.14.2-snapshot =========== Bug fixes: - #7070 Fix radio button shifted focus on macOS +- #7077 Fix Ubuntu, CentOS and Debian build after SYNERGY-1161 Enhancements: - #7068 Add Synergy restart when settings changed diff --git a/src/gui/src/Screen.cpp b/src/gui/src/Screen.cpp index cb35f993b..6745d73db 100644 --- a/src/gui/src/Screen.cpp +++ b/src/gui/src/Screen.cpp @@ -124,8 +124,7 @@ QTextStream& Screen::writeAliasesSection(QTextStream& outStream) const bool Screen::operator==(const Screen& screen) const { - return m_Pixmap == screen.m_Pixmap && - m_Name == screen.m_Name && + return m_Name == screen.m_Name && m_Aliases == screen.m_Aliases && m_Modifiers == screen.m_Modifiers && m_SwitchCorners == screen.m_SwitchCorners && diff --git a/src/gui/src/Screen.h b/src/gui/src/Screen.h index 85beb44cf..57c791e0c 100644 --- a/src/gui/src/Screen.h +++ b/src/gui/src/Screen.h @@ -45,7 +45,7 @@ class Screen : public BaseConfig Screen(const QString& name); public: - const QPixmap* pixmap() const { return &m_Pixmap; } + const QPixmap& pixmap() const { return m_Pixmap; } const QString& name() const { return m_Name; } const QStringList& aliases() const { return m_Aliases; } @@ -73,9 +73,7 @@ class Screen : public BaseConfig protected: void init(); - QPixmap* pixmap() { return &m_Pixmap; } - void setPixmap(const QPixmap& pixmap) { m_Pixmap = pixmap; } QStringList& aliases() { return m_Aliases; } void setModifier(int m, int n) { m_Modifiers[m] = n; } QList& modifiers() { return m_Modifiers; } diff --git a/src/gui/src/ScreenSetupModel.cpp b/src/gui/src/ScreenSetupModel.cpp index 3212d77e0..3c64b98d5 100644 --- a/src/gui/src/ScreenSetupModel.cpp +++ b/src/gui/src/ScreenSetupModel.cpp @@ -43,7 +43,7 @@ QVariant ScreenSetupModel::data(const QModelIndex& index, int role) const case Qt::DecorationRole: if (screen(index).isNull()) break; - return QIcon(*screen(index).pixmap()); + return QIcon(screen(index).pixmap()); case Qt::ToolTipRole: if (screen(index).isNull()) diff --git a/src/gui/src/ScreenSetupView.cpp b/src/gui/src/ScreenSetupView.cpp index 89229d4df..8bbb020ee 100644 --- a/src/gui/src/ScreenSetupView.cpp +++ b/src/gui/src/ScreenSetupView.cpp @@ -132,7 +132,7 @@ void ScreenSetupView::startDrag(Qt::DropActions) if (pData == NULL) return; - QPixmap pixmap = *model()->screen(indexes[0]).pixmap(); + const QPixmap& pixmap = model()->screen(indexes[0]).pixmap(); QDrag* pDrag = new QDrag(this); pDrag->setPixmap(pixmap); pDrag->setMimeData(pData); diff --git a/src/gui/src/ServerConfigDialog.cpp b/src/gui/src/ServerConfigDialog.cpp index c88fdae7d..4c73d6e67 100644 --- a/src/gui/src/ServerConfigDialog.cpp +++ b/src/gui/src/ServerConfigDialog.cpp @@ -93,44 +93,44 @@ ServerConfigDialog::ServerConfigDialog(QWidget* parent, ServerConfig& config) : connect(&m_ScreenSetupModel, &ScreenSetupModel::screensChanged, this, &ServerConfigDialog::onChange); //advanced - connect(m_pCheckBoxSwitchDelay, &QCheckBox::stateChanged, - this, [this]( const auto& v ) { serverConfig().haveSwitchDelay(v); onChange();}); - connect(m_pSpinBoxSwitchDelay, QOverload::of(&QSpinBox::valueChanged), - this, [this]( const auto& v ) { serverConfig().setSwitchDelay(v); onChange();}); - connect(m_pCheckBoxSwitchDoubleTap, &QCheckBox::stateChanged, - this, [this]( const auto& v ) { serverConfig().haveSwitchDoubleTap(v); onChange();}); - connect(m_pSpinBoxSwitchDoubleTap, QOverload::of(&QSpinBox::valueChanged), - this, [this]( const auto& v ) { serverConfig().setSwitchDoubleTap(v); onChange();}); - connect(m_pCheckBoxEnableClipboard, &QCheckBox::stateChanged, - this, [this]( const auto& v ) { serverConfig().setClipboardSharing(v); onChange();}); - connect(m_pSpinBoxClipboardSizeLimit, QOverload::of(&QSpinBox::valueChanged), - this, [this]( const auto& v ) { serverConfig().setClipboardSharingSize(v * 1024); onChange();}); - connect(m_pCheckBoxHeartbeat, &QCheckBox::stateChanged, - this, [this]( const auto& v ) { serverConfig().haveHeartbeat(v); onChange();}); - connect(m_pSpinBoxHeartbeat, QOverload::of(&QSpinBox::valueChanged), - this, [this]( const auto& v ) { serverConfig().setHeartbeat(v); onChange();}); - connect(m_pCheckBoxRelativeMouseMoves, &QCheckBox::stateChanged, - this, [this]( const auto& v ) { serverConfig().setRelativeMouseMoves(v); onChange();}); - connect(m_pCheckBoxWin32KeepForeground, &QCheckBox::stateChanged, - this, [this]( const auto& v ) { serverConfig().setWin32KeepForeground(v); onChange();}); - connect(m_pCheckBoxIgnoreAutoConfigClient, &QCheckBox::stateChanged, - this, [this]( const auto& v ) { serverConfig().setIgnoreAutoConfigClient(v); onChange();}); - connect(m_pCheckBoxDisableLockToScreen, &QCheckBox::stateChanged, - this, [this]( const auto& v ) { serverConfig().setDisableLockToScreen(v); onChange();}); - connect(m_pCheckBoxCornerTopLeft, &QCheckBox::stateChanged, - this, [this]( const auto& v ) { serverConfig().setSwitchCorner(BaseConfig::TopLeft, v); onChange();}); - connect(m_pCheckBoxCornerTopRight, &QCheckBox::stateChanged, - this, [this]( const auto& v ) { serverConfig().setSwitchCorner(BaseConfig::TopRight, v); onChange();}); - connect(m_pCheckBoxCornerBottomLeft, &QCheckBox::stateChanged, - this, [this]( const auto& v ) { serverConfig().setSwitchCorner(BaseConfig::BottomLeft, v); onChange();}); - connect(m_pCheckBoxCornerBottomRight, &QCheckBox::stateChanged, - this, [this]( const auto& v ) { serverConfig().setSwitchCorner(BaseConfig::BottomRight, v); onChange();}); - connect(m_pSpinBoxSwitchCornerSize, QOverload::of(&QSpinBox::valueChanged), - this, [this]( const auto& v ) { serverConfig().setSwitchCornerSize(v); onChange();}); + connect(m_pCheckBoxSwitchDelay, &QCheckBox::stateChanged, + this, [this]( const int& v ) { serverConfig().haveSwitchDelay(v); onChange();}); + connect(m_pSpinBoxSwitchDelay, static_cast(&QSpinBox::valueChanged), + this, [this]( const int& v ) { serverConfig().setSwitchDelay(v); onChange();}); + connect(m_pCheckBoxSwitchDoubleTap, &QCheckBox::stateChanged, + this, [this]( const int& v ) { serverConfig().haveSwitchDoubleTap(v); onChange();}); + connect(m_pSpinBoxSwitchDoubleTap, static_cast(&QSpinBox::valueChanged), + this, [this]( const int& v ) { serverConfig().setSwitchDoubleTap(v); onChange();}); + connect(m_pCheckBoxEnableClipboard, &QCheckBox::stateChanged, + this, [this]( const int& v ) { serverConfig().setClipboardSharing(v); onChange();}); + connect(m_pSpinBoxClipboardSizeLimit, static_cast(&QSpinBox::valueChanged), + this, [this]( const int& v ) { serverConfig().setClipboardSharingSize(v * 1024); onChange();}); + connect(m_pCheckBoxHeartbeat, &QCheckBox::stateChanged, + this, [this]( const int& v ) { serverConfig().haveHeartbeat(v); onChange();}); + connect(m_pSpinBoxHeartbeat, static_cast(&QSpinBox::valueChanged), + this, [this]( const int& v ) { serverConfig().setHeartbeat(v); onChange();}); + connect(m_pCheckBoxRelativeMouseMoves, &QCheckBox::stateChanged, + this, [this]( const int& v ) { serverConfig().setRelativeMouseMoves(v); onChange();}); + connect(m_pCheckBoxWin32KeepForeground, &QCheckBox::stateChanged, + this, [this]( const int& v ) { serverConfig().setWin32KeepForeground(v); onChange();}); + connect(m_pCheckBoxIgnoreAutoConfigClient, &QCheckBox::stateChanged, + this, [this]( const int& v ) { serverConfig().setIgnoreAutoConfigClient(v); onChange();}); + connect(m_pCheckBoxDisableLockToScreen, &QCheckBox::stateChanged, + this, [this]( const int& v ) { serverConfig().setDisableLockToScreen(v); onChange();}); + connect(m_pCheckBoxCornerTopLeft, &QCheckBox::stateChanged, + this, [this]( const int& v ) { serverConfig().setSwitchCorner(BaseConfig::TopLeft, v); onChange();}); + connect(m_pCheckBoxCornerTopRight, &QCheckBox::stateChanged, + this, [this]( const int& v ) { serverConfig().setSwitchCorner(BaseConfig::TopRight, v); onChange();}); + connect(m_pCheckBoxCornerBottomLeft, &QCheckBox::stateChanged, + this, [this]( const int& v ) { serverConfig().setSwitchCorner(BaseConfig::BottomLeft, v); onChange();}); + connect(m_pCheckBoxCornerBottomRight, &QCheckBox::stateChanged, + this, [this]( const int& v ) { serverConfig().setSwitchCorner(BaseConfig::BottomRight, v); onChange();}); + connect(m_pSpinBoxSwitchCornerSize, static_cast(&QSpinBox::valueChanged), + this, [this]( const int& v ) { serverConfig().setSwitchCornerSize(v); onChange();}); //config connect(m_pCheckBoxUseExternalConfig, &QCheckBox::stateChanged, - this, [this]( const auto& v ) { serverConfig().setUseExternalConfig(v); onChange();}); + this, [this]( const int& v ) { serverConfig().setUseExternalConfig(v); onChange();}); connect(m_pEditConfigFile, &QLineEdit::textChanged, this, [this]() { serverConfig().setConfigFile(m_pEditConfigFile->text()); onChange();}); }