diff -r 96232974dcdb -r 645c12de6b0c Debugger/DebuggerInterfacePython3.py --- a/Debugger/DebuggerInterfacePython3.py Sun Mar 30 22:00:14 2014 +0200 +++ b/Debugger/DebuggerInterfacePython3.py Thu Apr 03 23:05:31 2014 +0200 @@ -149,17 +149,18 @@ @param port portnumber the debug server is listening on (integer) @param runInConsole flag indicating to start the debugger in a console window (boolean) - @return client process object (QProcess) and a flag to indicate - a network connection (boolean) + @return client process object (QProcess), a flag to indicate + a network connection (boolean) and the name of the interpreter + in case of a local execution (string) """ interpreter = Preferences.getDebugger("Python3Interpreter") if interpreter == "": E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>No Python3 interpreter configured.</p>""")) - return None, False + return None, False, "" debugClientType = Preferences.getDebugger("DebugClientType3") if debugClientType == "standard": @@ -196,8 +197,8 @@ if process is None: E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>The debugger backend could not be""" """ started.</p>""")) @@ -210,7 +211,7 @@ self.translate = self.__remoteTranslation else: self.translate = self.__identityTranslation - return process, self.__isNetworked + return process, self.__isNetworked, "" # set translation function self.translate = self.__identityTranslation @@ -243,11 +244,11 @@ if process is None: E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>The debugger backend could not be""" """ started.</p>""")) - return process, self.__isNetworked + return process, self.__isNetworked, interpreter process = self.__startProcess( interpreter, @@ -256,10 +257,10 @@ if process is None: E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>The debugger backend could not be started.</p>""")) - return process, self.__isNetworked + return process, self.__isNetworked, interpreter def startRemoteForProject(self, port, runInConsole): """ @@ -268,12 +269,13 @@ @param port portnumber the debug server is listening on (integer) @param runInConsole flag indicating to start the debugger in a console window (boolean) - @return client process object (QProcess) and a flag to indicate - a network connection (boolean) + @return client process object (QProcess), a flag to indicate + a network connection (boolean) and the name of the interpreter + in case of a local execution (string) """ project = e5App().getObject("Project") if not project.isDebugPropertiesLoaded(): - return None, self.__isNetworked + return None, self.__isNetworked, "" # start debugger with project specific settings interpreter = project.getDebugProperty("INTERPRETER") @@ -298,8 +300,8 @@ if process is None: E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>The debugger backend could not be""" """ started.</p>""")) # set translation function @@ -311,7 +313,7 @@ self.translate = self.__remoteTranslation else: self.translate = self.__identityTranslation - return process, self.__isNetworked + return process, self.__isNetworked, "" # set translation function self.translate = self.__identityTranslation @@ -345,11 +347,11 @@ if process is None: E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>The debugger backend could not be""" """ started.</p>""")) - return process, self.__isNetworked + return process, self.__isNetworked, interpreter process = self.__startProcess( interpreter, @@ -358,10 +360,10 @@ if process is None: E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>The debugger backend could not be started.</p>""")) - return process, self.__isNetworked + return process, self.__isNetworked, interpreter def getClientCapabilities(self): """ @@ -383,8 +385,8 @@ if self.qsock is not None: return False - sock.disconnected[()].connect(self.debugServer.startClient) - sock.readyRead[()].connect(self.__parseClientLine) + sock.disconnected.connect(self.debugServer.startClient) + sock.readyRead.connect(self.__parseClientLine) self.qsock = sock @@ -414,7 +416,7 @@ # do not want any slots called during shutdown self.qsock.disconnected.disconnect(self.debugServer.startClient) - self.qsock.readyRead[()].disconnect(self.__parseClientLine) + self.qsock.readyRead.disconnect(self.__parseClientLine) # close down socket, and shut down client as well. self.__sendCommand('{0}\n'.format(DebugProtocol.RequestShutdown)) @@ -797,12 +799,12 @@ """ Private method to ask the user which branch of a fork to follow. """ - selections = [self.trUtf8("Parent Process"), - self.trUtf8("Child process")] + selections = [self.tr("Parent Process"), + self.tr("Child process")] res, ok = QInputDialog.getItem( None, - self.trUtf8("Client forking"), - self.trUtf8("Select the fork branch to follow."), + self.tr("Client forking"), + self.tr("Select the fork branch to follow."), selections, 0, False) if not ok or res == selections[0]: