Fixes: Session loading does not restore form files

RevBy: Eike
Details: Make form editor factory and form editor return the same editor kind.
This commit is contained in:
Friedemann Kleint
2009-02-04 13:39:11 +01:00
parent 1f3a96a1e8
commit 6f4a8be946
3 changed files with 2 additions and 3 deletions

View File

@@ -42,7 +42,6 @@ const char * const C_FORMEDITOR = "Formeditor";
const char * const T_FORMEDITOR = "Formeditor.Toolbar";
const char * const M_FORMEDITOR = "Formeditor.Menu";
const char * const M_FORMEDITOR_PREVIEW = "Formeditor.Menu.Preview";
const char * const C_FORMWINDOW = "Formwindow";
// Wizard type
const char * const FORM_FILE_TYPE = "Qt4FormFiles";

View File

@@ -546,7 +546,7 @@ void FormEditorW::currentEditorChanged(Core::IEditor *editor)
qDebug() << Q_FUNC_INFO << editor << " of " << m_fwm->formWindowCount();
// Deactivate Designer if a non-form is being edited
if (editor && !qstrcmp(editor->kind(), Constants::C_FORMWINDOW)) {
if (editor && !qstrcmp(editor->kind(), Constants::C_FORMEDITOR)) {
FormWindowEditor *fw = qobject_cast<FormWindowEditor *>(editor);
QTC_ASSERT(fw, return);
fw->activate();

View File

@@ -260,7 +260,7 @@ Core::IFile *FormWindowEditor::file()
const char *FormWindowEditor::kind() const
{
return C_FORMWINDOW;
return C_FORMEDITOR;
}
QString FormWindowEditor::displayName() const