eric7/DataViews/PyCoverageDialog.py

branch
eric7
changeset 8943
23f9c7b9e18e
parent 8881
54e42bc2437a
child 9070
eab09a1ab8ce
child 9111
4ac66b6c33a4
diff -r e91951ff3bbd -r 23f9c7b9e18e eric7/DataViews/PyCoverageDialog.py
--- a/eric7/DataViews/PyCoverageDialog.py	Mon Feb 07 22:02:35 2022 +0100
+++ b/eric7/DataViews/PyCoverageDialog.py	Tue Feb 08 16:21:09 2022 +0100
@@ -7,8 +7,9 @@
 Module implementing a Python code coverage dialog.
 """
 
+import contextlib
 import os
-import contextlib
+import time
 
 from PyQt6.QtCore import pyqtSlot, Qt
 from PyQt6.QtWidgets import (
@@ -194,6 +195,7 @@
             self.resultList.setSortingEnabled(False)
             
             # now go through all the files
+            now = time.monotonic()
             for progress, file in enumerate(files, start=1):
                 if self.cancelled:
                     return
@@ -215,7 +217,9 @@
                     total_exceptions += 1
                 
                 self.checkProgress.setValue(progress)
-                QApplication.processEvents()
+                if time.monotonic() - now > 0.01:
+                    QApplication.processEvents()
+                    now = time.monotonic()
         finally:
             # reenable updates of the list
             self.resultList.setSortingEnabled(True)

eric ide

mercurial