QmlDesigner: Fix injection of parameters warning

* Fix a warning about injection of parameters into signal handlers being
  deprecated
* Fix comparison operator

Change-Id: I33d0fe21f39feea69bcca82a57036594d28b039a
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Henning Gruendl
2021-08-17 11:24:55 +02:00
committed by Henning Gründl
parent 274b8011ab
commit 3c0b75f2ef
2 changed files with 3 additions and 3 deletions

View File

@@ -81,7 +81,7 @@ Item {
anchors.fill: parent anchors.fill: parent
onShowContextMenu: delegateRoot.showContextMenu() onShowContextMenu: delegateRoot.showContextMenu()
onPressed: { onPressed: (mouse)=> {
if (mouse.button === Qt.LeftButton) if (mouse.button === Qt.LeftButton)
rootView.startDragAndDrop(itemLibraryEntry, mapToGlobal(mouse.x, mouse.y)) rootView.startDragAndDrop(itemLibraryEntry, mapToGlobal(mouse.x, mouse.y))
} }

View File

@@ -111,7 +111,7 @@ Item {
id: mouseArea id: mouseArea
anchors.fill: parent anchors.fill: parent
hoverEnabled: true hoverEnabled: true
onClicked: index == 0 ? rootView.handleAddModule() onClicked: index === 0 ? rootView.handleAddModule()
: rootView.handleAddAsset() : rootView.handleAddAsset()
tooltip: modelData.addToolTip tooltip: modelData.addToolTip
} }