--- a/eric6/Templates/TemplatePropertiesDialog.py Sat Oct 10 16:03:53 2020 +0200 +++ b/eric6/Templates/TemplatePropertiesDialog.py Sun Oct 11 17:54:52 2020 +0200 @@ -7,9 +7,8 @@ Module implementing the templates properties dialog. """ - -from PyQt5.QtCore import QRegExp, Qt, pyqtSlot -from PyQt5.QtGui import QRegExpValidator +from PyQt5.QtCore import pyqtSlot, Qt, QRegularExpression +from PyQt5.QtGui import QRegularExpressionValidator from PyQt5.QtWidgets import QDialog from .Ui_TemplatePropertiesDialog import Ui_TemplatePropertiesDialog @@ -45,8 +44,8 @@ """ must only consist of letters (a-z and A-Z),""" """ digits (0-9) and underscores (_).</p>""" )) - self.__nameValidator = QRegExpValidator(QRegExp("[a-zA-Z0-9_]+"), - self.nameEdit) + self.__nameValidator = QRegularExpressionValidator( + QRegularExpression("[a-zA-Z0-9_]+"), self.nameEdit) self.nameEdit.setValidator(self.__nameValidator) import QScintilla.Lexers