Commit 4c5f78de authored by hjk's avatar hjk
Browse files

qmljsinspector: remove some dependencies on debugger internals

parent 54ccfe99
......@@ -43,11 +43,8 @@
#include <qmljseditor/qmljseditorconstants.h>
#include <qmljseditor/qmljseditor.h>
#include <debugger/debuggerconstants.h>
#include <debugger/debuggerengine.h>
#include <debugger/debuggermainwindow.h>
#include <debugger/debuggerplugin.h>
#include <debugger/debuggerrunner.h>
#include <debugger/qml/qmlengine.h>
#include <utils/qtcassert.h>
#include <utils/styledbar.h>
......@@ -105,7 +102,6 @@
using namespace QmlJS;
using namespace QmlJS::AST;
using namespace QmlJSInspector::Internal;
using namespace Debugger::Internal;
enum {
MaxConnectionAttempts = 50,
......@@ -159,21 +155,23 @@ void InspectorUi::restoreSettings()
m_settings->restoreSettings(Core::ICore::instance()->settings());
}
void InspectorUi::setDebuggerEngine(Debugger::QmlEngine *qmlEngine)
void InspectorUi::setDebuggerEngine(QObject *qmlEngine)
{
if (m_qmlEngine && !qmlEngine) {
disconnect(m_qmlEngine, SIGNAL(tooltipRequested(QPoint,TextEditor::ITextEditor*,int)),
this, SLOT(showDebuggerTooltip(QPoint,TextEditor::ITextEditor*,int)));
disconnect(m_qmlEngine,
SIGNAL(tooltipRequested(QPoint,TextEditor::ITextEditor*,int)),
this, SLOT(showDebuggerTooltip(QPoint,TextEditor::ITextEditor*,int)));
}
m_qmlEngine = qmlEngine;
if (m_qmlEngine) {
connect(m_qmlEngine, SIGNAL(tooltipRequested(QPoint,TextEditor::ITextEditor*,int)),
this, SLOT(showDebuggerTooltip(QPoint,TextEditor::ITextEditor*,int)));
connect(m_qmlEngine,
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;
}
......
......@@ -60,10 +60,6 @@ namespace QmlJS {
class ModelManagerInterface;
}
namespace Debugger {
class QmlEngine;
}
namespace QmlJSInspector {
namespace Internal {
......@@ -105,8 +101,8 @@ public:
bool isConnected() const;
void connected(ClientProxy *clientProxy);
void disconnected();
void setDebuggerEngine(Debugger::QmlEngine *qmlEngine);
Debugger::QmlEngine *debuggerEngine() const;
void setDebuggerEngine(QObject *qmlEngine);
QObject *debuggerEngine() const;
signals:
void statusMessage(const QString &text);
......@@ -157,7 +153,7 @@ private:
InspectorSettings *m_settings;
ClientProxy *m_clientProxy;
Debugger::QmlEngine *m_qmlEngine;
QObject *m_qmlEngine;
QDeclarativeDebugExpressionQuery *m_debugQuery;
int m_lastSelectedDebugId;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment