ScxmlEditor: Modernize

modernize-*

Change-Id: I72a72cf5e9327956fdc0e5fc6f552bfc03d2122c
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
This commit is contained in:
Alessandro Portale
2018-11-24 20:21:25 +01:00
parent 6474b129e6
commit 24ecd7fe6a
19 changed files with 39 additions and 43 deletions

View File

@@ -89,8 +89,8 @@ void ScxmlEditorStack::modeAboutToChange(Core::Id m)
{
// Sync the editor when entering edit mode
if (m == Core::Constants::MODE_EDIT) {
for (const ScxmlTextEditor *editor: m_editors)
if (ScxmlEditorDocument *document = qobject_cast<ScxmlEditorDocument*>(editor->textDocument()))
for (auto editor: qAsConst(m_editors))
if (auto document = qobject_cast<ScxmlEditorDocument*>(editor->textDocument()))
document->syncXmlFromDesignWidget();
}
}