diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2017-09-30 07:12:57 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2017-10-04 09:35:06 +0000 |
commit | c330cf067959b1919fd2d75a5e3797e0e64cc9fc (patch) | |
tree | 7ccfef4b8841efde06cdffce7708c8f4e0ec156b /src/plugins/imageviewer | |
parent | 7c3ea5a78c30c90d6ce250aa312a2cb6cc587901 (diff) |
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>
Diffstat (limited to 'src/plugins/imageviewer')
-rw-r--r-- | src/plugins/imageviewer/exportdialog.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/imageviewer/exportdialog.cpp b/src/plugins/imageviewer/exportdialog.cpp index b46b3da239..778d90e9ec 100644 --- a/src/plugins/imageviewer/exportdialog.cpp +++ b/src/plugins/imageviewer/exportdialog.cpp @@ -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); } } |