From 83c78c4b4db9e9da3a0532fe26898a1da4af4bf3 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 17 Dec 2021 16:41:52 +0100 Subject: [PATCH] Remove canInstallChanged signal It's not needed, this can just be handled with a direct call! CURA-8587 --- plugins/Marketplace/PackageList.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/Marketplace/PackageList.py b/plugins/Marketplace/PackageList.py index e559d6b43e..73393aa9da 100644 --- a/plugins/Marketplace/PackageList.py +++ b/plugins/Marketplace/PackageList.py @@ -46,7 +46,6 @@ class PackageList(ListModel): self._has_more = False self._has_footer = True self._to_install: Dict[str, str] = {} - self.canInstallChanged.connect(self._requestInstall) self._ongoing_requests: Dict[str, Optional[HttpRequestData]] = {"download_package": None} self._scope = JsonDecoratorScope(UltimakerCloudScope(CuraApplication.getInstance())) @@ -135,8 +134,6 @@ class PackageList(ListModel): index = self.find("package", package_id) return self.getItem(index)["package"] - canInstallChanged = pyqtSignal(str, bool) - def _openLicenseDialog(self, package_id: str, license_content: str) -> None: plugin_path = self._plugin_registry.getPluginPath("Marketplace") if plugin_path is None: @@ -236,7 +233,8 @@ class PackageList(ListModel): temp_file.close() self._to_install[package_id] = temp_file.name self._ongoing_requests["download_package"] = None - self.canInstallChanged.emit(package_id, update) + self._requestInstall(package_id, update) + def _downloadError(self, package_id: str, update: bool = False, reply: Optional["QNetworkReply"] = None, error: Optional["QNetworkReply.NetworkError"] = None) -> None: if reply: