diff options
Diffstat (limited to 'src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp')
-rw-r--r-- | src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp b/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp index 2b64138387..ea9bed7489 100644 --- a/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp +++ b/src/plugins/qmldesigner/components/stateseditor/stateseditorview.cpp @@ -23,6 +23,7 @@ #include <QDebug> #include <QMessageBox> #include <QRegularExpression> +#include <QScopeGuard> #include <cmath> #include <memory> @@ -331,7 +332,7 @@ void StatesEditorView::setWhenCondition(int internalNodeId, const QString &condi return; m_block = true; - auto guard = qScopeGuard([&]() { m_block = false; }); + const QScopeGuard cleanup([&] { m_block = false; }); if (hasModelNodeForInternalId(internalNodeId)) { QmlModelState state(modelNodeForInternalId(internalNodeId)); @@ -351,7 +352,7 @@ void StatesEditorView::resetWhenCondition(int internalNodeId) return; m_block = true; - auto guard = qScopeGuard([&]() { m_block = false; }); + const QScopeGuard cleanup([&] { m_block = false; }); if (hasModelNodeForInternalId(internalNodeId)) { QmlModelState state(modelNodeForInternalId(internalNodeId)); @@ -369,7 +370,7 @@ void StatesEditorView::setStateAsDefault(int internalNodeId) return; m_block = true; - auto guard = qScopeGuard([&]() { m_block = false; }); + const QScopeGuard cleanup([&] { m_block = false; }); if (hasModelNodeForInternalId(internalNodeId)) { QmlModelState state(modelNodeForInternalId(internalNodeId)); @@ -389,7 +390,7 @@ void StatesEditorView::resetDefaultState() return; m_block = true; - auto guard = qScopeGuard([&]() { m_block = false; }); + const QScopeGuard cleanup([&] { m_block = false; }); try { if (acitveStatesGroupNode().hasProperty("state")) @@ -411,7 +412,7 @@ void StatesEditorView::setAnnotation(int internalNodeId) return; m_block = true; - auto guard = qScopeGuard([&]() { m_block = false; }); + const QScopeGuard cleanup([&] { m_block = false; }); if (hasModelNodeForInternalId(internalNodeId)) { QmlModelState state(modelNodeForInternalId(internalNodeId)); @@ -438,7 +439,7 @@ void StatesEditorView::removeAnnotation(int internalNodeId) return; m_block = true; - auto guard = qScopeGuard([&]() { m_block = false; }); + const QScopeGuard cleanup([&] { m_block = false; }); if (hasModelNodeForInternalId(internalNodeId)) { QmlModelState state(modelNodeForInternalId(internalNodeId)); @@ -580,7 +581,7 @@ void StatesEditorView::variantPropertiesChanged(const QList<VariantProperty> &pr return; m_block = true; - auto guard = qScopeGuard([&]() { m_block = false; }); + const QScopeGuard cleanup([&] { m_block = false; }); for (const VariantProperty &property : propertyList) { if (property.name() == "name" |