Debugger: Add multi-engine support for QML inspector

The engines are listed as virtual root items for their contents. This
way, when we need an engineID we can walk up the tree of watch items and
the last valid one will be the engine.

Fixes: QTCREATORBUG-21486
Change-Id: Ib110457dc65523c1e2b75aa073f6cd399bbc9532
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Ulf Hermann
2018-11-15 17:14:48 +01:00
parent 5170dd0858
commit eac0ab4974
4 changed files with 80 additions and 49 deletions

View File

@@ -1040,7 +1040,9 @@ void QmlEngine::executeDebuggerCommand(const QString &command)
if (d->unpausedEvaluate) {
d->evaluate(command, contextId, CB(d->handleExecuteDebuggerCommand));
} else {
quint32 queryId = d->inspectorAgent.queryExpressionResult(contextId, command);
quint32 queryId = d->inspectorAgent.queryExpressionResult(
contextId, command,
d->inspectorAgent.engineId(watchHandler()->watchItem(currentIndex)));
if (queryId) {
d->queryIds.append(queryId);
} else {