forked from qt-creator/qt-creator
Observe the QML/JS model manager.
This commit is contained in:
@@ -30,6 +30,10 @@
|
|||||||
#include "qmljsinspector.h"
|
#include "qmljsinspector.h"
|
||||||
#include "qmljsclientproxy.h"
|
#include "qmljsclientproxy.h"
|
||||||
#include "qmljsinspectorcontext.h"
|
#include "qmljsinspectorcontext.h"
|
||||||
|
#include "qmljsdelta.h"
|
||||||
|
|
||||||
|
#include <qmljs/qmljsmodelmanagerinterface.h>
|
||||||
|
#include <qmljs/qmljsdocument.h>
|
||||||
|
|
||||||
#include <debugger/debuggerrunner.h>
|
#include <debugger/debuggerrunner.h>
|
||||||
#include <debugger/debuggerconstants.h>
|
#include <debugger/debuggerconstants.h>
|
||||||
@@ -96,6 +100,7 @@
|
|||||||
|
|
||||||
#include <QtNetwork/QHostAddress>
|
#include <QtNetwork/QHostAddress>
|
||||||
|
|
||||||
|
using namespace QmlJS;
|
||||||
using namespace QmlJS::AST;
|
using namespace QmlJS::AST;
|
||||||
using namespace QmlJSInspector::Internal;
|
using namespace QmlJSInspector::Internal;
|
||||||
using namespace Debugger::Internal;
|
using namespace Debugger::Internal;
|
||||||
@@ -604,3 +609,13 @@ bool Inspector::addQuotesForData(const QVariant &value) const
|
|||||||
return false;
|
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 disconnectWidgets();
|
||||||
void disconnected();
|
void disconnected();
|
||||||
|
|
||||||
|
void documentUpdated(QmlJS::Document::Ptr doc);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Debugger::DebuggerRunControl *createDebuggerRunControl(ProjectExplorer::RunConfiguration *runConfig,
|
Debugger::DebuggerRunControl *createDebuggerRunControl(ProjectExplorer::RunConfiguration *runConfig,
|
||||||
const QString &executableFile = QString(),
|
const QString &executableFile = QString(),
|
||||||
|
|||||||
@@ -174,6 +174,12 @@ void InspectorPlugin::extensionsInitialized()
|
|||||||
configBarLayout->addStretch();
|
configBarLayout->addStretch();
|
||||||
|
|
||||||
uiSwitcher->setToolbar(LANG_QML, configBar);
|
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)
|
void InspectorPlugin::activateDebuggerForProject(ProjectExplorer::Project *project, const QString &runMode)
|
||||||
|
|||||||
Reference in New Issue
Block a user