Merged remote changes. 5_1_x

Sun, 04 Dec 2011 17:28:53 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 04 Dec 2011 17:28:53 +0100
branch
5_1_x
changeset 1480
d4e550958e3e
parent 1479
8a7d452573c7 (current diff)
parent 1478
b4f1f7ece569 (diff)
child 1484
ceb1e3cea618

Merged remote changes.

--- a/.hgtags	Mon Nov 21 19:38:42 2011 +0100
+++ b/.hgtags	Sun Dec 04 17:28:53 2011 +0100
@@ -21,3 +21,4 @@
 3fe5465a73c5789211fced1e4fd468fcfbf1ad25 release-5.1.4
 f64ca58aaa40081905b4f750246423d2c4e7a6fb release-5.1.5
 c1f7967d062f20ec59575998ea8e38822da3a656 release-5.1.6
+5545a3129010322a87924166adb0a92dcbf40fcb release-5.1.7
--- a/DebugClients/Python/DebugBase.py	Mon Nov 21 19:38:42 2011 +0100
+++ b/DebugClients/Python/DebugBase.py	Sun Dec 04 17:28:53 2011 +0100
@@ -579,6 +579,11 @@
         """
         if exctype in [SystemExit, bdb.BdbQuit]:
             atexit._run_exitfuncs()
+            if excval is None:
+                excval = 0
+            elif isinstance(excval, (unicode, str)):
+                self._dbgClient.write(excval)
+                excval = 1
             if isinstance(excval, int):
                 self._dbgClient.progTerminated(excval)
             else:
--- a/DebugClients/Python/DebugClientBase.py	Mon Nov 21 19:38:42 2011 +0100
+++ b/DebugClients/Python/DebugClientBase.py	Sun Dec 04 17:28:53 2011 +0100
@@ -1380,21 +1380,37 @@
                 else:
                     vlist = []
             else:
-                # format the dictionary found
-                if dictkeys is None:
-                    dictkeys = dict.keys()
+                qtVariable = False
+                if len(udict) > 0:
+                    if access:
+                        exec 'qvar = udict%s' % access
+                    # this has to be in line with VariablesViewer.indicators
+                    elif rvar and rvar[0][-2:] in ["[]", "()", "{}"]:
+                        exec 'qvar = udict["%s"][%s]' % (rvar[0][:-2], rvar[1])
+                    else:
+                        qvar = udict[var[-1]]
+                    qvtype = ("%s" % type(qvar))[1:-1].split()[1][1:-1]
+                    if qvtype.startswith("PyQt4"):
+                        qtVariable = True
+                
+                if qtVariable:
+                    vlist = self.__formatQt4Variable(qvar, qvtype)
                 else:
-                    # treatment for sequences and dictionaries
-                    if access:
-                        exec "dict = dict%s" % access
-                    else:
-                        dict = dict[dictkeys[0]]
-                    if isDict:
+                    # format the dictionary found
+                    if dictkeys is None:
                         dictkeys = dict.keys()
                     else:
-                        dictkeys = range(len(dict))
-                vlist = self.__formatVariablesList(dictkeys, dict, scope, filter, 
-                                                 formatSequences)
+                        # treatment for sequences and dictionaries
+                        if access:
+                            exec "dict = dict%s" % access
+                        else:
+                            dict = dict[dictkeys[0]]
+                        if isDict:
+                            dictkeys = dict.keys()
+                        else:
+                            dictkeys = range(len(dict))
+                    vlist = self.__formatVariablesList(dictkeys, dict, scope, filter, 
+                                                     formatSequences)
             varlist.extend(vlist)
         
             if obj is not None and not formatSequences:
@@ -1590,7 +1606,11 @@
                         if valtype == "classobj":
                             if ConfigVarTypeStrings.index('instance') in filter:
                                 continue
-                        elif ConfigVarTypeStrings.index('other') in filter:
+                        elif valtype == "sip.methoddescriptor":
+                            if ConfigVarTypeStrings.index('instance method') in filter:
+                                continue
+                        elif not valtype.startswith("PySide") and \
+                             ConfigVarTypeStrings.index('other') in filter:
                             continue
                     
                 try:
--- a/DebugClients/Python3/DebugBase.py	Mon Nov 21 19:38:42 2011 +0100
+++ b/DebugClients/Python3/DebugBase.py	Sun Dec 04 17:28:53 2011 +0100
@@ -587,6 +587,14 @@
         exctype, excval, exctb = excinfo
         if exctype in [SystemExit, bdb.BdbQuit]:
             atexit._run_exitfuncs()
+            if excval is None:
+                excval = 0
+            elif isinstance(excval, str):
+                self._dbgClient.write(excval)
+                excval = 1
+            elif isinstance(excval, bytes):
+                self._dbgClient.write(excval.decode())
+                excval = 1
             if isinstance(excval, int):
                 self._dbgClient.progTerminated(excval)
             else:
--- a/DebugClients/Python3/DebugClientBase.py	Mon Nov 21 19:38:42 2011 +0100
+++ b/DebugClients/Python3/DebugClientBase.py	Sun Dec 04 17:28:53 2011 +0100
@@ -1397,23 +1397,44 @@
                 else:
                     vlist = []
             else:
-                # format the dictionary found
-                if dictkeys is None:
-                    dictkeys = dict.keys()
-                else:
-                    # treatment for sequences and dictionaries
+                qtVariable = False
+                if len(udict) > 0:
                     if access:
-                        loc = {"dict" : dict}
-                        exec("dict = dict{0!s}".format(access), globals(), loc)
-                        dict = loc["dict"]
+                        loc = {"udict" : udict}
+                        exec('qvar = udict{0!s}'.format(access), globals(), loc)
+                        qvar = loc["qvar"]
+                    # this has to be in line with VariablesViewer.indicators
+                    elif rvar and rvar[0][-2:] in ["[]", "()", "{}"]:
+                        loc = {"udict" : udict}
+                        exec('qvar = udict["{0!s}"][{1!s}]'.format(rvar[0][:-2], rvar[1]),
+                             globals(), loc)
+                        qvar = loc["qvar"]
                     else:
-                        dict = dict[dictkeys[0]]
-                    if isDict:
+                        qvar = udict[var[-1]]
+                    qvtype = str(type(qvar))[1:-1].split()[1][1:-1]
+                    if qvtype.startswith("PyQt4"):
+                        qtVariable = True
+                
+                if qtVariable:
+                    vlist = self.__formatQt4Variable(qvar, qvtype)
+                else:
+                    # format the dictionary found
+                    if dictkeys is None:
                         dictkeys = dict.keys()
                     else:
-                        dictkeys = range(len(dict))
-                vlist = self.__formatVariablesList(dictkeys, dict, scope, filter, 
-                                                   formatSequences)
+                        # treatment for sequences and dictionaries
+                        if access:
+                            loc = {"dict" : dict}
+                            exec("dict = dict{0!s}".format(access), globals(), loc)
+                            dict = loc["dict"]
+                        else:
+                            dict = dict[dictkeys[0]]
+                        if isDict:
+                            dictkeys = dict.keys()
+                        else:
+                            dictkeys = range(len(dict))
+                    vlist = self.__formatVariablesList(dictkeys, dict, scope, filter, 
+                                                     formatSequences)
             varlist.extend(vlist)
         
             if obj is not None and not formatSequences:
@@ -1614,7 +1635,11 @@
                         if valtype == "classobj":
                             if ConfigVarTypeStrings.index('instance') in filter:
                                 continue
-                        elif ConfigVarTypeStrings.index('other') in filter:
+                        elif valtype == "sip.methoddescriptor":
+                            if ConfigVarTypeStrings.index('instance method') in filter:
+                                continue
+                        elif not valtype.startswith("PySide") and \
+                             ConfigVarTypeStrings.index('other') in filter:
                             continue
                 
                 try:
--- a/changelog	Mon Nov 21 19:38:42 2011 +0100
+++ b/changelog	Sun Dec 04 17:28:53 2011 +0100
@@ -1,5 +1,8 @@
 Change Log
 ----------
+Version 5.1.7:
+- bug fixes
+
 Version 5.1.6:
 - bug fixes
 - enhancement to the API generator to support the latest eric assistant plug-in

eric ide

mercurial