QmlDesigner: Registers new views and tools

Change-Id: I9709ec28623d7cecb4167d41f5f69b4791359e22
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
This commit is contained in:
Thomas Hartmann
2015-09-18 16:41:34 +02:00
committed by Alessandro Portale
parent b297e88535
commit beb424d209

View File

@@ -30,6 +30,12 @@
#include "settingspage.h" #include "settingspage.h"
#include "designmodecontext.h" #include "designmodecontext.h"
#include <connectionview.h>
#include <sourcetool/sourcetool.h>
#include <colortool/colortool.h>
#include <texttool/texttool.h>
#include <pathtool/pathtool.h>
#include <qmljseditor/qmljseditorconstants.h> #include <qmljseditor/qmljseditorconstants.h>
#include <qmljstools/qmljstoolsconstants.h> #include <qmljstools/qmljstoolsconstants.h>
@@ -127,6 +133,12 @@ bool QmlDesignerPlugin::initialize(const QStringList & /*arguments*/, QString *e
data->settings.fromSettings(Core::ICore::settings()); data->settings.fromSettings(Core::ICore::settings());
data->viewManager.registerViewTakingOwnership(new QmlDesigner::Internal::ConnectionView());
data->viewManager.registerFormEditorToolTakingOwnership(new QmlDesigner::SourceTool);
data->viewManager.registerFormEditorToolTakingOwnership(new QmlDesigner::ColorTool);
data->viewManager.registerFormEditorToolTakingOwnership(new QmlDesigner::TextTool);
data->viewManager.registerFormEditorToolTakingOwnership(new QmlDesigner::PathTool);
const Core::Context switchContext(QmlDesigner::Constants::C_QMLDESIGNER, const Core::Context switchContext(QmlDesigner::Constants::C_QMLDESIGNER,
QmlJSEditor::Constants::C_QMLJSEDITOR_ID); QmlJSEditor::Constants::C_QMLJSEDITOR_ID);