Make VersionUpgradeManager a singleton

This way we can access the manager from anywhere, without adding a getter to CuraApplication or something.

Contributes to issue CURA-844.
This commit is contained in:
Ghostkeeper 2016-09-21 14:36:25 +02:00
parent 558ffc2c20
commit 9501f9b17c
No known key found for this signature in database
GPG Key ID: 701948C5954A7385

View File

@ -112,7 +112,7 @@ class CuraApplication(QtApplication):
## Initialise the version upgrade manager with Cura's storage paths.
import UM.VersionUpgradeManager #Needs to be here to prevent circular dependencies.
self._version_upgrade_manager = UM.VersionUpgradeManager.VersionUpgradeManager(
UM.VersionUpgradeManager.VersionUpgradeManager.getInstance().setCurrentVersions(
{
("quality", UM.Settings.InstanceContainer.Version): (self.ResourceTypes.QualityInstanceContainer, "application/x-uranium-instancecontainer"),
("machine_stack", UM.Settings.ContainerStack.Version): (self.ResourceTypes.MachineStack, "application/x-uranium-containerstack"),