eric6/DebugClients/Python/ModuleLoader.py

branch
multi_processing
changeset 7407
a0b6acee2c20
parent 7404
663f1c3d6f53
child 7408
0d58e708f57b
diff -r bf6be3cff6cf -r a0b6acee2c20 eric6/DebugClients/Python/ModuleLoader.py
--- a/eric6/DebugClients/Python/ModuleLoader.py	Sun Feb 09 19:27:49 2020 +0100
+++ b/eric6/DebugClients/Python/ModuleLoader.py	Mon Feb 10 18:49:49 2020 +0100
@@ -10,6 +10,8 @@
 import sys
 import importlib
 
+from QProcessExtension import patchQProcess
+
 
 class ModuleLoader(object):
     """
@@ -38,17 +40,17 @@
                 del sys.modules[moduleName]
         
         self.__modulesToPatch = (
-                'thread', '_thread', 'threading',
-                'greenlet',
-                'PyQt4.QtCore', 'PyQt5.QtCore',
-                'PySide.QtCore', 'PySide2.QtCore',
+            'thread', '_thread', 'threading',
+            'greenlet',
+            'PyQt4.QtCore', 'PyQt5.QtCore',
+            'PySide.QtCore', 'PySide2.QtCore',
         )
         
         sys.meta_path.insert(0, self)
     
     def __loadModule(self, fullname):
         """
-        Public method to load a module.
+        Private method to load a module.
         
         @param fullname name of the module to be loaded
         @type str
@@ -82,7 +84,7 @@
             if self.__dbgClient.patchGreenlet(module):
                 module.eric6_patched = True
         
-        ## Add hook for *.QThread
+        ## Add hook for *.QThread and *.QProcess
         elif (
             fullname in ('PyQt4.QtCore', 'PyQt5.QtCore',
                          'PySide.QtCore', 'PySide2.QtCore') and
@@ -90,6 +92,7 @@
         ):
             module.eric6_patched = True
             self.__dbgClient.patchQThread(module)
+            patchQProcess(module, self.__dbgClient.startOptions)
         
         self.__enableImportHooks = True
         return module
@@ -135,7 +138,7 @@
         
         def exec_module(self, module):
             """
-            Public method to execute the created module
+            Public method to execute the created module.
             
             @param module module to be executed
             @type module

eric ide

mercurial