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

View File

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

View File

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

View File

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

View File

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