QmlProfiler: rename "eventId" fields to "typeId" and "selectionId"

The convention is now that selections are the rows in the expanded
timeline, "types" are the types in the QmlProfilerDataModel, and
events are the single boxes in the timeline. Thus, the event view
shows only types and for consistency the V8 view does so, too.

Having eventId as synonym for "type index" and "event index" as
actual index into the list of events is confusing.

Change-Id: I6b7c4c3f1ab0a8b71c511de52ab296a2e91cf5f0
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Ulf Hermann
2014-08-29 16:32:42 +02:00
parent 3af3878ace
commit 38f4d6a5f2
23 changed files with 160 additions and 164 deletions

View File

@@ -153,19 +153,19 @@ Rectangle {
rangeDetails.isBindingLoop = false;
}
function selectById(modelIndex, eventId)
function selectBySelectionId(modelIndex, selectionId)
{
if (eventId === -1 || (modelIndex === view.selectedModel &&
eventId === qmlProfilerModelProxy.eventId(modelIndex, view.selectedItem)))
if (selectionId === -1 || (modelIndex === view.selectedModel &&
selectionId === qmlProfilerModelProxy.selectionId(modelIndex, view.selectedItem)))
return;
// this is a slot responding to events from the other pane
// which tracks only events from the basic model
if (!lockItemSelection) {
lockItemSelection = true;
var itemIndex = view.nextItemFromId(modelIndex, eventId);
var itemIndex = view.nextItemFromSelectionId(modelIndex, selectionId);
// select an item, lock to it, and recenter if necessary
view.selectFromId(modelIndex, itemIndex); // triggers recentering
view.selectFromEventIndex(modelIndex, itemIndex); // triggers recentering
if (itemIndex !== -1)
view.selectionLocked = true;
lockItemSelection = false;