Qt5->Qt6: Fix cause of stack-overflow errors for newer Python/Qt.

part of CURA-8591
This commit is contained in:
Remco Burema 2021-12-29 09:23:11 +01:00
parent 895488a07b
commit 6586bcc762
No known key found for this signature in database
GPG key ID: 215C49431D43F98C
4 changed files with 5 additions and 4 deletions

View file

@ -30,9 +30,10 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin):
def __init__(self, application, parent = None):
if USBPrinterOutputDeviceManager.__instance is not None:
raise RuntimeError("Try to create singleton '%s' more than once" % self.__class__.__name__)
USBPrinterOutputDeviceManager.__instance = self
super().__init__(parent = parent)
USBPrinterOutputDeviceManager.__instance = self
self._application = application
self._serial_port_list = []