129 @type str |
129 @type str |
130 """ |
130 """ |
131 # Python class? |
131 # Python class? |
132 if dtype.startswith('class '): |
132 if dtype.startswith('class '): |
133 dtype = dtype[7:-1] |
133 dtype = dtype[7:-1] |
134 self.hasChilds = True |
134 if dtype not in ('method_descriptor', 'wrapper_descriptor'): |
135 elif dtype == 'classobj': |
135 self.hasChilds = True |
136 dtype = 'instance' |
|
137 # Qt related stuff? |
136 # Qt related stuff? |
138 elif (dtype.startswith(ConfigQtNames) and |
137 elif (dtype.startswith(ConfigQtNames) and |
139 dtype.endswith(ConfigKnownQtTypes)): |
138 dtype.endswith(ConfigKnownQtTypes)): |
140 self.hasChilds = True |
139 self.hasChilds = True |
|
140 |
|
141 elif dtype in ('instance', 'class'): |
|
142 self.hasChilds = True |
141 |
143 |
142 vtype = ConfigVarTypeDispStrings.get(dtype, dtype) |
144 vtype = ConfigVarTypeDispStrings.get(dtype, dtype) |
|
145 # Unkown types should be expandable by default |
|
146 if (vtype is dtype and |
|
147 dtype not in ('method_descriptor', 'wrapper_descriptor')): |
|
148 self.hasChilds = True |
143 self.type = QCoreApplication.translate("VariablesViewer", vtype) |
149 self.type = QCoreApplication.translate("VariablesViewer", vtype) |
144 |
150 |
145 def __getValue(self, dtype, dvalue): |
151 def __getValue(self, dtype, dvalue): |
146 """ |
152 """ |
147 Private method to process the variables value. |
153 Private method to process the variables value. |