QmlDebugger: hiding "this" from debugger when empty

Reviewed-by: Kai Koehne
This commit is contained in:
Christiaan Janssen
2011-03-09 16:06:19 +01:00
parent 6fd089754b
commit ca3eedb8e5

View File

@@ -275,7 +275,8 @@ QList<JSAgentWatchData> JSDebuggerAgentPrivate::getLocals(QScriptContext *ctx)
QScriptValue thisObject = ctx->thisObject();
locals = expandObject(activationObject);
if (thisObject.isObject()
&& thisObject.objectId() != engine()->globalObject().objectId())
&& thisObject.objectId() != engine()->globalObject().objectId()
&& QScriptValueIterator(thisObject).hasNext())
locals.prepend(fromScriptValue("this", thisObject));
recordKnownObjects(locals);
knownObjectIds << activationObject.objectId();