qmljsinspector: remove some dependencies on debugger internals

This commit is contained in:
hjk
2010-12-03 11:54:41 +01:00
parent 54ccfe99a8
commit 4c5f78de18
2 changed files with 11 additions and 17 deletions

View File

@@ -43,11 +43,8 @@
#include <qmljseditor/qmljseditorconstants.h> #include <qmljseditor/qmljseditorconstants.h>
#include <qmljseditor/qmljseditor.h> #include <qmljseditor/qmljseditor.h>
#include <debugger/debuggerconstants.h> #include <debugger/debuggerconstants.h>
#include <debugger/debuggerengine.h>
#include <debugger/debuggermainwindow.h> #include <debugger/debuggermainwindow.h>
#include <debugger/debuggerplugin.h> #include <debugger/debuggerplugin.h>
#include <debugger/debuggerrunner.h>
#include <debugger/qml/qmlengine.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
#include <utils/styledbar.h> #include <utils/styledbar.h>
@@ -105,7 +102,6 @@
using namespace QmlJS; using namespace QmlJS;
using namespace QmlJS::AST; using namespace QmlJS::AST;
using namespace QmlJSInspector::Internal; using namespace QmlJSInspector::Internal;
using namespace Debugger::Internal;
enum { enum {
MaxConnectionAttempts = 50, MaxConnectionAttempts = 50,
@@ -159,21 +155,23 @@ void InspectorUi::restoreSettings()
m_settings->restoreSettings(Core::ICore::instance()->settings()); m_settings->restoreSettings(Core::ICore::instance()->settings());
} }
void InspectorUi::setDebuggerEngine(Debugger::QmlEngine *qmlEngine) void InspectorUi::setDebuggerEngine(QObject *qmlEngine)
{ {
if (m_qmlEngine && !qmlEngine) { if (m_qmlEngine && !qmlEngine) {
disconnect(m_qmlEngine, SIGNAL(tooltipRequested(QPoint,TextEditor::ITextEditor*,int)), disconnect(m_qmlEngine,
this, SLOT(showDebuggerTooltip(QPoint,TextEditor::ITextEditor*,int))); SIGNAL(tooltipRequested(QPoint,TextEditor::ITextEditor*,int)),
this, SLOT(showDebuggerTooltip(QPoint,TextEditor::ITextEditor*,int)));
} }
m_qmlEngine = qmlEngine; m_qmlEngine = qmlEngine;
if (m_qmlEngine) { if (m_qmlEngine) {
connect(m_qmlEngine, SIGNAL(tooltipRequested(QPoint,TextEditor::ITextEditor*,int)), connect(m_qmlEngine,
this, SLOT(showDebuggerTooltip(QPoint,TextEditor::ITextEditor*,int))); SIGNAL(tooltipRequested(QPoint,TextEditor::ITextEditor*,int)),
this, SLOT(showDebuggerTooltip(QPoint,TextEditor::ITextEditor*,int)));
} }
} }
Debugger::QmlEngine *InspectorUi::debuggerEngine() const QObject *InspectorUi::debuggerEngine() const
{ {
return m_qmlEngine; return m_qmlEngine;
} }

View File

@@ -60,10 +60,6 @@ namespace QmlJS {
class ModelManagerInterface; class ModelManagerInterface;
} }
namespace Debugger {
class QmlEngine;
}
namespace QmlJSInspector { namespace QmlJSInspector {
namespace Internal { namespace Internal {
@@ -105,8 +101,8 @@ public:
bool isConnected() const; bool isConnected() const;
void connected(ClientProxy *clientProxy); void connected(ClientProxy *clientProxy);
void disconnected(); void disconnected();
void setDebuggerEngine(Debugger::QmlEngine *qmlEngine); void setDebuggerEngine(QObject *qmlEngine);
Debugger::QmlEngine *debuggerEngine() const; QObject *debuggerEngine() const;
signals: signals:
void statusMessage(const QString &text); void statusMessage(const QString &text);
@@ -157,7 +153,7 @@ private:
InspectorSettings *m_settings; InspectorSettings *m_settings;
ClientProxy *m_clientProxy; ClientProxy *m_clientProxy;
Debugger::QmlEngine *m_qmlEngine; QObject *m_qmlEngine;
QDeclarativeDebugExpressionQuery *m_debugQuery; QDeclarativeDebugExpressionQuery *m_debugQuery;
int m_lastSelectedDebugId; int m_lastSelectedDebugId;