Avoids the "No matching signal" warnings (on_XXX slots seem parsed by

moc)
This commit is contained in:
Bertrand Songis
2014-02-08 18:06:55 +01:00
parent 10dc3503c2
commit e27a8bece4
2 changed files with 14 additions and 14 deletions
+11 -11
View File
@@ -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;
+3 -3
View File
@@ -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();