QmlInspector: tooltips in qmldebug mode

Reviewed by: Lasse Holmstedt
This commit is contained in:
Christiaan Janssen
2010-09-08 16:44:42 +02:00
parent 0a33abf094
commit 1c702357a6
9 changed files with 177 additions and 13 deletions

View File

@@ -198,6 +198,29 @@ QDeclarativeDebugObjectReference ClientProxy::objectReferenceForId(int debugId,
return QDeclarativeDebugObjectReference();
}
QDeclarativeDebugObjectReference ClientProxy::objectReferenceForId(const QString &objectId) const
{
if (!objectId.isEmpty() && objectId[0].isLower()) {
const QList<QDeclarativeDebugObjectReference> refs = objectReferences();
foreach (const QDeclarativeDebugObjectReference &ref, refs) {
if (ref.idString() == objectId)
return ref;
}
}
return QDeclarativeDebugObjectReference();
}
QDeclarativeDebugObjectReference ClientProxy::objectReferenceForLocation(const int line, const int column) const
{
const QList<QDeclarativeDebugObjectReference> refs = objectReferences();
foreach (const QDeclarativeDebugObjectReference &ref, refs) {
if (ref.source().lineNumber() == line && ref.source().columnNumber() == column)
return ref;
}
return QDeclarativeDebugObjectReference();
}
QList<QDeclarativeDebugObjectReference> ClientProxy::objectReferences() const
{
QList<QDeclarativeDebugObjectReference> result;
@@ -253,6 +276,13 @@ bool ClientProxy::resetBindingForObject(int objectDebugId, const QString& proper
return m_client->resetBindingForObject(objectDebugId, propertyName);
}
QDeclarativeDebugExpressionQuery *ClientProxy::queryExpressionResult(int objectDebugId, const QString &expr, QObject *parent)
{
if (objectDebugId != -1)
return m_client->queryExpressionResult(objectDebugId,expr,parent);
return 0;
}
void ClientProxy::clearComponentCache()
{
if (isDesignClientConnected())