build: Clean up warning for new QCheckBox signals With 6.7+
This commit is contained in:
parent
f2f75ae7b9
commit
f70528d082
1 changed files with 116 additions and 35 deletions
|
|
@ -117,6 +117,7 @@ ServerConfigDialog::ServerConfigDialog(
|
||||||
&m_ScreenSetupModel, &ScreenSetupModel::screensChanged, this,
|
&m_ScreenSetupModel, &ScreenSetupModel::screensChanged, this,
|
||||||
&ServerConfigDialog::onChange);
|
&ServerConfigDialog::onChange);
|
||||||
|
|
||||||
|
#if QT_VERSION <= QT_VERSION_CHECK(6, 7, 0)
|
||||||
// advanced
|
// advanced
|
||||||
connect(
|
connect(
|
||||||
m_pCheckBoxSwitchDelay, &QCheckBox::stateChanged, this,
|
m_pCheckBoxSwitchDelay, &QCheckBox::stateChanged, this,
|
||||||
|
|
@ -124,52 +125,24 @@ ServerConfigDialog::ServerConfigDialog(
|
||||||
serverConfig().haveSwitchDelay(v);
|
serverConfig().haveSwitchDelay(v);
|
||||||
onChange();
|
onChange();
|
||||||
});
|
});
|
||||||
connect(
|
|
||||||
m_pSpinBoxSwitchDelay,
|
|
||||||
static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this,
|
|
||||||
[this](const int &v) {
|
|
||||||
serverConfig().setSwitchDelay(v);
|
|
||||||
onChange();
|
|
||||||
});
|
|
||||||
connect(
|
connect(
|
||||||
m_pCheckBoxSwitchDoubleTap, &QCheckBox::stateChanged, this,
|
m_pCheckBoxSwitchDoubleTap, &QCheckBox::stateChanged, this,
|
||||||
[this](const int &v) {
|
[this](const int &v) {
|
||||||
serverConfig().haveSwitchDoubleTap(v);
|
serverConfig().haveSwitchDoubleTap(v);
|
||||||
onChange();
|
onChange();
|
||||||
});
|
});
|
||||||
connect(
|
|
||||||
m_pSpinBoxSwitchDoubleTap,
|
|
||||||
static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this,
|
|
||||||
[this](const int &v) {
|
|
||||||
serverConfig().setSwitchDoubleTap(v);
|
|
||||||
onChange();
|
|
||||||
});
|
|
||||||
connect(
|
connect(
|
||||||
m_pCheckBoxEnableClipboard, &QCheckBox::stateChanged, this,
|
m_pCheckBoxEnableClipboard, &QCheckBox::stateChanged, this,
|
||||||
[this](const int &v) {
|
[this](const int &v) {
|
||||||
serverConfig().setClipboardSharing(v);
|
serverConfig().setClipboardSharing(v);
|
||||||
onChange();
|
onChange();
|
||||||
});
|
});
|
||||||
connect(
|
|
||||||
m_pSpinBoxClipboardSizeLimit,
|
|
||||||
static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this,
|
|
||||||
[this](const int &v) {
|
|
||||||
serverConfig().setClipboardSharingSize(v * 1024);
|
|
||||||
onChange();
|
|
||||||
});
|
|
||||||
connect(
|
connect(
|
||||||
m_pCheckBoxHeartbeat, &QCheckBox::stateChanged, this,
|
m_pCheckBoxHeartbeat, &QCheckBox::stateChanged, this,
|
||||||
[this](const int &v) {
|
[this](const int &v) {
|
||||||
serverConfig().haveHeartbeat(v);
|
serverConfig().haveHeartbeat(v);
|
||||||
onChange();
|
onChange();
|
||||||
});
|
});
|
||||||
connect(
|
|
||||||
m_pSpinBoxHeartbeat,
|
|
||||||
static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this,
|
|
||||||
[this](const int &v) {
|
|
||||||
serverConfig().setHeartbeat(v);
|
|
||||||
onChange();
|
|
||||||
});
|
|
||||||
connect(
|
connect(
|
||||||
m_pCheckBoxRelativeMouseMoves, &QCheckBox::stateChanged, this,
|
m_pCheckBoxRelativeMouseMoves, &QCheckBox::stateChanged, this,
|
||||||
[this](const int &v) {
|
[this](const int &v) {
|
||||||
|
|
@ -212,6 +185,121 @@ ServerConfigDialog::ServerConfigDialog(
|
||||||
serverConfig().setSwitchCorner(static_cast<int>(BottomRight), v);
|
serverConfig().setSwitchCorner(static_cast<int>(BottomRight), v);
|
||||||
onChange();
|
onChange();
|
||||||
});
|
});
|
||||||
|
// config
|
||||||
|
connect(
|
||||||
|
m_pCheckBoxUseExternalConfig, &QCheckBox::stateChanged, this,
|
||||||
|
[this](const int &v) {
|
||||||
|
serverConfig().setUseExternalConfig(v);
|
||||||
|
onChange();
|
||||||
|
});
|
||||||
|
#else
|
||||||
|
connect(
|
||||||
|
m_pCheckBoxSwitchDelay, &QCheckBox::checkStateChanged, this,
|
||||||
|
[this](const Qt::CheckState &v) {
|
||||||
|
serverConfig().haveSwitchDelay(v == Qt::Checked);
|
||||||
|
onChange();
|
||||||
|
});
|
||||||
|
connect(
|
||||||
|
m_pCheckBoxSwitchDoubleTap, &QCheckBox::checkStateChanged, this,
|
||||||
|
[this](const Qt::CheckState &v) {
|
||||||
|
serverConfig().haveSwitchDoubleTap(v == Qt::Checked);
|
||||||
|
onChange();
|
||||||
|
});
|
||||||
|
connect(
|
||||||
|
m_pCheckBoxEnableClipboard, &QCheckBox::checkStateChanged, this,
|
||||||
|
[this](const Qt::CheckState &v) {
|
||||||
|
serverConfig().setClipboardSharing(v == Qt::Checked);
|
||||||
|
onChange();
|
||||||
|
});
|
||||||
|
connect(
|
||||||
|
m_pCheckBoxHeartbeat, &QCheckBox::checkStateChanged, this,
|
||||||
|
[this](const Qt::CheckState &v) {
|
||||||
|
serverConfig().haveHeartbeat(v == Qt::Checked);
|
||||||
|
onChange();
|
||||||
|
});
|
||||||
|
connect(
|
||||||
|
m_pCheckBoxRelativeMouseMoves, &QCheckBox::checkStateChanged, this,
|
||||||
|
[this](const Qt::CheckState &v) {
|
||||||
|
serverConfig().setRelativeMouseMoves(v == Qt::Checked);
|
||||||
|
onChange();
|
||||||
|
});
|
||||||
|
connect(
|
||||||
|
m_pCheckBoxWin32KeepForeground, &QCheckBox::checkStateChanged, this,
|
||||||
|
[this](const Qt::CheckState &v) {
|
||||||
|
serverConfig().setWin32KeepForeground(v == Qt::Checked);
|
||||||
|
onChange();
|
||||||
|
});
|
||||||
|
connect(
|
||||||
|
m_pCheckBoxDisableLockToScreen, &QCheckBox::checkStateChanged, this,
|
||||||
|
[this](const Qt::CheckState &v) {
|
||||||
|
serverConfig().setDisableLockToScreen(v == Qt::Checked);
|
||||||
|
onChange();
|
||||||
|
});
|
||||||
|
connect(
|
||||||
|
m_pCheckBoxCornerTopLeft, &QCheckBox::checkStateChanged, this,
|
||||||
|
[this](const Qt::CheckState &v) {
|
||||||
|
serverConfig().setSwitchCorner(
|
||||||
|
static_cast<int>(TopLeft), v == Qt::Checked);
|
||||||
|
onChange();
|
||||||
|
});
|
||||||
|
connect(
|
||||||
|
m_pCheckBoxCornerTopRight, &QCheckBox::checkStateChanged, this,
|
||||||
|
[this](const Qt::CheckState &v) {
|
||||||
|
serverConfig().setSwitchCorner(
|
||||||
|
static_cast<int>(TopRight), v == Qt::Checked);
|
||||||
|
onChange();
|
||||||
|
});
|
||||||
|
connect(
|
||||||
|
m_pCheckBoxCornerBottomLeft, &QCheckBox::checkStateChanged, this,
|
||||||
|
[this](const Qt::CheckState &v) {
|
||||||
|
serverConfig().setSwitchCorner(
|
||||||
|
static_cast<int>(BottomLeft), v == Qt::Checked);
|
||||||
|
onChange();
|
||||||
|
});
|
||||||
|
connect(
|
||||||
|
m_pCheckBoxCornerBottomRight, &QCheckBox::checkStateChanged, this,
|
||||||
|
[this](const Qt::CheckState &v) {
|
||||||
|
serverConfig().setSwitchCorner(
|
||||||
|
static_cast<int>(BottomRight), v == Qt::Checked);
|
||||||
|
onChange();
|
||||||
|
});
|
||||||
|
// config
|
||||||
|
connect(
|
||||||
|
m_pCheckBoxUseExternalConfig, &QCheckBox::checkStateChanged, this,
|
||||||
|
[this](const Qt::CheckState &v) {
|
||||||
|
serverConfig().setUseExternalConfig(v == Qt::Checked);
|
||||||
|
onChange();
|
||||||
|
});
|
||||||
|
#endif
|
||||||
|
|
||||||
|
connect(
|
||||||
|
m_pSpinBoxSwitchDelay,
|
||||||
|
static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this,
|
||||||
|
[this](const int &v) {
|
||||||
|
serverConfig().setSwitchDelay(v);
|
||||||
|
onChange();
|
||||||
|
});
|
||||||
|
connect(
|
||||||
|
m_pSpinBoxSwitchDoubleTap,
|
||||||
|
static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this,
|
||||||
|
[this](const int &v) {
|
||||||
|
serverConfig().setSwitchDoubleTap(v);
|
||||||
|
onChange();
|
||||||
|
});
|
||||||
|
connect(
|
||||||
|
m_pSpinBoxClipboardSizeLimit,
|
||||||
|
static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this,
|
||||||
|
[this](const int &v) {
|
||||||
|
serverConfig().setClipboardSharingSize(v * 1024);
|
||||||
|
onChange();
|
||||||
|
});
|
||||||
|
connect(
|
||||||
|
m_pSpinBoxHeartbeat,
|
||||||
|
static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this,
|
||||||
|
[this](const int &v) {
|
||||||
|
serverConfig().setHeartbeat(v);
|
||||||
|
onChange();
|
||||||
|
});
|
||||||
connect(
|
connect(
|
||||||
m_pSpinBoxSwitchCornerSize,
|
m_pSpinBoxSwitchCornerSize,
|
||||||
static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this,
|
static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged), this,
|
||||||
|
|
@ -220,13 +308,6 @@ ServerConfigDialog::ServerConfigDialog(
|
||||||
onChange();
|
onChange();
|
||||||
});
|
});
|
||||||
|
|
||||||
// config
|
|
||||||
connect(
|
|
||||||
m_pCheckBoxUseExternalConfig, &QCheckBox::stateChanged, this,
|
|
||||||
[this](const int &v) {
|
|
||||||
serverConfig().setUseExternalConfig(v);
|
|
||||||
onChange();
|
|
||||||
});
|
|
||||||
connect(m_pEditConfigFile, &QLineEdit::textChanged, this, [this]() {
|
connect(m_pEditConfigFile, &QLineEdit::textChanged, this, [this]() {
|
||||||
serverConfig().setConfigFile(m_pEditConfigFile->text());
|
serverConfig().setConfigFile(m_pEditConfigFile->text());
|
||||||
onChange();
|
onChange();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue