mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-13 18:14:13 +02:00
Modernize and fix buttonClicked connects.
Two QButtonGroup::buttonClicked overload-ambiguity fixes, plus cleanup of the connects sitting alongside them: TitleBlockDimensionWidget: switched from the deprecated buttonClicked(int) id-based overload to buttonClicked(QAbstractButton*), disambiguated via qOverload. The slot doesn't use the argument either way, so this is a pure modernization with no behavior change. ExportPropertiesWidget: same buttonClicked fix for exported_content_choices, plus modernized the adjacent currentIndexChanged(int) relay (disambiguated via qOverload, since QComboBox::currentIndexChanged(QString) still exists pre-Qt6) and six QCheckBox::stateChanged(int) relays (single signal, no disambiguation needed). QCheckBox::stateChanged(int) is deprecated as of Qt 6.7 in favor of checkStateChanged(Qt::CheckState), but this project has no Qt6 minor version floor pinned in CMakeLists.txt, so stateChanged(int) remains the correct unconditional choice for now. QT_VERSION_CHECK(6, 7, 0) guarded checkStateChanged was introduced to avoid future warnings.
This commit is contained in:
@@ -143,7 +143,7 @@ void TitleBlockDimensionWidget::initWidgets()
|
||||
dimension_type_ -> addButton(relative_button_, QET::RelativeToTotalLength);
|
||||
dimension_type_ -> addButton(remaining_button_, QET::RelativeToRemainingLength);
|
||||
absolute_button_ -> setChecked(true);
|
||||
connect(dimension_type_, SIGNAL(buttonClicked(int)), this, SLOT(updateSpinBoxSuffix()));
|
||||
connect(dimension_type_, qOverload<QAbstractButton*>(&QButtonGroup::buttonClicked), this, &TitleBlockDimensionWidget::updateSpinBoxSuffix);
|
||||
}
|
||||
|
||||
updateSpinBoxSuffix();
|
||||
|
||||
Reference in New Issue
Block a user