From 6abeac5c44dfeb9e57c65af466e630ec0398deeb Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 18 Apr 2016 15:26:24 +0200 Subject: [PATCH] Added comment about us violating the API CURA-1339 --- plugins/USBPrinting/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/USBPrinting/__init__.py b/plugins/USBPrinting/__init__.py index 4e8e332173..4fab439bad 100644 --- a/plugins/USBPrinting/__init__.py +++ b/plugins/USBPrinting/__init__.py @@ -19,5 +19,7 @@ def getMetaData(): } def register(app): + # We are violating the QT API here (as we use a factory, which is technically not allowed). + # but we don't really have another means for doing this (and it seems to you know -work-) qmlRegisterSingletonType(USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager, "Cura", 1, 0, "USBPrinterManager", USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager.getInstance) return {"extension":USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager.getInstance(), "output_device": USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager.getInstance()}