38 self.__modulesToPatch = ( |
38 self.__modulesToPatch = ( |
39 'thread', '_thread', 'threading', |
39 'thread', '_thread', 'threading', |
40 'greenlet', |
40 'greenlet', |
41 'subprocess', |
41 'subprocess', |
42 'multiprocessing', |
42 'multiprocessing', |
43 'PyQt4.QtCore', 'PyQt5.QtCore', |
43 'PyQt5.QtCore', |
44 'PySide.QtCore', 'PySide2.QtCore', |
44 'PySide2.QtCore', |
45 ) |
45 ) |
46 |
46 |
47 sys.meta_path.insert(0, self) |
47 sys.meta_path.insert(0, self) |
48 |
48 |
49 def __loadModule(self, fullname): |
49 def __loadModule(self, fullname): |
98 module.eric6_patched = True |
98 module.eric6_patched = True |
99 patchMultiprocessing(module, self.__dbgClient) |
99 patchMultiprocessing(module, self.__dbgClient) |
100 |
100 |
101 ## Add hook for *.QThread and *.QProcess |
101 ## Add hook for *.QThread and *.QProcess |
102 elif ( |
102 elif ( |
103 fullname in ('PyQt4.QtCore', 'PyQt5.QtCore', |
103 fullname in ('PyQt5.QtCore', 'PySide2.QtCore') and |
104 'PySide.QtCore', 'PySide2.QtCore') and |
|
105 not hasattr(module, 'eric6_patched') |
104 not hasattr(module, 'eric6_patched') |
106 ): |
105 ): |
107 module.eric6_patched = True |
106 module.eric6_patched = True |
108 self.__dbgClient.patchQThread(module) |
107 self.__dbgClient.patchQThread(module) |
109 patchQProcess(module, self.__dbgClient) |
108 patchQProcess(module, self.__dbgClient) |