eric6/UI/LogView.py

changeset 7775
4a1db75550bd
parent 7533
88261c96484b
child 7781
607a6098cb44
diff -r 9eed155411f0 -r 4a1db75550bd eric6/UI/LogView.py
--- a/eric6/UI/LogView.py	Sat Oct 10 16:03:53 2020 +0200
+++ b/eric6/UI/LogView.py	Sun Oct 11 17:54:52 2020 +0200
@@ -8,7 +8,7 @@
 """
 
 
-from PyQt5.QtCore import pyqtSignal, Qt, QRegExp
+from PyQt5.QtCore import pyqtSignal, Qt, QRegularExpression
 from PyQt5.QtGui import QBrush, QTextCursor, QTextDocument
 from PyQt5.QtWidgets import (
     QTextEdit, QApplication, QMenu, QWidget, QHBoxLayout, QSizePolicy
@@ -258,9 +258,11 @@
         if wholeWord:
             flags |= QTextDocument.FindWholeWords
         if regexp:
-            ok = self.find(QRegExp(
+            ok = self.find(QRegularExpression(
                 txt,
-                Qt.CaseSensitive if caseSensitive else Qt.CaseInsensitive),
+                QRegularExpression.NoPatternOption
+                if caseSensitive
+                else QRegularExpression.CaseInsensitiveOption),
                 flags
             )
         else:
@@ -289,9 +291,11 @@
         if wholeWord:
             flags |= QTextDocument.FindWholeWords
         if regexp:
-            ok = self.find(QRegExp(
+            ok = self.find(QRegularExpression(
                 txt,
-                Qt.CaseSensitive if caseSensitive else Qt.CaseInsensitive),
+                QRegularExpression.NoPatternOption
+                if caseSensitive
+                else QRegularExpression.CaseInsensitiveOption),
                 flags
             )
         else:

eric ide

mercurial