forked from qt-creator/qt-creator
Replace manual signal blocking/unblocking with QSignalBlocker
Change-Id: Ibb59fab4e37d045e506c5a8172b6f5cbb955b028 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -163,18 +163,16 @@ void ExportDialog::resetExportSize()
|
||||
void ExportDialog::setExportWidthBlocked(int width)
|
||||
{
|
||||
if (m_widthSpinBox->value() != width) {
|
||||
const bool blockSignals = m_widthSpinBox->blockSignals(true);
|
||||
QSignalBlocker blocker(m_widthSpinBox);
|
||||
m_widthSpinBox->setValue(width);
|
||||
m_widthSpinBox->blockSignals(blockSignals);
|
||||
}
|
||||
}
|
||||
|
||||
void ExportDialog::setExportHeightBlocked(int height)
|
||||
{
|
||||
if (m_heightSpinBox->value() != height) {
|
||||
const bool blockSignals = m_heightSpinBox->blockSignals(true);
|
||||
QSignalBlocker blocker(m_heightSpinBox);
|
||||
m_heightSpinBox->setValue(height);
|
||||
m_heightSpinBox->blockSignals(blockSignals);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user