aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmlprofiler/qml
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@digia.com>2014-09-29 16:24:34 +0200
committerUlf Hermann <ulf.hermann@digia.com>2014-10-02 11:27:28 +0200
commit95a13d57c824163009b95489ba30c00b4cccedf9 (patch)
tree9bd19af08385ddd7bbc924ac3df3430e48e4869d /src/plugins/qmlprofiler/qml
parent7dfbb1b1995bd2870cc80beab5724bd39dfe3be4 (diff)
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>
Diffstat (limited to 'src/plugins/qmlprofiler/qml')
-rw-r--r--src/plugins/qmlprofiler/qml/MainView.qml7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/qmlprofiler/qml/MainView.qml b/src/plugins/qmlprofiler/qml/MainView.qml
index 6ee8554ab29..50231b9d58b 100644
--- a/src/plugins/qmlprofiler/qml/MainView.qml
+++ b/src/plugins/qmlprofiler/qml/MainView.qml
@@ -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