summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesper K. Pedersen <jesper.pedersen@kdab.com>2013-05-20 13:24:43 +0200
committerJesper K. Pedersen <jesper.pedersen@kdab.com>2013-05-21 15:06:45 +0200
commite7153381ec6fc33588b68c6701a5b91315fe3326 (patch)
tree522908c892902cc9470274bf7a977a6db440fd11
parent8cab40c136525e73437768f3307e92339dc4c992 (diff)
wrap UI files correctly
Change-Id: I70c1f7076225685ee40bf9944c3fbb2f09875c00 Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
-rw-r--r--objects/editors.cpp9
-rw-r--r--plugin-scripting_dependencies.pri1
2 files changed, 9 insertions, 1 deletions
diff --git a/objects/editors.cpp b/objects/editors.cpp
index 0921988..d6da92e 100644
--- a/objects/editors.cpp
+++ b/objects/editors.cpp
@@ -38,7 +38,8 @@
#include <coreplugin/editormanager/ieditor.h>
#include <cpptools/cppmodelmanagerinterface.h>
#include "scriptrunner.h"
-
+#include <designer/formwindoweditor.h>
+#include <texteditor/plaintexteditor.h>
using namespace Scripting;
using namespace Scripting::Internal;
@@ -55,8 +56,14 @@ static Editor *wrapEditor(Core::IEditor *editor) {
wrapper = new Scripting::Internal::CppEditor;
else if (qobject_cast<TextEditor::BaseTextEditor*>(editor))
wrapper = new BaseTextEditor;
+ else if ( Designer::FormWindowEditor* designerEditor = qobject_cast<Designer::FormWindowEditor*>(editor) ) {
+ wrapper = new BaseTextEditor;
+ wrapper->setEditor(designerEditor->textEditor());
+ return wrapper;
+ }
else
wrapper = new Editor;
+
wrapper->setEditor(editor);
return wrapper;
}
diff --git a/plugin-scripting_dependencies.pri b/plugin-scripting_dependencies.pri
index 121c15d..8b20502 100644
--- a/plugin-scripting_dependencies.pri
+++ b/plugin-scripting_dependencies.pri
@@ -4,3 +4,4 @@ QTC_PLUGIN_DEPENDS += \
coreplugin \
projectexplorer \
cpptools \
+ designer