QmlDebugging: Assign Value in Debugger

Call EXEC instead of SET_PROPERTY for assigning a value
in Locals and Expressions. Also check if the id of the
object is valid before calling EXPAND.

Task-number: QTCREATORBUG-7089
Change-Id: I2769e5345cfb7ecf87e36125821f141821556690
Reviewed-by: Christian Stenger <christian.stenger@nokia.com>
This commit is contained in:
Aurindam Jana
2012-03-14 11:58:31 +01:00
parent 02da7db7e1
commit 6e0caec046
6 changed files with 45 additions and 25 deletions

View File

@@ -1153,11 +1153,12 @@ void QmlV8DebuggerClient::synchronizeBreakpoints()
//NOT USED
}
void QmlV8DebuggerClient::assignValueInDebugger(const QByteArray /*expr*/, const quint64 &/*id*/,
const QString &property, const QString &value)
void QmlV8DebuggerClient::assignValueInDebugger(const WatchData * /*data*/,
const QString &expr,
const QVariant &valueV)
{
StackHandler *stackHandler = d->engine->stackHandler();
QString expression = QString(_("%1 = %2;")).arg(property).arg(value);
QString expression = QString(_("%1 = %2;")).arg(expr).arg(valueV.toString());
if (stackHandler->isContentsValid() && stackHandler->currentFrame().isUsable()) {
d->evaluate(expression, false, false, stackHandler->currentIndex());
} else {