QmlProfiler: propagate selections from trace to event view by typeId

This is faster and more accurate than propagating by source location.

Change-Id: I6aed3b1591380b49dd7c56a66bdc35912570e347
Task-number: QTCREATORBUG-12932
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Ulf Hermann
2014-09-29 16:24:34 +02:00
parent 7dfbb1b199
commit 95a13d57c8
9 changed files with 23 additions and 9 deletions

View File

@@ -296,9 +296,12 @@ void QmlProfilerTraceView::selectBySourceLocation(const QString &filename, int l
void QmlProfilerTraceView::updateCursorPosition()
{
QQuickItem *rootObject = d->m_mainView->rootObject();
emit gotoSourceLocation(rootObject->property("fileName").toString(),
rootObject->property("lineNumber").toInt(),
rootObject->property("columnNumber").toInt());
QString file = rootObject->property("fileName").toString();
if (!file.isEmpty())
emit gotoSourceLocation(file, rootObject->property("lineNumber").toInt(),
rootObject->property("columnNumber").toInt());
emit typeSelected(rootObject->property("typeId").toInt());
}
////////////////////////////////////////////////////////