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

@@ -45,6 +45,7 @@ Rectangle {
property string fileName: ""
property int lineNumber: -1
property int columnNumber: 0
property int typeId: -1
property bool selectionRangeMode: false
@@ -96,7 +97,6 @@ Rectangle {
root.fileName = file;
root.lineNumber = line;
root.columnNumber = column;
root.updateCursorPosition();
}
}
@@ -374,6 +374,9 @@ Rectangle {
view.selectedItem);
gotoSourceLocation(eventLocation.file, eventLocation.line,
eventLocation.column);
root.typeId = qmlProfilerModelProxy.typeId(view.selectedModel,
view.selectedItem);
root.updateCursorPosition();
lockItemSelection = false;
}
} else {
@@ -385,6 +388,8 @@ Rectangle {
var location = qmlProfilerModelProxy.location(modelIndex, pressedItem);
if (location.hasOwnProperty("file")) // not empty
root.gotoSourceLocation(location.file, location.line, location.column);
root.typeId = qmlProfilerModelProxy.typeId(modelIndex, pressedItem);
root.updateCursorPosition();
}
// hack to pass mouse events to the other mousearea if enabled