Remove unneeded connection

The connection isn't needed to handle a signal. There is an easier shorthand

CURA-8587
This commit is contained in:
Jaime van Kessel 2021-12-06 12:02:14 +01:00
parent 18837a32b8
commit 09710c2d9f

View File

@ -328,12 +328,8 @@ Rectangle
secondaryText: catalog.i18nc("@button", "Disable") secondaryText: catalog.i18nc("@button", "Disable")
busySecondaryText: catalog.i18nc("@button", "disabling...") busySecondaryText: catalog.i18nc("@button", "disabling...")
enabled: !(installManageButton.busy || updateManageButton.busy) enabled: !(installManageButton.busy || updateManageButton.busy)
}
Connections onClicked: {
{
target: enableManageButton
function onClicked(primary_action)
{
if (primary_action) if (primary_action)
{ {
packageData.enablePackageTriggered(packageData.packageId) packageData.enablePackageTriggered(packageData.packageId)
@ -355,11 +351,7 @@ Rectangle
secondaryText: catalog.i18nc("@button", "Uninstall") secondaryText: catalog.i18nc("@button", "Uninstall")
busySecondaryText: catalog.i18nc("@button", "uninstalling...") busySecondaryText: catalog.i18nc("@button", "uninstalling...")
enabled: !(enableManageButton.busy || updateManageButton.busy) enabled: !(enableManageButton.busy || updateManageButton.busy)
} onClicked:
Connections
{
target: installManageButton
function onClicked(primary_action)
{ {
if (primary_action) if (primary_action)
{ {
@ -380,14 +372,7 @@ Rectangle
primaryText: catalog.i18nc("@button", "Update") primaryText: catalog.i18nc("@button", "Update")
busyPrimaryText: catalog.i18nc("@button", "updating...") busyPrimaryText: catalog.i18nc("@button", "updating...")
enabled: !(installManageButton.busy || enableManageButton.busy) enabled: !(installManageButton.busy || enableManageButton.busy)
} onClicked: packageData.updatePackageTriggered(packageData.packageId)
Connections
{
target: updateManageButton
function onClicked(primary_action)
{
packageData.updatePackageTriggered(packageData.packageId)
}
} }
} }
} }