Tracing: Fix a couple of warnings regarding parameter injection

Parameter "XYZ" is not declared. Injection of parameters into signal
handlers is deprecated. Use JavaScript functions with formal parameters
instead.

Change-Id: I3aea1af6bb6559f26dc83b8c20ada11885b715f9
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
This commit is contained in:
Alessandro Portale
2021-07-15 10:31:05 +02:00
parent 361e0f0eb4
commit f787afe732
5 changed files with 14 additions and 10 deletions

View File

@@ -72,7 +72,7 @@ Item {
DropArea {
id: dropArea
onPositionChanged: {
onPositionChanged: (drag) => {
var sourceIndex = drag.source.visualIndex;
if (drag.source.y === 0) {
// special case for first position: Always swap, no matter if upper border touched.
@@ -129,7 +129,7 @@ Item {
labelContainer.selectNextBySelectionId(label.id);
}
}
onSetRowHeight: {
onSetRowHeight: (newHeight) => {
labelsArea.parentModel.setExpandedRowHeight(index + 1, newHeight);
loader.height = labelsArea.parentModel.rowHeight(index + 1);
}

View File

@@ -151,8 +151,12 @@ Rectangle {
zoomer: zoomControl
reverseSelect: shiftPressed
onMoveCategories: content.moveCategories(sourceIndex, targetIndex)
onSelectItem: content.select(modelIndex, eventIndex)
onMoveCategories: (sourceIndex, targetIndex) => {
content.moveCategories(sourceIndex, targetIndex)
}
onSelectItem: (modelIndex, eventIndex) => {
content.select(modelIndex, eventIndex)
}
}
TimeDisplay {
@@ -206,7 +210,7 @@ Rectangle {
onWidthChanged: selectionRange.update();
onPropagateSelection: {
onPropagateSelection: (newModel, newItem) => {
if (lockItemSelection || (newModel === selectedModel && newItem === selectedItem))
return;

View File

@@ -168,10 +168,10 @@ Rectangle {
}
}
onPressed: {
onPressed: (mouse) => {
jumpTo(mouse.x);
}
onPositionChanged: {
onPositionChanged: (mouse) => {
jumpTo(mouse.x);
}
}

View File

@@ -115,14 +115,14 @@ Flickable {
categories.selectItem(index, eventId)
}
onSelectNextBySelectionId: {
onSelectNextBySelectionId: (selectionId) => {
categories.selectItem(index, modelData.nextItemBySelectionId(
selectionId, zoomer.rangeStart,
categories.selectedModel === index ? categories.selectedItem :
-1));
}
onSelectPrevBySelectionId: {
onSelectPrevBySelectionId: (selectionId) => {
categories.selectItem(index, modelData.prevItemBySelectionId(
selectionId, zoomer.rangeStart,
categories.selectedModel === index ? categories.selectedItem :

View File

@@ -44,7 +44,7 @@ Item {
anchors.right: parent.right
height: scaleHeight
onClicked: {
onClicked: (mouse) => {
rulersModel.append({
timestamp: (mouse.x + contentX) * viewTimePerPixel + windowStart
});