Use Core::Id in ModeManager interface

Makes it more uniform to use and allows placeholder widget
creation to be independent of mode creations.

Change-Id: I4021bc9db7f8c78f0374c0cc3b3331506959afe4
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
hjk
2016-03-25 20:00:19 +01:00
parent ed7d5e0d62
commit 5e47d35fcd
29 changed files with 87 additions and 109 deletions

View File

@@ -177,13 +177,13 @@ SharedTools::WidgetHost *FormEditorStack::formWindowEditorForXmlEditor(const Cor
return i != -1 ? m_formEditors.at(i).widgetHost : static_cast<SharedTools::WidgetHost *>(0);
}
void FormEditorStack::modeAboutToChange(Core::IMode *m)
void FormEditorStack::modeAboutToChange(Core::Id mode)
{
if (Designer::Constants::Internal::debug && m)
qDebug() << "FormEditorStack::modeAboutToChange" << m->id().toString();
if (Designer::Constants::Internal::debug)
qDebug() << "FormEditorStack::modeAboutToChange" << mode.toString();
// Sync the editor when entering edit mode
if (m && m->id() == Core::Constants::MODE_EDIT)
if (mode == Core::Constants::MODE_EDIT)
foreach (const EditorData &data, m_formEditors)
data.formWindowEditor->formWindowFile()->syncXmlFromFormWindow();
}