mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Qt5->Qt6: Fix cause of stack-overflow errors for newer Python/Qt.
part of CURA-8591
This commit is contained in:
parent
895488a07b
commit
6586bcc762
4 changed files with 5 additions and 4 deletions
|
@ -47,11 +47,11 @@ class ContainerManager(QObject):
|
||||||
def __init__(self, application: "CuraApplication") -> None:
|
def __init__(self, application: "CuraApplication") -> None:
|
||||||
if ContainerManager.__instance is not None:
|
if ContainerManager.__instance is not None:
|
||||||
raise RuntimeError("Try to create singleton '%s' more than once" % self.__class__.__name__)
|
raise RuntimeError("Try to create singleton '%s' more than once" % self.__class__.__name__)
|
||||||
ContainerManager.__instance = self
|
|
||||||
try:
|
try:
|
||||||
super().__init__(parent = application)
|
super().__init__(parent = application)
|
||||||
except TypeError:
|
except TypeError:
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
ContainerManager.__instance = self
|
||||||
|
|
||||||
self._container_name_filters = {} # type: Dict[str, Dict[str, Any]]
|
self._container_name_filters = {} # type: Dict[str, Dict[str, Any]]
|
||||||
|
|
||||||
|
|
|
@ -31,9 +31,9 @@ class ExtruderManager(QObject):
|
||||||
|
|
||||||
if ExtruderManager.__instance is not None:
|
if ExtruderManager.__instance is not None:
|
||||||
raise RuntimeError("Try to create singleton '%s' more than once" % self.__class__.__name__)
|
raise RuntimeError("Try to create singleton '%s' more than once" % self.__class__.__name__)
|
||||||
ExtruderManager.__instance = self
|
|
||||||
|
|
||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
|
ExtruderManager.__instance = self
|
||||||
|
|
||||||
self._application = cura.CuraApplication.CuraApplication.getInstance()
|
self._application = cura.CuraApplication.CuraApplication.getInstance()
|
||||||
|
|
||||||
|
|
|
@ -30,9 +30,10 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin):
|
||||||
def __init__(self, application, parent = None):
|
def __init__(self, application, parent = None):
|
||||||
if USBPrinterOutputDeviceManager.__instance is not None:
|
if USBPrinterOutputDeviceManager.__instance is not None:
|
||||||
raise RuntimeError("Try to create singleton '%s' more than once" % self.__class__.__name__)
|
raise RuntimeError("Try to create singleton '%s' more than once" % self.__class__.__name__)
|
||||||
USBPrinterOutputDeviceManager.__instance = self
|
|
||||||
|
|
||||||
super().__init__(parent = parent)
|
super().__init__(parent = parent)
|
||||||
|
USBPrinterOutputDeviceManager.__instance = self
|
||||||
|
|
||||||
self._application = application
|
self._application = application
|
||||||
|
|
||||||
self._serial_port_list = []
|
self._serial_port_list = []
|
||||||
|
|
|
@ -5,9 +5,9 @@ class PluginInfo(PluginObject):
|
||||||
__instance = None # type: PluginInfo
|
__instance = None # type: PluginInfo
|
||||||
|
|
||||||
def __init__(self, *args, **kwags):
|
def __init__(self, *args, **kwags):
|
||||||
super().__init__(*args, **kwags)
|
|
||||||
if PluginInfo.__instance is not None:
|
if PluginInfo.__instance is not None:
|
||||||
raise RuntimeError("Try to create singleton '%s' more than once" % self.__class__.__name__)
|
raise RuntimeError("Try to create singleton '%s' more than once" % self.__class__.__name__)
|
||||||
|
super().__init__(*args, **kwags)
|
||||||
PluginInfo.__instance = self
|
PluginInfo.__instance = self
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue