Sat, 15 Feb 2020 12:04:41 +0100
ThreadExtension: added debugging support for QRunable.
docs/changelog | file | annotate | diff | comparison | revisions | |
eric6/DebugClients/Python/ThreadExtension.py | file | annotate | diff | comparison | revisions |
--- a/docs/changelog Mon Feb 10 18:41:37 2020 +0100 +++ b/docs/changelog Sat Feb 15 12:04:41 2020 +0100 @@ -2,6 +2,8 @@ ---------- Version 20.3: - bug fixes +- Debugger + -- added debugging support for QRunable - Mercurial Interface -- added support for the '--secure' flag of hg import as of Mercurial 5.3 - Syntax Checker
--- a/eric6/DebugClients/Python/ThreadExtension.py Mon Feb 10 18:41:37 2020 +0100 +++ b/eric6/DebugClients/Python/ThreadExtension.py Sat Feb 15 12:04:41 2020 +0100 @@ -428,7 +428,23 @@ super(QThreadWrapper, self).__init__(*args, **kwargs) + class QRunnableWrapper(module.QRunnable): + """ + Wrapper class for *.QRunnable. + """ + def __init__(self, *args, **kwargs): + """ + Constructor + """ + # Overwrite the provided run method with our own, to + # intercept the thread creation by Qt + self.run = lambda s=self, run=self.run: ( + _bootstrapQThread(s, run)) + + super(QRunnableWrapper, self).__init__(*args, **kwargs) + module.QThread = QThreadWrapper + module.QRunnable = QRunnableWrapper self.enableImportHooks = True return module