eric6/HexEdit/HexEditSearchReplaceWidget.py

changeset 7775
4a1db75550bd
parent 7628
f904d0eef264
child 7923
91e843545d9a
--- a/eric6/HexEdit/HexEditSearchReplaceWidget.py	Sat Oct 10 16:03:53 2020 +0200
+++ b/eric6/HexEdit/HexEditSearchReplaceWidget.py	Sun Oct 11 17:54:52 2020 +0200
@@ -7,9 +7,8 @@
 Module implementing a search and replace widget for the hex editor.
 """
 
-
-from PyQt5.QtCore import pyqtSlot, Qt, QByteArray, QRegExp
-from PyQt5.QtGui import QRegExpValidator
+from PyQt5.QtCore import pyqtSlot, Qt, QByteArray, QRegularExpression
+from PyQt5.QtGui import QRegularExpressionValidator
 from PyQt5.QtWidgets import QWidget
 
 from E5Gui.E5Action import E5Action
@@ -42,10 +41,14 @@
         
         # keep this in sync with the logic in __getContent()
         self.__formatAndValidators = {
-            "hex": (self.tr("Hex"), QRegExpValidator((QRegExp("[0-9a-f]*")))),
-            "dec": (self.tr("Dec"), QRegExpValidator((QRegExp("[0-9]*")))),
-            "oct": (self.tr("Oct"), QRegExpValidator((QRegExp("[0-7]*")))),
-            "bin": (self.tr("Bin"), QRegExpValidator((QRegExp("[01]*")))),
+            "hex": (self.tr("Hex"), QRegularExpressionValidator(
+                QRegularExpression("[0-9a-f]*"))),
+            "dec": (self.tr("Dec"), QRegularExpressionValidator(
+                QRegularExpression("[0-9]*"))),
+            "oct": (self.tr("Oct"), QRegularExpressionValidator(
+                QRegularExpression("[0-7]*"))),
+            "bin": (self.tr("Bin"), QRegularExpressionValidator(
+                QRegularExpression("[01]*"))),
             "iso-8859-1": (self.tr("Text"), None),
             # text as latin-1/iso-8859-1
             "utf-8": (self.tr("UTF-8"), None),

eric ide

mercurial