mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 18:27:51 -06:00
Move getCuraPackageManager to Uranium and initialize package manager there
This commit is contained in:
parent
0f4f55cf6b
commit
945429195e
3 changed files with 2 additions and 11 deletions
|
@ -247,11 +247,6 @@ class CuraApplication(QtApplication):
|
|||
tray_icon_name = "cura-icon-32.png",
|
||||
**kwargs)
|
||||
|
||||
# Initialize the package manager to remove and install scheduled packages.
|
||||
from cura.CuraPackageManager import CuraPackageManager
|
||||
self._cura_package_manager = CuraPackageManager(self)
|
||||
self._cura_package_manager.initialize()
|
||||
|
||||
self.initialize()
|
||||
|
||||
# FOR TESTING ONLY
|
||||
|
@ -823,10 +818,6 @@ class CuraApplication(QtApplication):
|
|||
self._extruder_manager = ExtruderManager.createExtruderManager()
|
||||
return self._extruder_manager
|
||||
|
||||
@pyqtSlot(result = QObject)
|
||||
def getCuraPackageManager(self, *args):
|
||||
return self._cura_package_manager
|
||||
|
||||
def getVariantManager(self, *args):
|
||||
return self._variant_manager
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ class Toolbox(QObject, Extension):
|
|||
# This is a plugin, so most of the components required are not ready when
|
||||
# this is initialized. Therefore, we wait until the application is ready.
|
||||
def _onAppInitialized(self) -> None:
|
||||
self._package_manager = Application.getInstance().getCuraPackageManager()
|
||||
self._package_manager = Application.getInstance().getPackageManager()
|
||||
|
||||
# Get the API root for the packages API depending on Cura version settings.
|
||||
def _getPackagesApiRoot(self) -> str:
|
||||
|
|
|
@ -330,7 +330,7 @@ UM.MainWindow
|
|||
if (filename.endsWith(".curapackage"))
|
||||
{
|
||||
// Try to install plugin & close.
|
||||
CuraApplication.getCuraPackageManager().installPackageViaDragAndDrop(filename);
|
||||
CuraApplication.getPackageManager().installPackageViaDragAndDrop(filename);
|
||||
packageInstallDialog.text = catalog.i18nc("@label", "This package will be installed after restarting.");
|
||||
packageInstallDialog.icon = StandardIcon.Information;
|
||||
packageInstallDialog.open();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue