DebugServer: fixed a situation where the underlying C++ object of DebugServer gets deleted prematurely.

Sun, 14 Mar 2021 13:49:41 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 14 Mar 2021 13:49:41 +0100
changeset 8160
d1057f83610e
parent 8159
08b8b3d2deb1
child 8161
3591a85e4da7

DebugServer: fixed a situation where the underlying C++ object of DebugServer gets deleted prematurely.

eric6/Debugger/DebugServer.py file | annotate | diff | comparison | revisions
eric6/UI/UserInterface.py file | annotate | diff | comparison | revisions
--- a/eric6/Debugger/DebugServer.py	Sat Mar 13 19:45:36 2021 +0100
+++ b/eric6/Debugger/DebugServer.py	Sun Mar 14 13:49:41 2021 +0100
@@ -172,7 +172,7 @@
     appendStdout = pyqtSignal(str)
     
     def __init__(self, originalPathString, preventPassiveDebugging=False,
-                 project=None):
+                 project=None, parent=None):
         """
         Constructor
         
@@ -183,8 +183,10 @@
         @type bool (optional)
         @param project reference to the project object (defaults to None)
         @type Project (optional)
+        @param parent reference to the parent object
+        @type QObject
         """
-        super(DebugServer, self).__init__()
+        super(DebugServer, self).__init__(parent)
         
         self.__originalPathString = originalPathString
         
--- a/eric6/UI/UserInterface.py	Sat Mar 13 19:45:36 2021 +0100
+++ b/eric6/UI/UserInterface.py	Sun Mar 14 13:49:41 2021 +0100
@@ -265,7 +265,7 @@
         # Generate the debug server object
         from Debugger.DebugServer import DebugServer
         debugServer = DebugServer(self.__originalPathString,
-                                  project=self.project)
+                                  project=self.project, parent=self)
         
         # Create the background service object
         from Utilities.BackgroundService import BackgroundService

eric ide

mercurial