From 7e84e7570fb5087d495760ddf4b1950921e17fb8 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Mon, 19 Feb 2018 21:02:33 +0100 Subject: [PATCH] WIP: Cleanup ContainerManager --- cura/Settings/ContainerManager.py | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/cura/Settings/ContainerManager.py b/cura/Settings/ContainerManager.py index d16bdca8a7..af4924b8b3 100644 --- a/cura/Settings/ContainerManager.py +++ b/cura/Settings/ContainerManager.py @@ -706,34 +706,6 @@ class ContainerManager(QObject): quality_changes.addMetaDataEntry("setting_version", CuraApplication.SettingVersion) return quality_changes - - ## Import profiles from a list of file_urls. - # Each QUrl item must end with .curaprofile, or it will not be imported. - # - # \param QVariant, essentially a list with QUrl objects. - # \return Dict with keys status, text - @pyqtSlot("QVariantList", result="QVariantMap") - def importProfiles(self, file_urls): - status = "ok" - results = {"ok": [], "error": []} - for file_url in file_urls: - if not file_url.isValid(): - continue - path = file_url.toLocalFile() - if not path: - continue - if not path.endswith(".curaprofile"): - continue - - single_result = self._container_registry.importProfile(path) - if single_result["status"] == "error": - status = "error" - results[single_result["status"]].append(single_result["message"]) - - return { - "status": status, - "message": "\n".join(results["ok"] + results["error"])} - ## Import single profile, file_url does not have to end with curaprofile @pyqtSlot(QUrl, result="QVariantMap") def importProfile(self, file_url):