From 77d4708e22ad0543d599d7ffe76460f55fcd99ff Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Mon, 23 May 2016 11:35:44 +0200 Subject: [PATCH] Debugger: Restore expression evaluation through QML inspector You can now interact with QML objects selected with the "select" tool again, when unpausedEvaluate is off. Change-Id: If6b4a55193a8949b2e3048fe78443c5df6710885 Task-number: QTCREATORBUG-16300 Reviewed-by: Jonathan Liu Reviewed-by: hjk --- src/plugins/debugger/qml/qmlengine.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/plugins/debugger/qml/qmlengine.cpp b/src/plugins/debugger/qml/qmlengine.cpp index 67f6855..370940c 100644 --- a/src/plugins/debugger/qml/qmlengine.cpp +++ b/src/plugins/debugger/qml/qmlengine.cpp @@ -1125,8 +1125,15 @@ void QmlEngine::executeDebuggerCommand(const QString &command, DebuggerLanguages } else if (d->unpausedEvaluate) { d->evaluate(command, CB(d->handleExecuteDebuggerCommand)); } else { - d->engine->showMessage(_("The application has to be stopped in a breakpoint in order to " - "evaluate expressions").arg(command), ConsoleOutput); + QModelIndex currentIndex = inspectorView()->currentIndex(); + quint32 queryId = d->inspectorAgent.queryExpressionResult( + watchHandler()->watchItem(currentIndex)->id, command); + if (queryId) { + d->queryIds.append(queryId); + } else { + d->engine->showMessage(_("The application has to be stopped in a breakpoint in order to" + " evaluate expressions"), ConsoleOutput); + } } } -- 2.8.0