diff --git a/src/plugins/qmljsinspector/qmljsinspectorplugin.cpp b/src/plugins/qmljsinspector/qmljsinspectorplugin.cpp index 8f8e53cff200f90ce95fed01dfd2c690412aa869..fa1b980254bf099810934f83a1b09980842a25d5 100644 --- a/src/plugins/qmljsinspector/qmljsinspectorplugin.cpp +++ b/src/plugins/qmljsinspector/qmljsinspectorplugin.cpp @@ -29,6 +29,7 @@ #include "qmljsinspectorconstants.h" #include "qmljsinspectorplugin.h" +#include "qmljsinspector.h" #include "qmljsclientproxy.h" #include <debugger/debuggeruiswitcher.h> @@ -84,7 +85,8 @@ InspectorPlugin::InspectorPlugin() Q_ASSERT(! g_instance); g_instance = this; - (void) new ClientProxy(this); + _clientProxy = new ClientProxy(this); + _inspector = new Inspector(this); } InspectorPlugin::~InspectorPlugin() @@ -92,6 +94,21 @@ InspectorPlugin::~InspectorPlugin() qDebug() << Q_FUNC_INFO; } +ClientProxy *InspectorPlugin::clientProxy() const +{ + return _clientProxy; +} + +InspectorPlugin *InspectorPlugin::instance() +{ + return g_instance; +} + +Inspector *InspectorPlugin::inspector() const +{ + return _inspector; +} + void InspectorPlugin::aboutToShutdown() { qDebug() << Q_FUNC_INFO; @@ -111,10 +128,13 @@ bool InspectorPlugin::initialize(const QStringList &arguments, QString *errorStr Debugger::DebuggerUISwitcher *uiSwitcher = pluginManager->getObject<Debugger::DebuggerUISwitcher>(); uiSwitcher->addLanguage(LANG_QML, Core::Context(C_INSPECTOR)); + +#ifdef __GNUC__ +# warning set up the QML/JS Inspector UI +#endif + #if 0 - m_inspector = new QmlInspector; - m_inspector->createDockWidgets(); - addObject(m_inspector); + _inspector->createDockWidgets(); #endif return true; @@ -159,6 +179,10 @@ void InspectorPlugin::activateDebuggerForProject(ProjectExplorer::Project *proje qDebug() << Q_FUNC_INFO; if (runMode == QLatin1String(ProjectExplorer::Constants::DEBUGMODE)) { +#ifdef __GNUC__ +# warning start a QML/JS debugging session using the information stored in the current project +#endif + #if 0 // FIXME we probably want to activate the debugger for other projects than QmlProjects, // if they contain Qml files. Some kind of options should exist for this behavior. diff --git a/src/plugins/qmljsinspector/qmljsinspectorplugin.h b/src/plugins/qmljsinspector/qmljsinspectorplugin.h index bff6f3da781fea61146e8fb2d1b9a592686d6d8c..53631bf37d937bffb511b1b33846c07470a74639 100644 --- a/src/plugins/qmljsinspector/qmljsinspectorplugin.h +++ b/src/plugins/qmljsinspector/qmljsinspectorplugin.h @@ -48,6 +48,7 @@ namespace ProjectExplorer { namespace QmlJSInspector { namespace Internal { +class ClientProxy; class Inspector; class InspectorPlugin : public ExtensionSystem::IPlugin @@ -60,6 +61,9 @@ public: static InspectorPlugin *instance(); + ClientProxy *clientProxy() const; + Inspector *inspector() const; + // ExtensionSystem::IPlugin interface virtual bool initialize(const QStringList &arguments, QString *errorString); virtual void extensionsInitialized(); @@ -73,6 +77,7 @@ private slots: void prepareDebugger(Core::IMode *mode); private: + ClientProxy *_clientProxy; Inspector *_inspector; };