Gui: fix possible problems with new style connect

* In UIntSpinBox rename the signal to not overwrite the signal of the base class
* In UIntSpinBox use the (ambiguous) signal 'valueChanged' of the base class QSpinBox
* To avoid that connect() fails use the function pointer of the Qt class where the signal is defined
This commit is contained in:
wmayer
2023-01-12 17:02:59 +01:00
parent 19d624396f
commit 103de43a4e
14 changed files with 43 additions and 50 deletions

View File

@@ -45,16 +45,16 @@ SketcherGeneralWidget::SketcherGeneralWidget(QWidget *parent)
ui->renderingOrder->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents);
// connecting the needed signals
connect(ui->checkBoxShowGrid, &Gui::PrefCheckBox::toggled,
connect(ui->checkBoxShowGrid, &QCheckBox::toggled,
this, &SketcherGeneralWidget::emitToggleGridView);
connect(ui->checkBoxGridSnap, &Gui::PrefCheckBox::toggled,
connect(ui->checkBoxGridSnap, &QCheckBox::toggled,
this, &SketcherGeneralWidget::emitToggleGridSnap);
connect(ui->gridSize, qOverload<double>(&Gui::PrefQuantitySpinBox::valueChanged),
this, &SketcherGeneralWidget::emitSetGridSize);
connect(ui->checkBoxAutoconstraints, &Gui::PrefCheckBox::toggled,
connect(ui->checkBoxAutoconstraints, &QCheckBox::toggled,
this, &SketcherGeneralWidget::emitToggleAutoconstraints);
connect(ui->checkBoxRedundantAutoconstraints,
&Gui::PrefCheckBox::toggled, this, &SketcherGeneralWidget::emitToggleAvoidRedundant);
connect(ui->checkBoxRedundantAutoconstraints, &QCheckBox::toggled,
this, &SketcherGeneralWidget::emitToggleAvoidRedundant);
ui->renderingOrder->installEventFilter(this);
}