From e27a8bece42eedbc6b3d95f8beef8f2599369c7e Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Sat, 8 Feb 2014 18:06:55 +0100 Subject: [PATCH] Avoids the "No matching signal" warnings (on_XXX slots seem parsed by moc) --- companion/src/modeledit/setup.cpp | 22 +++++++++++----------- companion/src/modeledit/setup.h | 6 +++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/companion/src/modeledit/setup.cpp b/companion/src/modeledit/setup.cpp index c806e503e..c11f54018 100644 --- a/companion/src/modeledit/setup.cpp +++ b/companion/src/modeledit/setup.cpp @@ -440,8 +440,8 @@ Setup::Setup(QWidget *parent, ModelData & model): ui->switchesStartupLayout->setAlignment(slider, Qt::AlignCenter); ui->switchesStartupLayout->addWidget(cb, 2, i+1); ui->switchesStartupLayout->setAlignment(cb, Qt::AlignCenter); - connect(slider, SIGNAL(valueChanged(int)), this, SLOT(on_startupSwitchEdited(int))); - connect(cb, SIGNAL(toggled(bool)), this, SLOT(on_startupSwitchToggled(bool))); + connect(slider, SIGNAL(valueChanged(int)), this, SLOT(startupSwitchEdited(int))); + connect(cb, SIGNAL(toggled(bool)), this, SLOT(startupSwitchToggled(bool))); startupSwitchesSliders << slider; startupSwitchesCheckboxes << cb; } @@ -454,7 +454,7 @@ Setup::Setup(QWidget *parent, ModelData & model): cb->setProperty("index", i+1); cb->setText(AnalogString(i+4)); ui->potWarningLayout->addWidget(cb, 0, i+1); - connect(cb, SIGNAL(toggled(bool)), this, SLOT(on_potWarningToggled(bool))); + connect(cb, SIGNAL(toggled(bool)), this, SLOT(potWarningToggled(bool))); potWarningCheckboxes << cb; } } @@ -606,21 +606,21 @@ void Setup::updateStartupSwitches() lock = false; } -void Setup::on_startupSwitchEdited(int value) +void Setup::startupSwitchEdited(int value) { if (!lock) { int shift = 0; unsigned int mask; int index = sender()->property("index").toInt(); - if (IS_TARANIS(GetEepromInterface()->getBoard())) { - if (index == 6) { - shift = (index - 1)*2; + if (IS_TARANIS(GetEepromInterface()->getBoard())) { + if (index == 6) { + shift = (index - 1) * 2; mask = 0x02 << shift; shift++; - } + } else { - shift = (index - 1)*2; + shift = (index - 1) * 2; mask = 0x03 << shift; } } @@ -650,7 +650,7 @@ void Setup::on_startupSwitchEdited(int value) } } -void Setup::on_startupSwitchToggled(bool checked) +void Setup::startupSwitchToggled(bool checked) { if (!lock) { int index = sender()->property("index").toInt()-1; @@ -683,7 +683,7 @@ void Setup::updatePotWarnings() lock = false; } -void Setup::on_potWarningToggled(bool checked) +void Setup::potWarningToggled(bool checked) { if (!lock) { int index = sender()->property("index").toInt()-1; diff --git a/companion/src/modeledit/setup.h b/companion/src/modeledit/setup.h index ec7a28dac..04babe82e 100644 --- a/companion/src/modeledit/setup.h +++ b/companion/src/modeledit/setup.h @@ -88,9 +88,9 @@ class Setup : public ModelPanel void on_image_currentIndexChanged(int index); void on_trimIncrement_currentIndexChanged(int index); void onBeepCenterToggled(bool checked); - void on_startupSwitchEdited(int value); - void on_startupSwitchToggled(bool checked); - void on_potWarningToggled(bool checked); + void startupSwitchEdited(int value); + void startupSwitchToggled(bool checked); + void potWarningToggled(bool checked); void on_potWarningMode_currentIndexChanged(int index); void onChildModified();