Browse Source

CuraApplication: Allow getting kwargs and pass them to super().__init__()

Thomas Karl Pietrowski 7 years ago
parent
commit
f9554475be
1 changed files with 6 additions and 3 deletions
  1. 6 3
      cura/CuraApplication.py

+ 6 - 3
cura/CuraApplication.py

@@ -127,7 +127,7 @@ class CuraApplication(QtApplication):
     #        Cura will always show the Add Machine Dialog upon start.
     stacksValidationFinished = pyqtSignal()  # Emitted whenever a validation is finished
 
-    def __init__(self):
+    def __init__(self, **kwargs):
 
         # this list of dir names will be used by UM to detect an old cura directory
         for dir_name in ["extruders", "machine_instances", "materials", "plugins", "quality", "user", "variants"]:
@@ -207,9 +207,12 @@ class CuraApplication(QtApplication):
 
         self._additional_components = {} # Components to add to certain areas in the interface
 
-        super().__init__(name = "cura", version = CuraVersion, buildtype = CuraBuildType,
+        super().__init__(name = "cura",
+                         version = CuraVersion,
+                         buildtype = CuraBuildType,
                          is_debug_mode = CuraDebugMode,
-                         tray_icon_name = "cura-icon-32.png")
+                         tray_icon_name = "cura-icon-32.png"
+                         **kwargs)
 
         self.default_theme = "cura-light"