diff --git a/src/plugins/qmlinspector/components/canvasframerate.cpp b/src/plugins/qmlinspector/components/canvasframerate.cpp index 0cd3cab01bc79a558343082712da7ac39d517090..d3f6179d8f7a36e25016704606d042da4d638453 100644 --- a/src/plugins/qmlinspector/components/canvasframerate.cpp +++ b/src/plugins/qmlinspector/components/canvasframerate.cpp @@ -48,7 +48,8 @@ #include <QtGui/qevent.h> -QT_BEGIN_NAMESPACE +namespace Qml { +namespace Internal { class QLineGraph : public QWidget { @@ -562,6 +563,7 @@ void CanvasFrameRate::enabledToggled(bool checked) static_cast<QDeclarativeDebugClient *>(m_plugin)->setEnabled(checked); } -QT_END_NAMESPACE +} +} #include "canvasframerate.moc" diff --git a/src/plugins/qmlinspector/components/canvasframerate.h b/src/plugins/qmlinspector/components/canvasframerate.h index b067374e8973610774e8ba2c4d9e8382a57842aa..d65ebc71e645fd1d4ad978d17faf49b1b8a05c3e 100644 --- a/src/plugins/qmlinspector/components/canvasframerate.h +++ b/src/plugins/qmlinspector/components/canvasframerate.h @@ -34,15 +34,19 @@ #include <QtCore/qpointer.h> #include <QtGui/qwidget.h> - QT_BEGIN_NAMESPACE - class QTabWidget; class QSlider; class QGroupBox; class QLabel; class QSpinBox; class QPushButton; +QT_END_NAMESPACE + + +namespace Qml { +namespace Internal { + class CanvasFrameRatePlugin; @@ -57,6 +61,9 @@ public: void setSizeHint(const QSize &); virtual QSize sizeHint() const; +signals: + void contextHelpIdChanged(const QString &helpId); + private slots: void clearGraph(); void newTab(); @@ -74,7 +81,8 @@ private: QSize m_sizeHint; }; -QT_END_NAMESPACE +} // Internal +} // Qml #endif // CANVASFRAMERATE_H diff --git a/src/plugins/qmlinspector/components/expressionquerywidget.cpp b/src/plugins/qmlinspector/components/expressionquerywidget.cpp index 32cb1b25de94c189d9ba60f13e839e27805dffae..c57e914952c9329c1f456199239d6ce7fde245b3 100644 --- a/src/plugins/qmlinspector/components/expressionquerywidget.cpp +++ b/src/plugins/qmlinspector/components/expressionquerywidget.cpp @@ -28,6 +28,7 @@ **************************************************************************/ #include "expressionquerywidget.h" #include "qmlinspectorconstants.h" +#include "inspectorcontext.h" #include <utils/styledbar.h> #include <utils/filterlineedit.h> @@ -54,6 +55,10 @@ #include <QtCore/QDebug> +namespace Qml { +namespace Internal { + + ExpressionQueryWidget::ExpressionQueryWidget(Mode mode, QDeclarativeEngineDebug *client, QWidget *parent) : QWidget(parent), m_mode(mode), @@ -87,6 +92,7 @@ ExpressionQueryWidget::ExpressionQueryWidget(Mode mode, QDeclarativeEngineDebug m_clearButton->setToolTip(tr("Clear Output")); m_clearButton->setIcon(QIcon(Core::Constants::ICON_CLEAN_PANE)); connect(m_clearButton, SIGNAL(clicked()), this, SLOT(clearTextEditor())); + connect(m_lineEdit, SIGNAL(textChanged(QString)), SLOT(changeContextHelpId(QString))); connect(m_lineEdit, SIGNAL(returnPressed()), SLOT(executeExpression())); QHBoxLayout *hbox = new QHBoxLayout(bar); @@ -106,6 +112,11 @@ ExpressionQueryWidget::ExpressionQueryWidget(Mode mode, QDeclarativeEngineDebug clear(); } +void ExpressionQueryWidget::changeContextHelpId(const QString &) +{ + emit contextHelpIdChanged(InspectorContext::contextHelpIdForItem(m_lineEdit->text())); +} + void ExpressionQueryWidget::clearTextEditor() { m_textEdit->clear(); @@ -339,3 +350,6 @@ bool ExpressionQueryWidget::eventFilter(QObject *obj, QEvent *event) } return QWidget::eventFilter(obj, event); } + +} // Internal +} // Qml diff --git a/src/plugins/qmlinspector/components/expressionquerywidget.h b/src/plugins/qmlinspector/components/expressionquerywidget.h index cb1aaa44cb855b763ebdfdc65f4e52b4d389fa95..50ec058b8ecba7acc657f6757b4c639b6cb03156 100644 --- a/src/plugins/qmlinspector/components/expressionquerywidget.h +++ b/src/plugins/qmlinspector/components/expressionquerywidget.h @@ -33,7 +33,6 @@ #include <QtGui/qwidget.h> - QT_BEGIN_NAMESPACE class QGroupBox; @@ -55,6 +54,9 @@ namespace QmlJSEditor { class Highlighter; } +namespace Qml { +namespace Internal { + class ExpressionQueryWidget : public QWidget { Q_OBJECT @@ -70,6 +72,9 @@ public: void setEngineDebug(QDeclarativeEngineDebug *client); void clear(); +signals: + void contextHelpIdChanged(const QString &contextHelpId); + protected: bool eventFilter(QObject *obj, QEvent *event); @@ -81,6 +86,7 @@ private slots: void executeExpression(); void showResult(); void invokeCompletion(); + void changeContextHelpId(const QString &text); private: void setFontSettings(); @@ -108,5 +114,8 @@ private: QDeclarativeDebugObjectReference m_objectAtLastFocus; }; +} // Internal +} // Qml + #endif diff --git a/src/plugins/qmlinspector/components/objectpropertiesview.cpp b/src/plugins/qmlinspector/components/objectpropertiesview.cpp index 890e0c19fd5a832d08f94bbf500a47b574843d90..ace3432a825999bd852c992c49169c1eb0209438 100644 --- a/src/plugins/qmlinspector/components/objectpropertiesview.cpp +++ b/src/plugins/qmlinspector/components/objectpropertiesview.cpp @@ -27,12 +27,15 @@ ** **************************************************************************/ #include "objectpropertiesview.h" +#include "inspectorcontext.h" #include <QtCore/QDebug> #include <QtGui/QTreeWidget> #include <QtGui/QLayout> #include <QtGui/QHeaderView> +namespace Qml { +namespace Internal { class PropertiesViewItem : public QObject, public QTreeWidgetItem @@ -81,6 +84,7 @@ ObjectPropertiesView::ObjectPropertiesView(QDeclarativeEngineDebug *client, QWid << tr("Name") << tr("Value") << tr("Type")); QObject::connect(m_tree, SIGNAL(itemActivated(QTreeWidgetItem *, int)), this, SLOT(itemActivated(QTreeWidgetItem *))); + connect(m_tree, SIGNAL(itemSelectionChanged()), SLOT(changeItemSelection())); m_tree->setColumnCount(3); m_tree->header()->setDefaultSectionSize(150); @@ -88,6 +92,16 @@ ObjectPropertiesView::ObjectPropertiesView(QDeclarativeEngineDebug *client, QWid layout->addWidget(m_tree); } +void ObjectPropertiesView::changeItemSelection() +{ + if (m_tree->selectedItems().isEmpty()) + return; + + QString item = m_object.className(); + QString prop = m_tree->selectedItems().first()->text(0); + emit contextHelpIdChanged(InspectorContext::contextHelpIdForProperty(item, prop)); +} + void ObjectPropertiesView::setEngineDebug(QDeclarativeEngineDebug *client) { m_client = client; @@ -254,4 +268,7 @@ void ObjectPropertiesView::itemActivated(QTreeWidgetItem *i) emit activated(m_object, item->property); } +} +} + #include "objectpropertiesview.moc" diff --git a/src/plugins/qmlinspector/components/objectpropertiesview.h b/src/plugins/qmlinspector/components/objectpropertiesview.h index 9bf382ae531f28739b244750d004ad8f316a1b37..8cd3a7decd69f1d11307ce76ab86de44d40bdf4e 100644 --- a/src/plugins/qmlinspector/components/objectpropertiesview.h +++ b/src/plugins/qmlinspector/components/objectpropertiesview.h @@ -41,6 +41,9 @@ class QDeclarativeDebugConnection; QT_END_NAMESPACE +namespace Qml { +namespace Internal { + class PropertiesViewItem; class ObjectPropertiesView : public QWidget @@ -54,12 +57,14 @@ public: signals: void activated(const QDeclarativeDebugObjectReference &, const QDeclarativeDebugPropertyReference &); + void contextHelpIdChanged(const QString &contextHelpId); public slots: void reload(const QDeclarativeDebugObjectReference &); void watchCreated(QDeclarativeDebugWatch *); private slots: + void changeItemSelection(); void queryFinished(); void watchStateChanged(); void valueChanged(const QByteArray &name, const QVariant &value); @@ -78,7 +83,8 @@ private: QDeclarativeDebugObjectReference m_object; }; - +} // Internal +} // Qml #endif diff --git a/src/plugins/qmlinspector/components/objecttree.cpp b/src/plugins/qmlinspector/components/objecttree.cpp index c65da984b19b479d4a3bb367e539bae9a1e81369..e4c187bbf688827fee7042fe863432beefeb19a0 100644 --- a/src/plugins/qmlinspector/components/objecttree.cpp +++ b/src/plugins/qmlinspector/components/objecttree.cpp @@ -37,8 +37,10 @@ #include <private/qdeclarativedebug_p.h> #include "objecttree.h" +#include "inspectorcontext.h" -//Q_DECLARE_METATYPE(QDeclarativeDebugObjectReference) +namespace Qml { +namespace Internal { ObjectTree::ObjectTree(QDeclarativeEngineDebug *client, QWidget *parent) : QTreeWidget(parent), @@ -54,6 +56,7 @@ ObjectTree::ObjectTree(QDeclarativeEngineDebug *client, QWidget *parent) SLOT(currentItemChanged(QTreeWidgetItem *))); connect(this, SIGNAL(itemActivated(QTreeWidgetItem *, int)), SLOT(activated(QTreeWidgetItem *))); + connect(this, SIGNAL(itemSelectionChanged()), SLOT(selectionChanged())); } void ObjectTree::setEngineDebug(QDeclarativeEngineDebug *client) @@ -61,6 +64,16 @@ void ObjectTree::setEngineDebug(QDeclarativeEngineDebug *client) m_client = client; } +void ObjectTree::selectionChanged() +{ + if (selectedItems().isEmpty()) + return; + + QTreeWidgetItem *item = selectedItems().first(); + if (item) + emit contextHelpIdChanged(InspectorContext::contextHelpIdForItem(item->text(0))); +} + void ObjectTree::reload(int objectDebugId) { if (!m_client) @@ -87,6 +100,8 @@ void ObjectTree::setCurrentObject(int debugId) scrollToItem(item); item->setExpanded(true); } + + } void ObjectTree::objectFetched() @@ -218,3 +233,6 @@ void ObjectTree::mousePressEvent(QMouseEvent *me) } } } + +} +} diff --git a/src/plugins/qmlinspector/components/objecttree.h b/src/plugins/qmlinspector/components/objecttree.h index fed55390c6248780e7744f747e0e829955f12d7b..8e800209f53b6a4b5c7ef6faaecbd1635b2b9411 100644 --- a/src/plugins/qmlinspector/components/objecttree.h +++ b/src/plugins/qmlinspector/components/objecttree.h @@ -41,6 +41,11 @@ class QDeclarativeDebugObjectQuery; class QDeclarativeDebugContextReference; class QDeclarativeDebugConnection; +QT_END_NAMESPACE + +namespace Qml { +namespace Internal { + class ObjectTree : public QTreeWidget { @@ -54,6 +59,7 @@ signals: void currentObjectChanged(const QDeclarativeDebugObjectReference &); void activated(const QDeclarativeDebugObjectReference &); void expressionWatchRequested(const QDeclarativeDebugObjectReference &, const QString &); + void contextHelpIdChanged(const QString &contextHelpId); public slots: void reload(int objectDebugId); // set the root object @@ -66,6 +72,7 @@ private slots: void objectFetched(); void currentItemChanged(QTreeWidgetItem *); void activated(QTreeWidgetItem *); + void selectionChanged(); private: QTreeWidgetItem *findItemByObjectId(int debugId) const; @@ -78,7 +85,7 @@ private: QDeclarativeDebugObjectQuery *m_query; }; -QT_END_NAMESPACE - +} // Internal +} // Qml #endif diff --git a/src/plugins/qmlinspector/components/watchtable.cpp b/src/plugins/qmlinspector/components/watchtable.cpp index eb710d755240f3ba045af4d7494a500eb509f94b..4712f901998be715c700dae4ace2fc71b45f96ee 100644 --- a/src/plugins/qmlinspector/components/watchtable.cpp +++ b/src/plugins/qmlinspector/components/watchtable.cpp @@ -36,7 +36,8 @@ #include <private/qdeclarativedebug_p.h> #include <private/qdeclarativemetatype_p.h> -QT_BEGIN_NAMESPACE +namespace Qml { +namespace Internal { const int C_NAME = 0; const int C_VALUE = 1; @@ -166,6 +167,8 @@ QVariant WatchTableModel::data(const QModelIndex &idx, int role) const bool WatchTableModel::setData ( const QModelIndex & index, const QVariant & value, int role) { + Q_UNUSED(index); + Q_UNUSED(value); if (role == Qt::EditRole) { return true; } @@ -335,4 +338,6 @@ void WatchTableView::mousePressEvent(QMouseEvent *me) } } -QT_END_NAMESPACE + +} // Internal +} // Qml diff --git a/src/plugins/qmlinspector/components/watchtable.h b/src/plugins/qmlinspector/components/watchtable.h index f62bc11a9d0d3704cfc5f7e301983503dc2d3761..e38f89c3e92a51a22a677d4268d7d885e1dfdfd3 100644 --- a/src/plugins/qmlinspector/components/watchtable.h +++ b/src/plugins/qmlinspector/components/watchtable.h @@ -45,6 +45,11 @@ class QDeclarativeDebugConnection; class QDeclarativeDebugPropertyReference; class QDeclarativeDebugObjectReference; +QT_END_NAMESPACE + +namespace Qml { +namespace Internal { + class WatchTableModel : public QAbstractTableModel { Q_OBJECT @@ -117,6 +122,7 @@ public: signals: void objectActivated(int objectDebugId); + void contextHelpIdChanged(const QString &contextHelpId); protected: void mousePressEvent(QMouseEvent *me); @@ -130,6 +136,7 @@ private: }; -QT_END_NAMESPACE +} // Internal +} // Qml #endif // WATCHTABLEMODEL_H diff --git a/src/plugins/qmlinspector/inspectorcontext.cpp b/src/plugins/qmlinspector/inspectorcontext.cpp index 11a3d2637826253c269686743e14a31d5f938c71..c735e44d3f2b20c912d156da93fc3394ff900490 100644 --- a/src/plugins/qmlinspector/inspectorcontext.cpp +++ b/src/plugins/qmlinspector/inspectorcontext.cpp @@ -30,8 +30,15 @@ #include "inspectorcontext.h" #include "qmlinspectorconstants.h" +#include "components/objectpropertiesview.h" +#include "components/objecttree.h" +#include <coreplugin/icore.h> + #include <coreplugin/uniqueidmanager.h> + #include <QWidget> +#include <QDebug> + namespace Qml { namespace Internal { @@ -57,9 +64,26 @@ QWidget *InspectorContext::widget() return m_widget; } +void InspectorContext::setContextHelpId(const QString &helpId) +{ + m_contextHelpId = helpId; +} + QString InspectorContext::contextHelpId() const { - return QString(); + return m_contextHelpId; +} + +QString InspectorContext::contextHelpIdForProperty(const QString &itemName, const QString &propName) +{ + // TODO this functionality is not supported yet as we don't have help id's for + // properties. + return QString("QML.").append(itemName).append(".").append(propName); +} + +QString InspectorContext::contextHelpIdForItem(const QString &itemName) +{ + return QString("QML.").append(itemName); } } diff --git a/src/plugins/qmlinspector/inspectorcontext.h b/src/plugins/qmlinspector/inspectorcontext.h index a3e626db3b204212cab62ff8aa6db8ca8d4fc7b4..e73b3e4f2354e8c0969593eec431583a50950c75 100644 --- a/src/plugins/qmlinspector/inspectorcontext.h +++ b/src/plugins/qmlinspector/inspectorcontext.h @@ -40,6 +40,8 @@ QT_END_NAMESPACE namespace Qml { namespace Internal { +class ObjectPropertiesView; +class ObjectTree; class DesignModeWidget; /** @@ -47,6 +49,8 @@ class DesignModeWidget; */ class InspectorContext : public Core::IContext { + Q_OBJECT + public: InspectorContext(QWidget *widget); ~InspectorContext(); @@ -56,12 +60,20 @@ public: QString contextHelpId() const; + static QString contextHelpIdForProperty(const QString &itemName, const QString &propName); + static QString contextHelpIdForItem(const QString &itemName); + +public slots: + void setContextHelpId(const QString &helpId); + private: QList<int> m_context; QWidget *m_widget; + QString m_contextHelpId; + }; -} -} +} // Internal +} // Qml #endif // DESIGNMODECONTEXT_H diff --git a/src/plugins/qmlinspector/qmlinspector.cpp b/src/plugins/qmlinspector/qmlinspector.cpp index 1dd60e4bfb0ece2be45f3c87b498bba42f4bc833..b208cb42f4186fe89e52f7cd207ec319da7b5ba1 100644 --- a/src/plugins/qmlinspector/qmlinspector.cpp +++ b/src/plugins/qmlinspector/qmlinspector.cpp @@ -88,6 +88,7 @@ using namespace Qml; namespace Qml { +namespace Internal { class EngineSpinBox : public QSpinBox { Q_OBJECT @@ -111,8 +112,6 @@ private: QList<EngineInfo> m_engines; }; -} - EngineSpinBox::EngineSpinBox(QWidget *parent) : QSpinBox(parent) { @@ -157,6 +156,8 @@ int EngineSpinBox::valueFromText(const QString &text) const return -1; } +} // Internal + QmlInspector::QmlInspector(QObject *parent) : QObject(parent), @@ -169,15 +170,13 @@ QmlInspector::QmlInspector(QObject *parent) m_propertyWatcherDock(0), m_inspectorOutputDock(0) { - m_watchTableModel = new WatchTableModel(0, this); - - m_objectTreeWidget = new ObjectTree; - m_propertiesWidget = new ObjectPropertiesView; - m_watchTableView = new WatchTableView(m_watchTableModel); - m_frameRateWidget = new CanvasFrameRate; - m_expressionWidget = new ExpressionQueryWidget(ExpressionQueryWidget::SeparateEntryMode); - m_context = new Internal::InspectorContext(m_expressionWidget); - m_expressionWidget->createCommands(m_context); + m_watchTableModel = new Internal::WatchTableModel(0, this); + + m_objectTreeWidget = new Internal::ObjectTree; + m_propertiesWidget = new Internal::ObjectPropertiesView; + m_watchTableView = new Internal::WatchTableView(m_watchTableModel); + m_frameRateWidget = new Internal::CanvasFrameRate; + m_expressionWidget = new Internal::ExpressionQueryWidget(Internal::ExpressionQueryWidget::SeparateEntryMode); } bool QmlInspector::connectToViewer() @@ -300,7 +299,7 @@ void QmlInspector::connectionError() void QmlInspector::createDockWidgets() { - m_engineSpinBox = new EngineSpinBox; + m_engineSpinBox = new Internal::EngineSpinBox; m_engineSpinBox->setEnabled(false); connect(m_engineSpinBox, SIGNAL(valueChanged(int)), SLOT(queryEngineContext(int))); @@ -324,7 +323,7 @@ void QmlInspector::createDockWidgets() treeWindowLayout->addWidget(m_objectTreeWidget); m_watchTableView->setModel(m_watchTableModel); - WatchTableHeaderView *header = new WatchTableHeaderView(m_watchTableModel); + Internal::WatchTableHeaderView *header = new Internal::WatchTableHeaderView(m_watchTableModel); m_watchTableView->setHorizontalHeader(header); connect(m_objectTreeWidget, SIGNAL(activated(QDeclarativeDebugObjectReference)), @@ -387,6 +386,23 @@ void QmlInspector::createDockWidgets() m_dockWidgets << m_objectTreeDock << m_frameRateDock << m_propertyWatcherDock << m_inspectorOutputDock; + m_context = new Internal::InspectorContext(m_objectTreeDock); + m_propWatcherContext = new Internal::InspectorContext(m_propertyWatcherDock); + + Core::ICore *core = Core::ICore::instance(); + core->addContextObject(m_propWatcherContext); + core->addContextObject(m_context); + + m_expressionWidget->createCommands(m_context); + + connect(m_objectTreeWidget, SIGNAL(contextHelpIdChanged(QString)), m_context, + SLOT(setContextHelpId(QString))); + connect(m_watchTableView, SIGNAL(contextHelpIdChanged(QString)), m_propWatcherContext, + SLOT(setContextHelpId(QString))); + connect(m_propertiesWidget, SIGNAL(contextHelpIdChanged(QString)), m_propWatcherContext, + SLOT(setContextHelpId(QString))); + connect(m_expressionWidget, SIGNAL(contextHelpIdChanged(QString)), m_propWatcherContext, + SLOT(setContextHelpId(QString))); } void QmlInspector::setSimpleDockWidgetArrangement() @@ -507,4 +523,6 @@ void QmlInspector::treeObjectActivated(const QDeclarativeDebugObjectReference &o } } +} // Qml + #include "qmlinspector.moc" diff --git a/src/plugins/qmlinspector/qmlinspector.h b/src/plugins/qmlinspector/qmlinspector.h index eb23666c59b43da4f50bd78832f3e4d9a2f68556..3b6270eda347094e35199f62a3f8bf8a08f744ff 100644 --- a/src/plugins/qmlinspector/qmlinspector.h +++ b/src/plugins/qmlinspector/qmlinspector.h @@ -48,24 +48,26 @@ class QDeclarativeDebugConnection; class QDeclarativeDebugEnginesQuery; class QDeclarativeDebugRootContextQuery; class QDeclarativeDebugObjectReference; -class ObjectTree; -class WatchTableModel; -class WatchTableView; -class CanvasFrameRate; QT_END_NAMESPACE -class ObjectPropertiesView; -class ExpressionQueryWidget; + namespace Core { class IContext; } namespace Qml { - class EngineSpinBox; namespace Internal { + class EngineSpinBox; class InspectorContext; + class ObjectTree; + class ObjectPropertiesView; + class WatchTableModel; + class WatchTableView; + class CanvasFrameRate; + class ExpressionQueryWidget; + class EngineSpinBox; } class QMLINSPECTOR_EXPORT QmlInspector : public QObject @@ -104,14 +106,14 @@ private: QDeclarativeDebugEnginesQuery *m_engineQuery; QDeclarativeDebugRootContextQuery *m_contextQuery; - ObjectTree *m_objectTreeWidget; - ObjectPropertiesView *m_propertiesWidget; - WatchTableModel *m_watchTableModel; - WatchTableView *m_watchTableView; - CanvasFrameRate *m_frameRateWidget; - ExpressionQueryWidget *m_expressionWidget; + Internal::ObjectTree *m_objectTreeWidget; + Internal::ObjectPropertiesView *m_propertiesWidget; + Internal::WatchTableModel *m_watchTableModel; + Internal::WatchTableView *m_watchTableView; + Internal::CanvasFrameRate *m_frameRateWidget; + Internal::ExpressionQueryWidget *m_expressionWidget; - EngineSpinBox *m_engineSpinBox; + Internal::EngineSpinBox *m_engineSpinBox; QDockWidget *m_objectTreeDock; QDockWidget *m_frameRateDock; @@ -120,6 +122,7 @@ private: QList<QDockWidget*> m_dockWidgets; Internal::InspectorContext *m_context; + Internal::InspectorContext *m_propWatcherContext; }; diff --git a/src/plugins/qmlinspector/qmlinspectorplugin.cpp b/src/plugins/qmlinspector/qmlinspectorplugin.cpp index a80fa499b0732aaa1290da924906b8b442f0a6bd..02bab91ae6dd948a6cbed498ec1350624f4a406a 100644 --- a/src/plugins/qmlinspector/qmlinspectorplugin.cpp +++ b/src/plugins/qmlinspector/qmlinspectorplugin.cpp @@ -97,19 +97,18 @@ bool QmlInspectorPlugin::initialize(const QStringList &arguments, QString *error { Q_UNUSED(arguments); Q_UNUSED(errorString); - + Core::ICore *core = Core::ICore::instance(); connect(Core::ModeManager::instance(), SIGNAL(currentModeChanged(Core::IMode*)), SLOT(prepareDebugger(Core::IMode*))); ExtensionSystem::PluginManager *pluginManager = ExtensionSystem::PluginManager::instance(); Debugger::DebuggerUISwitcher *uiSwitcher = pluginManager->getObject<Debugger::DebuggerUISwitcher>(); + uiSwitcher->addLanguage(Qml::Constants::LANG_QML, + QList<int>() << core->uniqueIDManager()->uniqueIdentifier(Constants::C_INSPECTOR)); m_inspector = new QmlInspector; - addObject(m_inspector); - Core::ICore::instance()->addContextObject(m_inspector->context()); - uiSwitcher->addLanguage(Qml::Constants::LANG_QML, m_inspector->context()->context()); m_inspector->createDockWidgets(); - + addObject(m_inspector); connect(m_connectionTimer, SIGNAL(timeout()), SLOT(pollInspector()));