From b38ce276d4fee9afb7dc9704c1a0b42d0dc35086 Mon Sep 17 00:00:00 2001
From: hjk <qtc-committer@nokia.com>
Date: Tue, 22 Feb 2011 16:48:08 +0100
Subject: [PATCH] use IEditor::widget() instead of
 BaseTextEditor::editorWidget() when possible

---
 src/plugins/cmakeprojectmanager/cmakeeditor.cpp | 2 +-
 src/plugins/designer/formwindoweditor.cpp       | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/plugins/cmakeprojectmanager/cmakeeditor.cpp b/src/plugins/cmakeprojectmanager/cmakeeditor.cpp
index 1d9ebbef28c..1dbc697899a 100644
--- a/src/plugins/cmakeprojectmanager/cmakeeditor.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeeditor.cpp
@@ -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);
diff --git a/src/plugins/designer/formwindoweditor.cpp b/src/plugins/designer/formwindoweditor.cpp
index 9cd663eef54..c29ddf3da7c 100644
--- a/src/plugins/designer/formwindoweditor.cpp
+++ b/src/plugins/designer/formwindoweditor.cpp
@@ -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()));
 }
 
-- 
GitLab