Debugger: Change in response for message "destroyObject".

Response for "destroyObject" now has the debugId of the
destroyed object. This is used to fetch the parent object rather
than querying the engine context.

Change-Id: I2e5b7650cbe847117cce6952206dd479ee696f0e
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
This commit is contained in:
Simjees Abraham
2012-05-25 09:33:02 +02:00
committed by Aurindam Jana
parent 30a6beaec0
commit bd5fe5243b
6 changed files with 32 additions and 8 deletions

View File

@@ -254,6 +254,8 @@ QHash<int,QString> QmlInspectorAgent::rootObjectIds() const
QHash<int,QString> rIds;
foreach (const QByteArray &in, m_debugIdToIname) {
const WatchData *data = m_debuggerEngine->watchHandler()->findData(in);
if (!data)
continue;
int debugId = data->id;
QString className = data->type;
rIds.insert(debugId, className);
@@ -467,6 +469,22 @@ void QmlInspectorAgent::reloadEngines()
m_engineQueryId = m_engineClient->queryAvailableEngines();
}
int QmlInspectorAgent::parentIdForObject(int objectDebugId)
{
int pid = -1;
if (m_debugIdToIname.contains(objectDebugId)) {
QByteArray iname = m_debugIdToIname.value(objectDebugId);
if (iname.count('.') > 1) {
int offset = iname.lastIndexOf('.');
QTC_ASSERT(offset > 0, return pid);
iname = iname.left(offset);
pid = m_debugIdToIname.key(iname);
}
}
return pid;
}
void QmlInspectorAgent::queryEngineContext()
{
if (debug)