eric6/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardCharactersDialog.py

changeset 7775
4a1db75550bd
parent 7360
9190402e4505
child 7923
91e843545d9a
diff -r 9eed155411f0 -r 4a1db75550bd eric6/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardCharactersDialog.py
--- a/eric6/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardCharactersDialog.py	Sat Oct 10 16:03:53 2020 +0200
+++ b/eric6/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardCharactersDialog.py	Sun Oct 11 17:54:52 2020 +0200
@@ -7,9 +7,8 @@
 Module implementing a dialog for entering character classes.
 """
 
-
-from PyQt5.QtCore import QRegExp
-from PyQt5.QtGui import QRegExpValidator
+from PyQt5.QtCore import QRegularExpression
+from PyQt5.QtGui import QRegularExpressionValidator
 from PyQt5.QtWidgets import (
     QSizePolicy, QSpacerItem, QWidget, QHBoxLayout, QLineEdit, QPushButton,
     QDialog, QScrollArea, QComboBox, QVBoxLayout, QLabel
@@ -60,9 +59,12 @@
         self.singleComboItems.append(self.tr("Horizontal tabulator (\\t)"))
         self.singleComboItems.append(self.tr("Vertical tabulator (\\v)"))
         
-        self.charValidator = QRegExpValidator(QRegExp(".{0,1}"), self)
-        self.hexValidator = QRegExpValidator(QRegExp("[0-9a-fA-F]{0,4}"), self)
-        self.octValidator = QRegExpValidator(QRegExp("[0-3]?[0-7]{0,2}"), self)
+        self.charValidator = QRegularExpressionValidator(
+            QRegularExpression(".{0,1}"), self)
+        self.hexValidator = QRegularExpressionValidator(
+            QRegularExpression("[0-9a-fA-F]{0,4}"), self)
+        self.octValidator = QRegularExpressionValidator(
+            QRegularExpression("[0-3]?[0-7]{0,2}"), self)
         
         # generate dialog part for single characters
         self.singlesBoxLayout = QVBoxLayout(self.singlesBox)

eric ide

mercurial