From 77d1bebbdb71db832e72279107a52d4acc6bb77e Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 25 Oct 2021 15:35:28 +0200 Subject: [PATCH] Put PackageList in Marketplace namespace This way it's not available to the rest of Cura, especially since PackageList is not such an uncommon name. It could give name collisions. Moreover, the rest of Cura doesn't need to have a list of packages from the Marketplace, so it's better separation. Contributes to issue CURA-8556. --- plugins/Marketplace/Marketplace.py | 2 +- plugins/Marketplace/resources/qml/Plugins.qml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/Marketplace/Marketplace.py b/plugins/Marketplace/Marketplace.py index 0dd5b29a5a..8c9f8097c8 100644 --- a/plugins/Marketplace/Marketplace.py +++ b/plugins/Marketplace/Marketplace.py @@ -31,7 +31,7 @@ class Marketplace(Extension): super().__init__() self._window: Optional["QObject"] = None # If the window has been loaded yet, it'll be cached in here. - qmlRegisterType(PackageList, "Cura", 1, 7, "PackageList") + qmlRegisterType(PackageList, "Marketplace", 1, 0, "PackageList") @pyqtSlot() def show(self) -> None: diff --git a/plugins/Marketplace/resources/qml/Plugins.qml b/plugins/Marketplace/resources/qml/Plugins.qml index 4fee56f2fb..6e78e9eff1 100644 --- a/plugins/Marketplace/resources/qml/Plugins.qml +++ b/plugins/Marketplace/resources/qml/Plugins.qml @@ -3,7 +3,7 @@ import QtQuick 2.15 import QtQuick.Controls 2.15 -import Cura 1.7 as Cura +import Marketplace 1.0 as Marketplace import UM 1.4 as UM ScrollView @@ -18,7 +18,7 @@ ScrollView Repeater { - model: Cura.PackageList + model: Marketplace.PackageList { id: pluginList }