eric6/Debugger/CallTraceViewer.py

changeset 7775
4a1db75550bd
parent 7533
88261c96484b
child 7785
9978016560ec
--- a/eric6/Debugger/CallTraceViewer.py	Sat Oct 10 16:03:53 2020 +0200
+++ b/eric6/Debugger/CallTraceViewer.py	Sun Oct 11 17:54:52 2020 +0200
@@ -7,8 +7,9 @@
 Module implementing the Call Trace viewer widget.
 """
 
+import re
 
-from PyQt5.QtCore import pyqtSlot, pyqtSignal, Qt, QRegExp, QFileInfo
+from PyQt5.QtCore import pyqtSlot, pyqtSignal, Qt, QFileInfo
 from PyQt5.QtWidgets import QWidget, QTreeWidgetItem
 
 from E5Gui.E5Application import e5App
@@ -58,7 +59,7 @@
         self.__callStack = []
         
         self.__entryFormat = "{0}:{1} ({2})"
-        self.__entryRe = QRegExp(r"""(.+):(\d+)\s\((.*)\)""")
+        self.__entryRe = re.compile(r"""(.+):(\d+)\s\((.*)\)""")
         
         self.__projectMode = False
         self.__project = None
@@ -197,8 +198,9 @@
         """
         if item is not None and column > 0:
             columnStr = item.text(column)
-            if self.__entryRe.exactMatch(columnStr.strip()):
-                filename, lineno, func = self.__entryRe.capturedTexts()[1:]
+            match = self.__entryRe.fullmatch(columnStr.strip())
+            if match:
+                filename, lineno, func = match.groups()
                 try:
                     lineno = int(lineno)
                 except ValueError:

eric ide

mercurial