QmlInspector: Fetch objects for location

Since the object tree is fetched lazily, we might have
objects whose debugIds are not known. In such cases,
objects can be fetched by passing the location info.

Change-Id: I2001460cc14401e011efef9be9194c9f7868d617
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Aurindam Jana
2012-05-10 17:06:29 +02:00
parent 38905e523e
commit b9bc68c370
9 changed files with 121 additions and 14 deletions

View File

@@ -965,12 +965,12 @@ protected:
void QmlJSTextEditorWidget::setSelectedElements()
{
if (!receivers(SIGNAL(selectedElementsChanged(QList<int>,QString))))
if (!receivers(SIGNAL(selectedElementsChanged(QList<QmlJS::AST::UiObjectMember*>,QString))))
return;
QTextCursor tc = textCursor();
QString wordAtCursor;
QList<int> offsets;
QList<UiObjectMember *> offsets;
unsigned startPos;
unsigned endPos;
@@ -992,7 +992,7 @@ void QmlJSTextEditorWidget::setSelectedElements()
startPos, endPos);
if (!members.isEmpty()) {
foreach(UiObjectMember *m, members) {
offsets << m->firstSourceLocation().begin();
offsets << m;
}
}
}