Debugger/VariablesViewer.py

changeset 5231
42b6d31d207f
parent 5229
2251fc52c426
child 5389
9b1c800daff3
diff -r 3f61c5e46116 -r 42b6d31d207f Debugger/VariablesViewer.py
--- a/Debugger/VariablesViewer.py	Thu Oct 13 18:53:26 2016 +0200
+++ b/Debugger/VariablesViewer.py	Thu Oct 13 18:54:43 2016 +0200
@@ -327,14 +327,18 @@
         self.__debugViewer = viewer
         self.__globalScope = globalScope
         
+        indicatorPattern = "|".join([QRegExp.escape(indicator)
+                                     for indicator in VariableItem.Indicators])
         self.rx_class = QRegExp('<.*(instance|object) at 0x.*>')
         self.rx_class2 = QRegExp('class .*')
         self.rx_class3 = QRegExp('<class .* at 0x.*>')
         self.dvar_rx_class1 = QRegExp(
-            r'<.*(instance|object) at 0x.*>(\[\]|\{\}|\{:\}|\(\))')
-        self.dvar_rx_class2 = QRegExp(r'<class .* at 0x.*>(\[\]|\{\}|\{:\}|\(\))')
+            r'<.*(instance|object) at 0x.*>({0})'.format(indicatorPattern))
+        self.dvar_rx_class2 = QRegExp(
+            r'<class .* at 0x.*>({0})'.format(indicatorPattern))
         self.dvar_rx_array_element = QRegExp(r'^\d+$')
-        self.dvar_rx_special_array_element = QRegExp(r'^\d+(\[\]|\{\}|\{:\}|\(\))$')
+        self.dvar_rx_special_array_element = QRegExp(
+            r'^\d+({0})$'.format(indicatorPattern))
         self.rx_nonprintable = QRegExp(r"""(\\x\d\d)+""")
         
         self.framenr = 0

eric ide

mercurial