summaryrefslogtreecommitdiff
path: root/src/plugins/scxmleditor/common
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2017-09-30 07:12:57 +0200
committerTobias Hunger <tobias.hunger@qt.io>2017-10-04 09:35:06 +0000
commitc330cf067959b1919fd2d75a5e3797e0e64cc9fc (patch)
tree7ccfef4b8841efde06cdffce7708c8f4e0ec156b /src/plugins/scxmleditor/common
parent7c3ea5a78c30c90d6ce250aa312a2cb6cc587901 (diff)
downloadqt-creator-c330cf067959b1919fd2d75a5e3797e0e64cc9fc.tar.gz
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/scxmleditor/common')
-rw-r--r--src/plugins/scxmleditor/common/navigatorslider.cpp3
-rw-r--r--src/plugins/scxmleditor/common/stateproperties.cpp3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/scxmleditor/common/navigatorslider.cpp b/src/plugins/scxmleditor/common/navigatorslider.cpp
index 53ed72cdfc..7effd087eb 100644
--- a/src/plugins/scxmleditor/common/navigatorslider.cpp
+++ b/src/plugins/scxmleditor/common/navigatorslider.cpp
@@ -51,7 +51,6 @@ void NavigatorSlider::zoomOut()
void NavigatorSlider::setSliderValue(int val)
{
- m_ui.m_slider->blockSignals(true);
+ QSignalBlocker blocker(m_ui.m_slider);
m_ui.m_slider->setValue(val);
- m_ui.m_slider->blockSignals(false);
}
diff --git a/src/plugins/scxmleditor/common/stateproperties.cpp b/src/plugins/scxmleditor/common/stateproperties.cpp
index 568336295f..11d8ca005b 100644
--- a/src/plugins/scxmleditor/common/stateproperties.cpp
+++ b/src/plugins/scxmleditor/common/stateproperties.cpp
@@ -193,8 +193,7 @@ void StateProperties::setContentVisibility(bool visible)
void StateProperties::updateContent()
{
if (!m_contentEdit->hasFocus()) {
- m_contentEdit->blockSignals(true);
+ QSignalBlocker blocker(m_contentEdit);
m_contentEdit->setPlainText(content());
- m_contentEdit->blockSignals(false);
}
}