forked from qt-creator/qt-creator
connect() to ambiguous signals/slots: Replace static_cast with QOverload
Change-Id: I473d7a2a16509cee944a2a21b022a3f6f02cfd8d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -235,7 +235,7 @@ void SavedAction::connectWidget(QWidget *widget, ApplyMode applyMode)
|
||||
} else if (auto spinBox = qobject_cast<QSpinBox *>(widget)) {
|
||||
spinBox->setValue(m_value.toInt());
|
||||
if (applyMode == ImmediateApply) {
|
||||
connect(spinBox, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged),
|
||||
connect(spinBox, QOverload<int>::of(&QSpinBox::valueChanged),
|
||||
this, [this, spinBox]() { setValue(spinBox->value()); });
|
||||
}
|
||||
} else if (auto lineEdit = qobject_cast<QLineEdit *>(widget)) {
|
||||
|
||||
Reference in New Issue
Block a user