forked from qt-creator/qt-creator
		
	DesignMode/Qt Designer clean-up Part V: Renaming
Re-introduce FormWindowEditor as IEditor used for Designer. Use SharedTools::WidgetHost directly for embedding into FormEditorStack, doing the geometry-changed handling in there as well.
This commit is contained in:
		| @@ -48,7 +48,7 @@ | ||||
| #include <projectexplorer/project.h> | ||||
| #include <projectexplorer/projectexplorerconstants.h> | ||||
| #include <utils/qtcassert.h> | ||||
| #include <designer/designerxmleditor.h> | ||||
| #include <designer/formwindoweditor.h> | ||||
|  | ||||
| #include <QtCore/QCoreApplication> | ||||
| #include <QtCore/QDir> | ||||
| @@ -115,7 +115,7 @@ void Qt4Manager::init() | ||||
| void Qt4Manager::editorChanged(Core::IEditor *editor) | ||||
| { | ||||
|     // Handle old editor | ||||
|     Designer::DesignerXmlEditorEditable *lastFormEditor = qobject_cast<Designer::DesignerXmlEditorEditable *>(m_lastEditor); | ||||
|     Designer::FormWindowEditor *lastFormEditor = qobject_cast<Designer::FormWindowEditor *>(m_lastEditor); | ||||
|     if (lastFormEditor) { | ||||
|         disconnect(lastFormEditor, SIGNAL(changed()), this, SLOT(uiEditorContentsChanged())); | ||||
|  | ||||
| @@ -130,7 +130,7 @@ void Qt4Manager::editorChanged(Core::IEditor *editor) | ||||
|     m_lastEditor = editor; | ||||
|  | ||||
|     // Handle new editor | ||||
|     if (Designer::DesignerXmlEditorEditable *fw = qobject_cast<Designer::DesignerXmlEditorEditable *>(editor)) | ||||
|     if (Designer::FormWindowEditor *fw = qobject_cast<Designer::FormWindowEditor *>(editor)) | ||||
|         connect(fw, SIGNAL(changed()), this, SLOT(uiEditorContentsChanged())); | ||||
| } | ||||
|  | ||||
| @@ -139,7 +139,7 @@ void Qt4Manager::editorAboutToClose(Core::IEditor *editor) | ||||
|     if (m_lastEditor == editor) { | ||||
|         // Oh no our editor is going to be closed | ||||
|         // get the content first | ||||
|         Designer::DesignerXmlEditorEditable *lastEditor = qobject_cast<Designer::DesignerXmlEditorEditable *>(m_lastEditor); | ||||
|         Designer::FormWindowEditor *lastEditor = qobject_cast<Designer::FormWindowEditor *>(m_lastEditor); | ||||
|         if (lastEditor) { | ||||
|             disconnect(lastEditor, SIGNAL(changed()), this, SLOT(uiEditorContentsChanged())); | ||||
|             if (m_dirty) { | ||||
| @@ -158,7 +158,7 @@ void Qt4Manager::uiEditorContentsChanged() | ||||
|     // cast sender, get filename | ||||
|     if (m_dirty) | ||||
|         return; | ||||
|     Designer::DesignerXmlEditorEditable *fw = qobject_cast<Designer::DesignerXmlEditorEditable *>(sender()); | ||||
|     Designer::FormWindowEditor *fw = qobject_cast<Designer::FormWindowEditor *>(sender()); | ||||
|     if (!fw) | ||||
|         return; | ||||
|     m_dirty = true; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user