From 09710c2d9f8b51bcc330e2d27a53af925102181a Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 6 Dec 2021 12:02:14 +0100 Subject: [PATCH] Remove unneeded connection The connection isn't needed to handle a signal. There is an easier shorthand CURA-8587 --- .../Marketplace/resources/qml/PackageCard.qml | 23 ++++--------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/plugins/Marketplace/resources/qml/PackageCard.qml b/plugins/Marketplace/resources/qml/PackageCard.qml index e4f56632df..bf0dda217b 100644 --- a/plugins/Marketplace/resources/qml/PackageCard.qml +++ b/plugins/Marketplace/resources/qml/PackageCard.qml @@ -328,12 +328,8 @@ Rectangle secondaryText: catalog.i18nc("@button", "Disable") busySecondaryText: catalog.i18nc("@button", "disabling...") enabled: !(installManageButton.busy || updateManageButton.busy) - } - Connections - { - target: enableManageButton - function onClicked(primary_action) - { + + onClicked: { if (primary_action) { packageData.enablePackageTriggered(packageData.packageId) @@ -355,11 +351,7 @@ Rectangle secondaryText: catalog.i18nc("@button", "Uninstall") busySecondaryText: catalog.i18nc("@button", "uninstalling...") enabled: !(enableManageButton.busy || updateManageButton.busy) - } - Connections - { - target: installManageButton - function onClicked(primary_action) + onClicked: { if (primary_action) { @@ -380,14 +372,7 @@ Rectangle primaryText: catalog.i18nc("@button", "Update") busyPrimaryText: catalog.i18nc("@button", "updating...") enabled: !(installManageButton.busy || enableManageButton.busy) - } - Connections - { - target: updateManageButton - function onClicked(primary_action) - { - packageData.updatePackageTriggered(packageData.packageId) - } + onClicked: packageData.updatePackageTriggered(packageData.packageId) } } }