Commit b38ce276 authored by hjk's avatar hjk
Browse files

use IEditor::widget() instead of BaseTextEditor::editorWidget() when possible

parent 3e7d9bde
......@@ -64,7 +64,7 @@ Core::Context CMakeEditor::context() const
Core::IEditor *CMakeEditor::duplicate(QWidget *parent)
{
CMakeEditorWidget *w = qobject_cast<CMakeEditorWidget*>(editorWidget());
CMakeEditorWidget *w = qobject_cast<CMakeEditorWidget*>(widget());
CMakeEditorWidget *ret = new CMakeEditorWidget(parent, w->factory(), w->actionHandler());
ret->duplicateFrom(w);
TextEditor::TextEditorSettings::instance()->initializeEditor(ret);
......
......@@ -185,10 +185,10 @@ void FormWindowEditor::syncXmlEditor()
void FormWindowEditor::configureXmlEditor() const
{
TextEditor::PlainTextEditorWidget *editor =
qobject_cast<TextEditor::PlainTextEditorWidget *>(d->m_textEditor.editorWidget());
if (editor)
editor->configure(Core::ICore::instance()->mimeDatabase()->findByFile(
TextEditor::PlainTextEditorWidget *widget =
qobject_cast<TextEditor::PlainTextEditorWidget *>(d->m_textEditor.widget());
if (widget)
widget->configure(Core::ICore::instance()->mimeDatabase()->findByFile(
d->m_file.fileName()));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment