diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-12-07 14:24:04 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-12-09 12:51:51 +0000 |
commit | bff7302fc277d18b5bd4ad95d35b9e1bbc2be001 (patch) | |
tree | 8ba4cc517e513b0a519ebdab4b99ba1146960d8c /src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.h | |
parent | 3dd96630a2823ff9723a399c84303f565abce455 (diff) |
V4 Debugger: Add an option to pass additional context for evaluate
Interpret the "context" option as an ID for a QObject whose QML context
is then injected when evaluating the expression. The QObject needs to
be tracked by some other debug service for this to work, e.g. the QML
debugger or the inspector.
Task-number: QTCREATORBUG-17177
Change-Id: I6a9e8b9ae23e8bb67ed1905a2ef73f7c4faeb990
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.h')
-rw-r--r-- | src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.h b/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.h index b28adffae5..00d3e6206a 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.h +++ b/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.h @@ -60,11 +60,12 @@ class JavaScriptJob : public QV4DebugJob { QV4::ExecutionEngine *engine; int frameNr; + int context; const QString &script; bool resultIsException; public: - JavaScriptJob(QV4::ExecutionEngine *engine, int frameNr, const QString &script); + JavaScriptJob(QV4::ExecutionEngine *engine, int frameNr, int context, const QString &script); void run() override; bool hasExeption() const; @@ -135,8 +136,8 @@ class ExpressionEvalJob: public JavaScriptJob QJsonArray collectedRefs; public: - ExpressionEvalJob(QV4::ExecutionEngine *engine, int frameNr, const QString &expression, - QV4DataCollector *collector); + ExpressionEvalJob(QV4::ExecutionEngine *engine, int frameNr, int context, + const QString &expression, QV4DataCollector *collector); void handleResult(QV4::ScopedValue &value) override; const QString &exceptionMessage() const; const QJsonObject &returnValue() const; |