Tracing: Fix some more 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: I2d2b4f72b6c6bf532c090956a5286e3d38f867a3
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
This commit is contained in:
Alessandro Portale
2021-07-16 16:07:12 +02:00
parent efb273750b
commit 932d78c3e0
3 changed files with 7 additions and 5 deletions

View File

@@ -150,7 +150,7 @@ ScrollView {
maximumDepth: 128
y: flickable.height > height ? flickable.height - height : 0
onSelectedTypeIdChanged: {
onSelectedTypeIdChanged: (selectedTypeId) => {
if (selectedTypeId !== root.selectedTypeId) {
// Change originates from inside. Send typeSelected().
root.selectedTypeId = selectedTypeId;

View File

@@ -134,7 +134,9 @@ Rectangle {
focus: true
property bool shiftPressed: false;
Keys.onPressed: shiftPressed = (event.key === Qt.Key_Shift);
Keys.onPressed: (event) => {
shiftPressed = (event.key === Qt.Key_Shift);
}
Keys.onReleased: shiftPressed = false;
TimelineLabels {
@@ -385,7 +387,7 @@ Rectangle {
content.propagateSelection(-1, -1);
}
onUpdateNote: {
onUpdateNote: (text) => {
if (timelineModelAggregator.notes && selectedModel != -1 && selectedItem != -1) {
timelineModelAggregator.notes.setText(
timelineModelAggregator.models[selectedModel].modelId,

View File

@@ -106,12 +106,12 @@ Flickable {
height: parent.height
dragOffset: loader.y
onDropped: {
onDropped: (sourceIndex, targetIndex) => {
categories.moveCategories(sourceIndex, targetIndex);
labelsModel.items.move(sourceIndex, targetIndex);
}
onSelectById: {
onSelectById: (eventId) => {
categories.selectItem(index, eventId)
}