Continued porting signal/slot usage to the new API.

Tue, 10 Aug 2010 13:15:03 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 10 Aug 2010 13:15:03 +0200
changeset 481
ad71812ba395
parent 480
793552e39173
child 482
4650a72c307a

Continued porting signal/slot usage to the new API.

Debugger/DebugServer.py file | annotate | diff | comparison | revisions
Debugger/DebugUI.py file | annotate | diff | comparison | revisions
Debugger/DebugViewer.py file | annotate | diff | comparison | revisions
Debugger/DebuggerInterfaceNone.py file | annotate | diff | comparison | revisions
Debugger/DebuggerInterfacePython.py file | annotate | diff | comparison | revisions
Debugger/DebuggerInterfacePython3.py file | annotate | diff | comparison | revisions
Debugger/DebuggerInterfaceRuby.py file | annotate | diff | comparison | revisions
PyUnit/UnittestDialog.py file | annotate | diff | comparison | revisions
QScintilla/Shell.py file | annotate | diff | comparison | revisions
UI/UserInterface.py file | annotate | diff | comparison | revisions
--- a/Debugger/DebugServer.py	Tue Aug 10 10:54:37 2010 +0200
+++ b/Debugger/DebugServer.py	Tue Aug 10 13:15:03 2010 +0200
@@ -70,7 +70,7 @@
             a syntax error in a watch expression
     @signal clientRawInput(prompt, echo) emitted after a raw input request was received
     @signal clientBanner(banner) emitted after the client banner was received
-    @signal clientCapabilities(int capabilities, QString cltype) emitted after the clients
+    @signal clientCapabilities(int capabilities, string cltype) emitted after the clients
             capabilities were received
     @signal clientCompletionList(completionList, text) emitted after the client
             the commandline completion list and the reworked searchstring was
@@ -89,6 +89,37 @@
     @signal utTestErrored(testname, exc_info) emitted after the client reported 
             an errored test
     """
+    clientClearBreak = pyqtSignal(str, int)
+    clientClearWatch = pyqtSignal(str)
+    clientGone = pyqtSignal(bool)
+    clientProcessStdout = pyqtSignal(str)
+    clientProcessStderr = pyqtSignal(str)
+    clientRawInputSent = pyqtSignal()
+    clientOutput = pyqtSignal(str)
+    clientLine = pyqtSignal(str, int, bool)
+    clientStack = pyqtSignal(list)
+    clientThreadList = pyqtSignal(int, list)
+    clientThreadSet = pyqtSignal()
+    clientVariables = pyqtSignal(int, list)
+    clientVariable = pyqtSignal(int, list)
+    clientStatement = pyqtSignal(bool)
+    clientException = pyqtSignal(str, str, list)
+    clientSyntaxError = pyqtSignal(str, str, int, int)
+    clientExit = pyqtSignal(int)
+    clientBreakConditionError = pyqtSignal(str, int)
+    clientWatchConditionError = pyqtSignal(str)
+    clientRawInput = pyqtSignal(str, bool)
+    clientBanner = pyqtSignal(str, str, str)
+    clientCapabilities = pyqtSignal(int, str)
+    clientCompletionList = pyqtSignal(list, str)
+    utPrepared = pyqtSignal(int, str, str)
+    utStartTest = pyqtSignal(str, str)
+    utStopTest = pyqtSignal()
+    utTestFailed = pyqtSignal(str, str)
+    utTestFailed = pyqtSignal(str, str)
+    utFinished = pyqtSignal()
+    passiveDebugStarted = pyqtSignal(str, bool)
+    
     def __init__(self):
         """
         Constructor
@@ -127,8 +158,8 @@
         self.lastClientType = ''
         self.__autoClearShell = False
         
-        self.connect(self, SIGNAL("clientClearBreak"), self.__clientClearBreakPoint)
-        self.connect(self, SIGNAL("clientClearWatch"), self.__clientClearWatchPoint)
+        self.clientClearBreak.connect(self.__clientClearBreakPoint)
+        self.clientClearWatch.connect(self.__clientClearWatchPoint)
         self.newConnection[()].connect(self.__newConnection)
         
         self.breakpointModel.rowsAboutToBeRemoved.connect(self.__deleteBreakPoints)
@@ -279,7 +310,7 @@
         if not self.passive or not self.passiveClientExited: 
             if self.debuggerInterface and self.debuggerInterface.isConnected():
                 self.shutdownServer()
-                self.emit(SIGNAL('clientGone'), unplanned & self.debugging)
+                self.clientGone.emit(unplanned and self.debugging)
         
         if clType:
             self.__setClientType(clType)
@@ -338,7 +369,7 @@
         output = str(self.clientProcess.readAllStandardOutput(), 
                      Preferences.getSystem("IOEncoding"), 
                      'replace')
-        self.emit(SIGNAL("clientProcessStdout"), output)
+        self.clientProcessStdout.emit(output)
         
     def __clientProcessError(self):
         """
@@ -347,7 +378,7 @@
         error = str(self.clientProcess.readAllStandardError(), 
                     Preferences.getSystem("IOEncoding"), 
                     'replace')
-        self.emit(SIGNAL("clientProcessStderr"), error)
+        self.clientProcessStderr.emit(error)
         
     def __clientClearBreakPoint(self, fn, lineno):
         """
@@ -842,7 +873,7 @@
         @param s the raw input (string)
         """
         self.debuggerInterface.remoteRawInput(s)
-        self.emit(SIGNAL('clientRawInputSent'))
+        self.clientRawInputSent.emit()
         
     def remoteThreadList(self):
         """
@@ -959,15 +990,15 @@
         """
         self.debuggerInterface.remoteUTStop()
         
-    def clientOutput(self, line):
+    def signalClientOutput(self, line):
         """
         Public method to process a line of client output.
         
         @param line client output (string)
         """
-        self.emit(SIGNAL('clientOutput'), line)
+        self.clientOutput.emit(line)
         
-    def clientLine(self, filename, lineno, forStack = False):
+    def signalClientLine(self, filename, lineno, forStack = False):
         """
         Public method to process client position feedback.
         
@@ -975,9 +1006,9 @@
         @param lineno line of code currently being executed (integer)
         @param forStack flag indicating this is for a stack dump (boolean)
         """
-        self.emit(SIGNAL('clientLine'), filename, lineno, forStack)
+        self.clientLine.emit(filename, lineno, forStack)
         
-    def clientStack(self, stack):
+    def signalClientStack(self, stack):
         """
         Public method to process a client's stack information.
         
@@ -985,50 +1016,50 @@
             values giving the filename, linenumber and method
             (list of lists of (string, integer, string))
         """
-        self.emit(SIGNAL('clientStack'), stack)
+        self.clientStack.emit(stack)
         
-    def clientThreadList(self, currentId, threadList):
+    def signalClientThreadList(self, currentId, threadList):
         """
         Public method to process the client thread list info.
         
         @param currentID id of the current thread (integer)
         @param threadList list of dictionaries containing the thread data
         """
-        self.emit(SIGNAL('clientThreadList'), currentId, threadList)
+        self.clientThreadList.emit(currentId, threadList)
         
-    def clientThreadSet(self):
+    def signalClientThreadSet(self):
         """
         Public method to handle the change of the client thread.
         """
-        self.emit(SIGNAL('clientThreadSet'))
+        self.clientThreadSet.emit()
         
-    def clientVariables(self, scope, variables):
+    def signalClientVariables(self, scope, variables):
         """
         Public method to process the client variables info.
         
         @param scope scope of the variables (-1 = empty global, 1 = global, 0 = local)
         @param variables the list of variables from the client
         """
-        self.emit(SIGNAL('clientVariables'), scope, variables)
+        self.clientVariables.emit(scope, variables)
         
-    def clientVariable(self, scope, variables):
+    def signalClientVariable(self, scope, variables):
         """
         Public method to process the client variable info.
         
         @param scope scope of the variables (-1 = empty global, 1 = global, 0 = local)
         @param variables the list of members of a classvariable from the client
         """
-        self.emit(SIGNAL('clientVariable'), scope, variables)
+        self.clientVariable.emit(scope, variables)
         
-    def clientStatement(self, more):
+    def signalClientStatement(self, more):
         """
         Public method to process the input response from the client.
         
         @param more flag indicating that more user input is required
         """
-        self.emit(SIGNAL('clientStatement'), more)
+        self.clientStatement.emit(more)
         
-    def clientException(self, exceptionType, exceptionMessage, stackTrace):
+    def signalClientException(self, exceptionType, exceptionMessage, stackTrace):
         """
         Public method to process the exception info from the client.
         
@@ -1037,9 +1068,9 @@
         @param stackTrace list of stack entries with the exception position
             first. Each stack entry is a list giving the filename and the linenumber.
         """
-        self.emit(SIGNAL('clientException'), exceptionType, exceptionMessage, stackTrace)
+        self.clientException.emit(exceptionType, exceptionMessage, stackTrace)
         
-    def clientSyntaxError(self, message, filename, lineNo, characterNo):
+    def signalClientSyntaxError(self, message, filename, lineNo, characterNo):
         """
         Public method to process the syntax error info from the client.
         
@@ -1048,9 +1079,9 @@
         @param lineNo line number of the syntax error position (integer)
         @param characterNo character number of the syntax error position (integer)
         """
-        self.emit(SIGNAL('clientSyntaxError'), message, filename, lineNo, characterNo)
+        self.clientSyntaxError.emit(message, filename, lineNo, characterNo)
         
-    def clientExit(self, status):
+    def signalClientExit(self, status):
         """
         Public method to process the client exit status.
         
@@ -1058,58 +1089,58 @@
         """
         if self.passive:
             self.__passiveShutDown()
-        self.emit(SIGNAL('clientExit(int)'), int(status))
+        self.clientExit.emit(int(status))
         if Preferences.getDebugger("AutomaticReset"):
             self.startClient(False)
         if self.passive:
             self.__createDebuggerInterface("None")
-            self.clientOutput(self.trUtf8('\nNot connected\n'))
-            self.clientStatement(False)
+            self.signalClientOutput(self.trUtf8('\nNot connected\n'))
+            self.signalClientStatement(False)
         
-    def clientClearBreak(self, filename, lineno):
+    def signalClientClearBreak(self, filename, lineno):
         """
         Public method to process the client clear breakpoint command.
         
         @param filename filename of the breakpoint (string)
         @param lineno line umber of the breakpoint (integer)
         """
-        self.emit(SIGNAL('clientClearBreak'), filename, lineno)
+        self.clientClearBreak.emit(filename, lineno)
         
-    def clientBreakConditionError(self, filename, lineno):
+    def signalClientBreakConditionError(self, filename, lineno):
         """
         Public method to process the client breakpoint condition error info.
         
         @param filename filename of the breakpoint (string)
         @param lineno line umber of the breakpoint (integer)
         """
-        self.emit(SIGNAL('clientBreakConditionError'), filename, lineno)
+        self.clientBreakConditionError.emit(filename, lineno)
         
-    def clientClearWatch(self, condition):
+    def signalClientClearWatch(self, condition):
         """
         Public slot to handle the clientClearWatch signal.
         
         @param condition expression of watch expression to clear (string)
         """
-        self.emit(SIGNAL('clientClearWatch'), condition)
+        self.clientClearWatch.emit(condition)
         
-    def clientWatchConditionError(self, condition):
+    def signalClientWatchConditionError(self, condition):
         """
         Public method to process the client watch expression error info.
         
         @param condition expression of watch expression to clear (string)
         """
-        self.emit(SIGNAL('clientWatchConditionError'), condition)
+        self.clientWatchConditionError.emit(condition)
         
-    def clientRawInput(self, prompt, echo):
+    def signalClientRawInput(self, prompt, echo):
         """
         Public method to process the client raw input command.
         
         @param prompt the input prompt (string)
         @param echo flag indicating an echoing of the input (boolean)
         """
-        self.emit(SIGNAL('clientRawInput'), prompt, echo)
+        self.clientRawInput.emit(prompt, echo)
         
-    def clientBanner(self, version, platform, debugClient):
+    def signalClientBanner(self, version, platform, debugClient):
         """
         Public method to process the client banner info.
         
@@ -1117,9 +1148,9 @@
         @param platform hostname of the client (string)
         @param debugClient additional debugger type info (string)
         """
-        self.emit(SIGNAL('clientBanner'), version, platform, debugClient)
+        self.clientBanner.emit(version, platform, debugClient)
         
-    def clientCapabilities(self, capabilities, clientType):
+    def signalClientCapabilities(self, capabilities, clientType):
         """
         Public method to process the client capabilities info.
         
@@ -1127,16 +1158,16 @@
         @param clientType type of the debug client (string)
         """
         self.__clientCapabilities[clientType] = capabilities
-        self.emit(SIGNAL('clientCapabilities'), capabilities, clientType)
+        self.clientCapabilities.emit(capabilities, clientType)
         
-    def clientCompletionList(self, completionList, text):
+    def signalClientCompletionList(self, completionList, text):
         """
         Public method to process the client auto completion info.
         
         @param completionList list of possible completions (list of strings)
         @param text the text to be completed (string)
         """
-        self.emit(SIGNAL('clientCompletionList'), completionList, text)
+        self.clientCompletionList.emit(completionList, text)
         
     def clientUtPrepared(self, result, exceptionType, exceptionValue):
         """
@@ -1146,7 +1177,7 @@
         @param exceptionType exception type (string)
         @param exceptionValue exception message (string)
         """
-        self.emit(SIGNAL('utPrepared'), result, exceptionType, exceptionValue)
+        self.utPrepared.emit(result, exceptionType, exceptionValue)
         
     def clientUtStartTest(self, testname, doc):
         """
@@ -1155,13 +1186,13 @@
         @param testname name of the test (string)
         @param doc short description of the test (string)
         """
-        self.emit(SIGNAL('utStartTest'), testname, doc)
+        self.utStartTest.emit(testname, doc)
         
     def clientUtStopTest(self):
         """
         Public method to process the client stop test info.
         """
-        self.emit(SIGNAL('utStopTest'))
+        self.utStopTest.emit()
         
     def clientUtTestFailed(self, testname, traceback):
         """
@@ -1170,7 +1201,7 @@
         @param testname name of the test (string)
         @param traceback lines of traceback info (string)
         """
-        self.emit(SIGNAL('utTestFailed'), testname, traceback)
+        self.utTestFailed.emit(testname, traceback)
         
     def clientUtTestErrored(self, testname, traceback):
         """
@@ -1179,13 +1210,13 @@
         @param testname name of the test (string)
         @param traceback lines of traceback info (string)
         """
-        self.emit(SIGNAL('utTestErrored'), testname, traceback)
+        self.utTestErrored.emit(testname, traceback)
         
     def clientUtFinished(self):
         """
         Public method to process the client unit test finished info.
         """
-        self.emit(SIGNAL('utFinished'))
+        self.utFinished.emit()
         
     def passiveStartUp(self, fn, exc):
         """
@@ -1199,7 +1230,7 @@
         self.debugging = True
         self.__restoreBreakpoints()
         self.__restoreWatchpoints()
-        self.emit(SIGNAL('passiveDebugStarted'), fn, exc)
+        self.passiveDebugStarted.emit(fn, exc)
         
     def __passiveShutDown(self):
         """
--- a/Debugger/DebugUI.py	Tue Aug 10 10:54:37 2010 +0200
+++ b/Debugger/DebugUI.py	Tue Aug 10 13:15:03 2010 +0200
@@ -40,6 +40,8 @@
     @signal exceptionInterrupt() emitted after the execution was interrupted by an
         exception and acknowledged by the user
     """
+    clientStack = pyqtSignal(list)
+    
     def __init__(self, ui, vm, debugServer, debugViewer, project):
         """
         Constructor
@@ -101,25 +103,21 @@
         self.debugViewer.setVariablesFilter(self.globalsVarFilter, self.localsVarFilter)
         
         # Connect the signals emitted by the debug-server
-        self.connect(debugServer, SIGNAL('clientGone'), self.__clientGone)
-        self.connect(debugServer, SIGNAL('clientLine'), self.__clientLine)
-        self.connect(debugServer, SIGNAL('clientExit(int)'), self.__clientExit)
-        self.connect(debugServer, SIGNAL('clientSyntaxError'), self.__clientSyntaxError)
-        self.connect(debugServer, SIGNAL('clientException'), self.__clientException)
-        self.connect(debugServer, SIGNAL('clientVariables'), self.__clientVariables)
-        self.connect(debugServer, SIGNAL('clientVariable'), self.__clientVariable)
-        self.connect(debugServer, SIGNAL('clientBreakConditionError'),
-            self.__clientBreakConditionError)
-        self.connect(debugServer, SIGNAL('clientWatchConditionError'),
-            self.__clientWatchConditionError)
-        self.connect(debugServer, SIGNAL('passiveDebugStarted'),
-            self.__passiveDebugStarted)
-        self.connect(debugServer, SIGNAL('clientThreadSet'), self.__clientThreadSet)
+        debugServer.clientGone.connect(self.__clientGone)
+        debugServer.clientLine.connect(self.__clientLine)
+        debugServer.clientExit.connect(self.__clientExit)
+        debugServer.clientSyntaxError.connect(self.__clientSyntaxError)
+        debugServer.clientException.connect(self.__clientException)
+        debugServer.clientVariables.connect(self.__clientVariables)
+        debugServer.clientVariable.connect(self.__clientVariable)
+        debugServer.clientBreakConditionError.connect(self.__clientBreakConditionError)
+        debugServer.clientWatchConditionError.connect(self.__clientWatchConditionError)
+        debugServer.passiveDebugStarted.connect(self.__passiveDebugStarted)
+        debugServer.clientThreadSet.connect(self.__clientThreadSet)
         
-        self.connect(debugServer, SIGNAL('clientRawInput'), debugViewer.handleRawInput)
-        self.connect(debugServer, SIGNAL('clientRawInputSent'),
-            debugViewer.restoreCurrentPage)
-        self.connect(debugServer, SIGNAL('clientThreadList'), debugViewer.showThreadList)
+        debugServer.clientRawInput.connect(debugViewer.handleRawInput)
+        debugServer.clientRawInputSent.connect(debugViewer.restoreCurrentPage)
+        debugServer.clientThreadList.connect(debugViewer.showThreadList)
         
         # Connect the signals emitted by the viewmanager
         self.connect(vm, SIGNAL('editorOpened'), self.__editorOpened)
@@ -1041,7 +1039,7 @@
                 stack = []
                 for fn, ln in stackTrace:
                     stack.append((fn, ln, ''))
-                self.emit(SIGNAL('clientStack'), stack)
+                self.clientStack.emit(stack)
                 self.__getClientVariables()
                 self.ui.setDebugProfile()
                 return
@@ -1057,11 +1055,11 @@
         else:
             self.__continue()
         
-    def __clientGone(self,unplanned):
+    def __clientGone(self, unplanned):
         """
         Private method to handle the disconnection of the debugger client.
         
-        @param unplanned 1 if the client died, 0 otherwise
+        @param unplanned True if the client died, False otherwise
         """
         self.__resetUI()
         if unplanned:
--- a/Debugger/DebugViewer.py	Tue Aug 10 10:54:37 2010 +0200
+++ b/Debugger/DebugViewer.py	Tue Aug 10 13:15:03 2010 +0200
@@ -232,7 +232,7 @@
         self.currentStack = None
         self.framenr = 0
         
-        self.connect(self.debugServer, SIGNAL('clientStack'), self.handleClientStack)
+        self.debugServer.clientStack.connect(self.handleClientStack)
         
     def setDebugger(self, debugUI):
         """
@@ -241,7 +241,7 @@
         @param debugUI reference to the DebugUI objectTrees
         """
         self.debugUI = debugUI
-        self.connect(self.debugUI, SIGNAL('clientStack'), self.handleClientStack)
+        self.debugUI.clientStack.connect(self.handleClientStack)
         
     def handleResetUI(self):
         """
--- a/Debugger/DebuggerInterfaceNone.py	Tue Aug 10 10:54:37 2010 +0200
+++ b/Debugger/DebuggerInterfaceNone.py	Tue Aug 10 13:15:03 2010 +0200
@@ -176,7 +176,7 @@
         @param stmt the Python statement to execute (string). It
               should not have a trailing newline.
         """
-        self.debugServer.clientStatement(False)
+        self.debugServer.signalClientStatement(False)
         return
 
     def remoteStep(self):
@@ -343,7 +343,7 @@
         """
         Public slot to get the banner info of the remote client.
         """
-        self.debugServer.clientBanner("No backend", "", "")
+        self.debugServer.signalClientBanner("No backend", "", "")
         return
         
     def remoteCapabilities(self):
@@ -385,4 +385,4 @@
         """
         public method to stop a unittest run.
         """
-        return
+        return
\ No newline at end of file
--- a/Debugger/DebuggerInterfacePython.py	Tue Aug 10 10:54:37 2010 +0200
+++ b/Debugger/DebuggerInterfacePython.py	Tue Aug 10 13:15:03 2010 +0200
@@ -754,7 +754,7 @@
             # string read from the socket...
             boc = line.find('>')
             if boc > 0 and eoc > boc:
-                self.debugServer.clientOutput(line[:boc])
+                self.debugServer.signalClientOutput(line[:boc])
                 line = line[boc:]
                 eoc = line.find('<') + 1
                 boc = line.find('>')
@@ -771,18 +771,18 @@
                         self.__autoContinue = False
                         QTimer.singleShot(0, self.remoteContinue)
                     else:
-                        self.debugServer.clientLine(cf[0], int(cf[1]), 
+                        self.debugServer.signalClientLine(cf[0], int(cf[1]), 
                                                     resp == ResponseStack)
-                        self.debugServer.clientStack(stack)
+                        self.debugServer.signalClientStack(stack)
                     continue
                 
                 if resp == ResponseThreadList:
                     currentId, threadList = eval(line[eoc:-1])
-                    self.debugServer.clientThreadList(currentId, threadList)
+                    self.debugServer.signalClientThreadList(currentId, threadList)
                     continue
                 
                 if resp == ResponseThreadSet:
-                    self.debugServer.clientThreadSet()
+                    self.debugServer.signalClientThreadSet()
                     continue
                 
                 if resp == ResponseVariables:
@@ -792,7 +792,7 @@
                         variables = vlist[1:]
                     except IndexError:
                         variables = []
-                    self.debugServer.clientVariables(scope, variables)
+                    self.debugServer.signalClientVariables(scope, variables)
                     continue
                 
                 if resp == ResponseVariable:
@@ -802,15 +802,15 @@
                         variables = vlist[1:]
                     except IndexError:
                         variables = []
-                    self.debugServer.clientVariable(scope, variables)
+                    self.debugServer.signalClientVariable(scope, variables)
                     continue
                 
                 if resp == ResponseOK:
-                    self.debugServer.clientStatement(False)
+                    self.debugServer.signalClientStatement(False)
                     continue
                 
                 if resp == ResponseContinue:
-                    self.debugServer.clientStatement(True)
+                    self.debugServer.signalClientStatement(True)
                     continue
                 
                 if resp == ResponseException:
@@ -825,7 +825,7 @@
                         exctype = None
                         excmessage = ''
                         stack = []
-                    self.debugServer.clientException(exctype, excmessage, stack)
+                    self.debugServer.signalClientException(exctype, excmessage, stack)
                     continue
                 
                 if resp == ResponseSyntax:
@@ -842,57 +842,57 @@
                         cn = 0
                     if cn is None:
                         cn = 0
-                    self.debugServer.clientSyntaxError(message, fn, ln, cn)
+                    self.debugServer.signalClientSyntaxError(message, fn, ln, cn)
                     continue
                 
                 if resp == ResponseExit:
-                    self.debugServer.clientExit(line[eoc:-1])
+                    self.debugServer.signalClientExit(line[eoc:-1])
                     continue
                 
                 if resp == ResponseClearBreak:
                     fn, lineno = line[eoc:-1].split(',')
                     lineno = int(lineno)
                     fn = self.translate(fn, True)
-                    self.debugServer.clientClearBreak(fn, lineno)
+                    self.debugServer.signalClientClearBreak(fn, lineno)
                     continue
                 
                 if resp == ResponseBPConditionError:
                     fn, lineno = line[eoc:-1].split(',')
                     lineno = int(lineno)
                     fn = self.translate(fn, True)
-                    self.debugServer.clientBreakConditionError(fn, lineno)
+                    self.debugServer.signalClientBreakConditionError(fn, lineno)
                     continue
                 
                 if resp == ResponseClearWatch:
                     cond = line[eoc:-1]
-                    self.debugServer.clientClearWatch(cond)
+                    self.debugServer.signalClientClearWatch(cond)
                     continue
                 
                 if resp == ResponseWPConditionError:
                     cond = line[eoc:-1]
-                    self.debugServer.clientWatchConditionError(cond)
+                    self.debugServer.signalClientWatchConditionError(cond)
                     continue
                 
                 if resp == ResponseRaw:
                     prompt, echo = eval(line[eoc:-1])
-                    self.debugServer.clientRawInput(prompt, echo)
+                    self.debugServer.signalClientRawInput(prompt, echo)
                     continue
                 
                 if resp == ResponseBanner:
                     version, platform, dbgclient = eval(line[eoc:-1])
-                    self.debugServer.clientBanner(version, platform, dbgclient)
+                    self.debugServer.signalClientBanner(version, platform, dbgclient)
                     continue
                 
                 if resp == ResponseCapabilities:
                     cap, clType = eval(line[eoc:-1])
                     self.clientCapabilities = cap
-                    self.debugServer.clientCapabilities(cap, clType)
+                    self.debugServer.signalClientCapabilities(cap, clType)
                     continue
                 
                 if resp == ResponseCompletion:
                     clstring, text = line[eoc:-1].split('||')
                     cl = eval(clstring)
-                    self.debugServer.clientCompletionList(cl, text)
+                    self.debugServer.signalClientCompletionList(cl, text)
                     continue
                 
                 if resp == PassiveStartup:
@@ -934,7 +934,7 @@
                     self.__askForkTo()
                     continue
                 
-            self.debugServer.clientOutput(line)
+            self.debugServer.signalClientOutput(line)
 
     def __sendCommand(self, cmd):
         """
--- a/Debugger/DebuggerInterfacePython3.py	Tue Aug 10 10:54:37 2010 +0200
+++ b/Debugger/DebuggerInterfacePython3.py	Tue Aug 10 13:15:03 2010 +0200
@@ -753,7 +753,7 @@
             # string read from the socket...
             boc = line.find('>')
             if boc > 0 and eoc > boc:
-                self.debugServer.clientOutput(line[:boc])
+                self.debugServer.signalClientOutput(line[:boc])
                 line = line[boc:]
                 eoc = line.find('<') + 1
                 boc = line.find('>')
@@ -770,18 +770,18 @@
                         self.__autoContinue = False
                         QTimer.singleShot(0, self.remoteContinue)
                     else:
-                        self.debugServer.clientLine(cf[0], int(cf[1]), 
+                        self.debugServer.signalClientLine(cf[0], int(cf[1]), 
                                                     resp == ResponseStack)
-                        self.debugServer.clientStack(stack)
+                        self.debugServer.signalClientStack(stack)
                     continue
                 
                 if resp == ResponseThreadList:
                     currentId, threadList = eval(line[eoc:-1])
-                    self.debugServer.clientThreadList(currentId, threadList)
+                    self.debugServer.signalClientThreadList(currentId, threadList)
                     continue
                 
                 if resp == ResponseThreadSet:
-                    self.debugServer.clientThreadSet()
+                    self.debugServer.signalClientThreadSet()
                     continue
                 
                 if resp == ResponseVariables:
@@ -791,7 +791,7 @@
                         variables = vlist[1:]
                     except IndexError:
                         variables = []
-                    self.debugServer.clientVariables(scope, variables)
+                    self.debugServer.signalClientVariables(scope, variables)
                     continue
                 
                 if resp == ResponseVariable:
@@ -801,15 +801,15 @@
                         variables = vlist[1:]
                     except IndexError:
                         variables = []
-                    self.debugServer.clientVariable(scope, variables)
+                    self.debugServer.signalClientVariable(scope, variables)
                     continue
                 
                 if resp == ResponseOK:
-                    self.debugServer.clientStatement(False)
+                    self.debugServer.signalClientStatement(False)
                     continue
                 
                 if resp == ResponseContinue:
-                    self.debugServer.clientStatement(True)
+                    self.debugServer.signalClientStatement(True)
                     continue
                 
                 if resp == ResponseException:
@@ -824,7 +824,7 @@
                         exctype = None
                         excmessage = ''
                         stack = []
-                    self.debugServer.clientException(exctype, excmessage, stack)
+                    self.debugServer.signalClientException(exctype, excmessage, stack)
                     continue
                 
                 if resp == ResponseSyntax:
@@ -841,57 +841,57 @@
                         cn = 0
                     if cn is None:
                         cn = 0
-                    self.debugServer.clientSyntaxError(message, fn, ln, cn)
+                    self.debugServer.signalClientSyntaxError(message, fn, ln, cn)
                     continue
                 
                 if resp == ResponseExit:
-                    self.debugServer.clientExit(line[eoc:-1])
+                    self.debugServer.signalClientExit(line[eoc:-1])
                     continue
                 
                 if resp == ResponseClearBreak:
                     fn, lineno = line[eoc:-1].split(',')
                     lineno = int(lineno)
                     fn = self.translate(fn, True)
-                    self.debugServer.clientClearBreak(fn, lineno)
+                    self.debugServer.signalClientClearBreak(fn, lineno)
                     continue
                 
                 if resp == ResponseBPConditionError:
                     fn, lineno = line[eoc:-1].split(',')
                     lineno = int(lineno)
                     fn = self.translate(fn, True)
-                    self.debugServer.clientBreakConditionError(fn, lineno)
+                    self.debugServer.signalClientBreakConditionError(fn, lineno)
                     continue
                 
                 if resp == ResponseClearWatch:
                     cond = line[eoc:-1]
-                    self.debugServer.clientClearWatch(cond)
+                    self.debugServer.signalClientClearWatch(cond)
                     continue
                 
                 if resp == ResponseWPConditionError:
                     cond = line[eoc:-1]
-                    self.debugServer.clientWatchConditionError(cond)
+                    self.debugServer.signalClientWatchConditionError(cond)
                     continue
                 
                 if resp == ResponseRaw:
                     prompt, echo = eval(line[eoc:-1])
-                    self.debugServer.clientRawInput(prompt, echo)
+                    self.debugServer.signalClientRawInput(prompt, echo)
                     continue
                 
                 if resp == ResponseBanner:
                     version, platform, dbgclient = eval(line[eoc:-1])
-                    self.debugServer.clientBanner(version, platform, dbgclient)
+                    self.debugServer.signalClientBanner(version, platform, dbgclient)
                     continue
                 
                 if resp == ResponseCapabilities:
                     cap, clType = eval(line[eoc:-1])
                     self.clientCapabilities = cap
-                    self.debugServer.clientCapabilities(cap, clType)
+                    self.debugServer.signalClientCapabilities(cap, clType)
                     continue
                 
                 if resp == ResponseCompletion:
                     clstring, text = line[eoc:-1].split('||')
                     cl = eval(clstring)
-                    self.debugServer.clientCompletionList(cl, text)
+                    self.debugServer.signalClientCompletionList(cl, text)
                     continue
                 
                 if resp == PassiveStartup:
@@ -933,7 +933,7 @@
                     self.__askForkTo()
                     continue
             
-            self.debugServer.clientOutput(line)
+            self.debugServer.signalClientOutput(line)
 
     def __sendCommand(self, cmd):
         """
--- a/Debugger/DebuggerInterfaceRuby.py	Tue Aug 10 10:54:37 2010 +0200
+++ b/Debugger/DebuggerInterfaceRuby.py	Tue Aug 10 13:15:03 2010 +0200
@@ -705,7 +705,7 @@
             # string read from the socket...
             boc = line.find('>')
             if boc > 0 and eoc > boc:
-                self.debugServer.clientOutput(line[:boc])
+                self.debugServer.signalClientOutput(line[:boc])
                 line = line[boc:]
                 eoc = line.find('<') + 1
                 boc = line.find('>')
@@ -722,8 +722,8 @@
                         self.__autoContinue = False
                         QTimer.singleShot(0, self.remoteContinue)
                     else:
-                        self.debugServer.clientLine(cf[0], int(cf[1]))
-                        self.debugServer.clientStack(stack)
+                        self.debugServer.signalClientLine(cf[0], int(cf[1]))
+                        self.debugServer.signalClientStack(stack)
                     continue
                 
                 if resp == ResponseVariables:
@@ -733,7 +733,7 @@
                         variables = vlist[1:]
                     except IndexError:
                         variables = []
-                    self.debugServer.clientVariables(scope, variables)
+                    self.debugServer.signalClientVariables(scope, variables)
                     continue
                 
                 if resp == ResponseVariable:
@@ -743,15 +743,15 @@
                         variables = vlist[1:]
                     except IndexError:
                         variables = []
-                    self.debugServer.clientVariable(scope, variables)
+                    self.debugServer.signalClientVariable(scope, variables)
                     continue
                 
                 if resp == ResponseOK:
-                    self.debugServer.clientStatement(False)
+                    self.debugServer.signalClientStatement(False)
                     continue
                 
                 if resp == ResponseContinue:
-                    self.debugServer.clientStatement(True)
+                    self.debugServer.signalClientStatement(True)
                     continue
                 
                 if resp == ResponseException:
@@ -766,7 +766,7 @@
                         exctype = None
                         excmessage = ''
                         stack = []
-                    self.debugServer.clientException(exctype, excmessage, stack)
+                    self.debugServer.signalClientException(exctype, excmessage, stack)
                     continue
                 
                 if resp == ResponseSyntax:
@@ -781,40 +781,40 @@
                         fn = ''
                         ln = 0
                         cn = 0
-                    self.debugServer.clientSyntaxError(message, fn, ln, cn)
+                    self.debugServer.signalClientSyntaxError(message, fn, ln, cn)
                     continue
                 
                 if resp == ResponseExit:
-                    self.debugServer.clientExit(line[eoc:-1])
+                    self.debugServer.signalClientExit(line[eoc:-1])
                     continue
                 
                 if resp == ResponseClearBreak:
                     fn, lineno = line[eoc:-1].split(',')
                     lineno = int(lineno)
                     fn = self.translate(fn, True)
-                    self.debugServer.clientClearBreak(fn, lineno)
+                    self.debugServer.signalClientClearBreak(fn, lineno)
                     continue
                 
                 if resp == ResponseClearWatch:
                     cond = line[eoc:-1]
-                    self.debugServer.clientClearWatch(cond)
+                    self.debugServer.signalClientClearWatch(cond)
                     continue
                 
                 if resp == ResponseBanner:
                     version, platform, dbgclient = eval(line[eoc:-1])
-                    self.debugServer.clientBanner(version, platform, dbgclient)
+                    self.debugServer.signalClientBanner(version, platform, dbgclient)
                     continue
                 
                 if resp == ResponseCapabilities:
                     cap, clType = eval(line[eoc:-1])
                     self.clientCapabilities = cap
-                    self.debugServer.clientCapabilities(cap, clType)
+                    self.debugServer.signalClientCapabilities(cap, clType)
                     continue
                 
                 if resp == ResponseCompletion:
                     clstring, text = line[eoc:-1].split('||')
                     cl = eval(clstring)
-                    self.debugServer.clientCompletionList(cl, text)
+                    self.debugServer.signalClientCompletionList(cl, text)
                     continue
                 
                 if resp == PassiveStartup:
@@ -824,7 +824,7 @@
                     self.debugServer.passiveStartUp(fn, exc)
                     continue
             
-            self.debugServer.clientOutput(line)
+            self.debugServer.signalClientOutput(line)
 
     def __sendCommand(self, cmd):
         """
--- a/PyUnit/UnittestDialog.py	Tue Aug 10 10:54:37 2010 +0200
+++ b/PyUnit/UnittestDialog.py	Tue Aug 10 13:15:03 2010 +0200
@@ -95,18 +95,12 @@
         
         # now connect the debug server signals if called from the eric5 IDE
         if self.dbs:
-            self.connect(self.dbs, SIGNAL('utPrepared'),
-                self.__UTPrepared)
-            self.connect(self.dbs, SIGNAL('utFinished'),
-                self.__setStoppedMode)
-            self.connect(self.dbs, SIGNAL('utStartTest'),
-                self.testStarted)
-            self.connect(self.dbs, SIGNAL('utStopTest'),
-                self.testFinished)
-            self.connect(self.dbs, SIGNAL('utTestFailed'),
-                self.testFailed)
-            self.connect(self.dbs, SIGNAL('utTestErrored'),
-                self.testErrored)
+            self.dbs.utPrepared.connect(self.__UTPrepared)
+            self.dbs.utFinished.connect(self.__setStoppedMode)
+            self.dbs.utStartTest.connect(self.testStarted)
+            self.dbs.utStopTest.connect(self.testFinished)
+            self.dbs.utTestFailed.connect(self.testFailed)
+            self.dbs.utTestErrored.connect(self.testErrored)
         
     def __setProgressColor(self, color):
         """
--- a/QScintilla/Shell.py	Tue Aug 10 10:54:37 2010 +0200
+++ b/QScintilla/Shell.py	Tue Aug 10 13:15:03 2010 +0200
@@ -85,17 +85,17 @@
         
         self.__showStdOutErr = Preferences.getShell("ShowStdOutErr")
         if self.__showStdOutErr:
-            self.connect(dbs, SIGNAL('clientProcessStdout'), self.__writeStdOut)
-            self.connect(dbs, SIGNAL('clientProcessStderr'), self.__writeStdErr)
-        self.connect(dbs, SIGNAL('clientOutput'), self.__write)
-        self.connect(dbs, SIGNAL('clientStatement'), self.__clientStatement)
-        self.connect(dbs, SIGNAL('clientGone'), self.__initialise)
-        self.connect(dbs, SIGNAL('clientRawInput'), self.__raw_input)
-        self.connect(dbs, SIGNAL('clientBanner'), self.__writeBanner)
-        self.connect(dbs, SIGNAL('clientCompletionList'), self.__showCompletions)
-        self.connect(dbs, SIGNAL('clientCapabilities'), self.__clientCapabilities)
-        self.connect(dbs, SIGNAL('clientException'), self.__clientError)
-        self.connect(dbs, SIGNAL('clientSyntaxError'), self.__clientError)
+            dbs.clientProcessStdout.connect(self.__writeStdOut)
+            dbs.clientProcessStderr.connect(self.__writeStdErr)
+        dbs.clientOutput.connect(self.__write)
+        dbs.clientStatement.connect(self.__clientStatement)
+        dbs.clientGone.connect(self.__initialise)
+        dbs.clientRawInput.connect(self.__raw_input)
+        dbs.clientBanner.connect(self.__writeBanner)
+        dbs.clientCompletionList.connect(self.__showCompletions)
+        dbs.clientCapabilities.connect(self.__clientCapabilities)
+        dbs.clientException.connect(self.__clientError)
+        dbs.clientSyntaxError.connect(self.__clientError)
         self.dbs = dbs
         
         # Initialise instance variables.
@@ -1264,15 +1264,11 @@
         showStdOutErr = Preferences.getShell("ShowStdOutErr")
         if self.__showStdOutErr != showStdOutErr:
             if showStdOutErr:
-                self.connect(self.dbs, SIGNAL('clientProcessStdout'), 
-                             self.__writeStdOut)
-                self.connect(self.dbs, SIGNAL('clientProcessStderr'), 
-                             self.__writeStdErr)
+                self.dbs.clientProcessStdout.connect(self.__writeStdOut)
+                self.dbs.clientProcessStderr.connect(self.__writeStdErr)
             else:
-                self.disconnect(self.dbs, SIGNAL('clientProcessStdout'), 
-                                self.__writeStdOut)
-                self.disconnect(self.dbs, SIGNAL('clientProcessStderr'), 
-                                self.__writeStdErr)
+                self.dbs.clientProcessStdout.disconnect(self.__writeStdOut)
+                self.dbs.clientProcessStderr.disconnect(self.__writeStdErr)
             self.__showStdOutErr = showStdOutErr
         
     def __showCompletions(self, completions, text):
@@ -1433,4 +1429,4 @@
         """
         Private method to open the configuration dialog.
         """
-        e5App().getObject("UserInterface").showPreferences("shellPage")
\ No newline at end of file
+        e5App().getObject("UserInterface").showPreferences("shellPage")
--- a/UI/UserInterface.py	Tue Aug 10 10:54:37 2010 +0200
+++ b/UI/UserInterface.py	Tue Aug 10 13:15:03 2010 +0200
@@ -415,18 +415,14 @@
         self.connect(self.debuggerUI, SIGNAL('compileResources'),
                      self.projectBrowser.prBrowser.compileChangedResources)
         
-        self.connect(debugServer, SIGNAL('passiveDebugStarted'),
-                     self.debugViewer.exceptionLogger.debuggingStarted)
-        self.connect(debugServer, SIGNAL('passiveDebugStarted'),
-                     self.debugViewer.handleDebuggingStarted)
-        self.connect(debugServer, SIGNAL('clientException'),
-                     self.debugViewer.exceptionLogger.addException)
-        self.connect(debugServer, SIGNAL('clientLine'),
-                     self.debugViewer.breakpointViewer.highlightBreakpoint)
-        self.connect(debugServer, SIGNAL('clientProcessStdout'),
-                     self.appendToStdout)
-        self.connect(debugServer, SIGNAL('clientProcessStderr'),
-                     self.appendToStderr)
+        debugServer.passiveDebugStarted.connect(
+            self.debugViewer.exceptionLogger.debuggingStarted)
+        debugServer.passiveDebugStarted.connect(self.debugViewer.handleDebuggingStarted)
+        debugServer.clientException.connect(self.debugViewer.exceptionLogger.addException)
+        debugServer.clientLine.connect(
+            self.debugViewer.breakpointViewer.highlightBreakpoint)
+        debugServer.clientProcessStdout.connect(self.appendToStdout)
+        debugServer.clientProcessStderr.connect(self.appendToStderr)
         
         self.connect(self.stdout, SIGNAL('appendStdout'),
                      self.appendToStdout)

eric ide

mercurial