Merged with patch provided by Tobias. eric7

Thu, 27 Jan 2022 17:54:11 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 27 Jan 2022 17:54:11 +0100
branch
eric7
changeset 8933
96301c65ed2e
parent 8931
556613adedc0 (current diff)
parent 8932
a21e80dde10e (diff)
child 8934
d3798915e0d2

Merged with patch provided by Tobias.

--- a/eric7/UI/FindFileWidget.py	Mon Jan 24 18:43:38 2022 +0100
+++ b/eric7/UI/FindFileWidget.py	Thu Jan 27 17:54:11 2022 +0100
@@ -9,6 +9,7 @@
 
 import os
 import re
+import time
 
 from PyQt6.QtCore import pyqtSignal, pyqtSlot, Qt, QPoint, QUrl
 from PyQt6.QtGui import QCursor, QDesktopServices, QImageReader
@@ -615,6 +616,7 @@
                 self.findProgress.setValue(progress)
                 continue
             
+            now = time.monotonic()
             # now perform the search and display the lines found
             for count, line in enumerate(lines, start=1):
                 if self.__cancelSearch:
@@ -641,7 +643,9 @@
                     self.__createItem(file, count, line, start, end,
                                       rline, hashStr)
                 
-                QApplication.processEvents()
+                if time.monotonic() - now > 0.01:
+                    QApplication.processEvents()
+                    now = time.monotonic()
             
             if found:
                 fileOccurrences += 1

eric ide

mercurial