eric6/DebugClients/Python/DebugClientBase.py

changeset 8228
772103b14c18
parent 8221
0572a215bd2f
child 8230
8b5c6896655b
diff -r 349308e84eeb -r 772103b14c18 eric6/DebugClients/Python/DebugClientBase.py
--- a/eric6/DebugClients/Python/DebugClientBase.py	Mon Apr 12 19:05:23 2021 +0200
+++ b/eric6/DebugClients/Python/DebugClientBase.py	Mon Apr 12 19:21:40 2021 +0200
@@ -1761,18 +1761,14 @@
         elif qttype == 'QDomAttr':
             varlist.append(("name", "str", "{0}".format(value.name())))
             varlist.append(("value", "str", "{0}".format(value.value())))
-        elif qttype == 'QDomCharacterData':
-            varlist.append(("data", "str", "{0}".format(value.data())))
-        elif qttype == 'QDomComment':
+        elif qttype in ('QDomCharacterData', 'QDomComment', 'QDomText'):
             varlist.append(("data", "str", "{0}".format(value.data())))
         elif qttype == 'QDomDocument':
             varlist.append(("text", "str", "{0}".format(value.toString())))
         elif qttype == 'QDomElement':
             varlist.append(("tagName", "str", "{0}".format(value.tagName())))
             varlist.append(("text", "str", "{0}".format(value.text())))
-        elif qttype == 'QDomText':
-            varlist.append(("data", "str", "{0}".format(value.data())))
-            
+        
         # Networking stuff
         elif qttype == 'QHostAddress':
             varlist.append(
@@ -1846,13 +1842,10 @@
                 if valtype in filterList:
                     continue
             elif (
-                key in SpecialAttributes and
-                "special_attributes" in filterList
-            ):
-                continue
-            elif (
-                key == "__hash__" and
-                "builtin_function_or_method" in filterList
+                (key in SpecialAttributes and
+                 "special_attributes" in filterList) or
+                (key == "__hash__" and
+                 "builtin_function_or_method" in filterList)
             ):
                 continue
             else:
@@ -1872,28 +1865,20 @@
                 
                 # valtypename, e.g. QPoint
                 valtypename = type(value).__name__
-                if valtype in filterList:
-                    continue
-                elif (
-                    valtype in ("sip.enumtype", "sip.wrappertype") and
-                    'class' in filterList
-                ):
-                    continue
-                elif (
-                    valtype in (
+                if (
+                    valtype in filterList or
+                    (valtype in ("sip.enumtype", "sip.wrappertype") and
+                     'class' in filterList) or
+                    (valtype in (
                         "sip.methoddescriptor", "method_descriptor") and
-                    'method' in filterList
+                     'method' in filterList) or
+                    (valtype in ("numpy.ndarray", "array.array") and
+                     'list' in filterList) or
+                    (valtypename == "MultiValueDict" and
+                     'dict' in filterList) or
+                    'instance' in filterList
                 ):
                     continue
-                elif (
-                    valtype in ("numpy.ndarray", "array.array") and
-                    'list' in filterList
-                ):
-                    continue
-                elif valtypename == "MultiValueDict" and 'dict' in filterList:
-                    continue
-                elif 'instance' in filterList:
-                    continue
                 
                 isQt = valtype.startswith(ConfigQtNames)
                 
@@ -2328,11 +2313,8 @@
                     redirect = True
             
             ipOrHost = sys.argv[3]
-            if ':' in ipOrHost:
-                # IPv6 address
-                remoteAddress = ipOrHost
-            elif ipOrHost[0] in '0123456789':
-                # IPv4 address
+            if ':' in ipOrHost or ipOrHost[0] in '0123456789':
+                # IPv6 address or IPv4 address
                 remoteAddress = ipOrHost
             else:
                 remoteAddress = self.__resolveHost(ipOrHost)

eric ide

mercurial