Reenabled more code.

This commit is contained in:
Roberto Raggi
2010-06-29 12:46:55 +02:00
parent 3f692a6ba3
commit 914a046ed8
2 changed files with 33 additions and 4 deletions

View File

@@ -29,6 +29,7 @@
#include "qmljsinspectorconstants.h" #include "qmljsinspectorconstants.h"
#include "qmljsinspectorplugin.h" #include "qmljsinspectorplugin.h"
#include "qmljsinspector.h"
#include "qmljsclientproxy.h" #include "qmljsclientproxy.h"
#include <debugger/debuggeruiswitcher.h> #include <debugger/debuggeruiswitcher.h>
@@ -84,7 +85,8 @@ InspectorPlugin::InspectorPlugin()
Q_ASSERT(! g_instance); Q_ASSERT(! g_instance);
g_instance = this; g_instance = this;
(void) new ClientProxy(this); _clientProxy = new ClientProxy(this);
_inspector = new Inspector(this);
} }
InspectorPlugin::~InspectorPlugin() InspectorPlugin::~InspectorPlugin()
@@ -92,6 +94,21 @@ InspectorPlugin::~InspectorPlugin()
qDebug() << Q_FUNC_INFO; 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() void InspectorPlugin::aboutToShutdown()
{ {
qDebug() << Q_FUNC_INFO; qDebug() << Q_FUNC_INFO;
@@ -111,10 +128,13 @@ bool InspectorPlugin::initialize(const QStringList &arguments, QString *errorStr
Debugger::DebuggerUISwitcher *uiSwitcher = pluginManager->getObject<Debugger::DebuggerUISwitcher>(); Debugger::DebuggerUISwitcher *uiSwitcher = pluginManager->getObject<Debugger::DebuggerUISwitcher>();
uiSwitcher->addLanguage(LANG_QML, Core::Context(C_INSPECTOR)); uiSwitcher->addLanguage(LANG_QML, Core::Context(C_INSPECTOR));
#ifdef __GNUC__
# warning set up the QML/JS Inspector UI
#endif
#if 0 #if 0
m_inspector = new QmlInspector; _inspector->createDockWidgets();
m_inspector->createDockWidgets();
addObject(m_inspector);
#endif #endif
return true; return true;
@@ -159,6 +179,10 @@ void InspectorPlugin::activateDebuggerForProject(ProjectExplorer::Project *proje
qDebug() << Q_FUNC_INFO; qDebug() << Q_FUNC_INFO;
if (runMode == QLatin1String(ProjectExplorer::Constants::DEBUGMODE)) { 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 #if 0
// FIXME we probably want to activate the debugger for other projects than QmlProjects, // 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. // if they contain Qml files. Some kind of options should exist for this behavior.

View File

@@ -48,6 +48,7 @@ namespace ProjectExplorer {
namespace QmlJSInspector { namespace QmlJSInspector {
namespace Internal { namespace Internal {
class ClientProxy;
class Inspector; class Inspector;
class InspectorPlugin : public ExtensionSystem::IPlugin class InspectorPlugin : public ExtensionSystem::IPlugin
@@ -60,6 +61,9 @@ public:
static InspectorPlugin *instance(); static InspectorPlugin *instance();
ClientProxy *clientProxy() const;
Inspector *inspector() const;
// ExtensionSystem::IPlugin interface // ExtensionSystem::IPlugin interface
virtual bool initialize(const QStringList &arguments, QString *errorString); virtual bool initialize(const QStringList &arguments, QString *errorString);
virtual void extensionsInitialized(); virtual void extensionsInitialized();
@@ -73,6 +77,7 @@ private slots:
void prepareDebugger(Core::IMode *mode); void prepareDebugger(Core::IMode *mode);
private: private:
ClientProxy *_clientProxy;
Inspector *_inspector; Inspector *_inspector;
}; };