Skip to content
Snippets Groups Projects
Commit f31d299d authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Observe the QML/JS model manager.

parent 18109b9c
No related merge requests found
......@@ -30,6 +30,10 @@
#include "qmljsinspector.h"
#include "qmljsclientproxy.h"
#include "qmljsinspectorcontext.h"
#include "qmljsdelta.h"
#include <qmljs/qmljsmodelmanagerinterface.h>
#include <qmljs/qmljsdocument.h>
#include <debugger/debuggerrunner.h>
#include <debugger/debuggerconstants.h>
......@@ -96,6 +100,7 @@
#include <QtNetwork/QHostAddress>
using namespace QmlJS;
using namespace QmlJS::AST;
using namespace QmlJSInspector::Internal;
using namespace Debugger::Internal;
......@@ -604,3 +609,13 @@ bool Inspector::addQuotesForData(const QVariant &value) const
return false;
}
void Inspector::documentUpdated(QmlJS::Document::Ptr doc)
{
Core::ICore *core = Core::ICore::instance();
const int dbgcontext = core->uniqueIDManager()->uniqueIdentifier(Debugger::Constants::C_DEBUGMODE);
if (! core->hasContext(dbgcontext))
return;
qDebug() << "TODO: compute the delta changes for:" << doc->fileName();
}
......@@ -114,6 +114,8 @@ private slots:
void disconnectWidgets();
void disconnected();
void documentUpdated(QmlJS::Document::Ptr doc);
private:
Debugger::DebuggerRunControl *createDebuggerRunControl(ProjectExplorer::RunConfiguration *runConfig,
const QString &executableFile = QString(),
......
......@@ -174,6 +174,12 @@ void InspectorPlugin::extensionsInitialized()
configBarLayout->addStretch();
uiSwitcher->setToolbar(LANG_QML, configBar);
if (QmlJS::ModelManagerInterface *m = InspectorPlugin::instance()->modelManager()) {
connect(m, SIGNAL(documentUpdated(QmlJS::Document::Ptr)),
_inspector, SLOT(documentUpdated(QmlJS::Document::Ptr)));
}
}
void InspectorPlugin::activateDebuggerForProject(ProjectExplorer::Project *project, const QString &runMode)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment