--- a/eric6/Preferences/ConfigurationPages/DebuggerGeneralPage.py Sat Mar 06 10:00:52 2021 +0100 +++ b/eric6/Preferences/ConfigurationPages/DebuggerGeneralPage.py Sun Mar 28 15:00:11 2021 +0200 @@ -272,10 +272,11 @@ None, self.tr("Add allowed host"), self.tr("Enter the IP address of an allowed host"), - QLineEdit.Normal) + QLineEdit.EchoMode.Normal) if ok and allowedHost: if QHostAddress(allowedHost).protocol() in [ - QAbstractSocket.IPv4Protocol, QAbstractSocket.IPv6Protocol + QAbstractSocket.NetworkLayerProtocol.IPv4Protocol, + QAbstractSocket.NetworkLayerProtocol.IPv6Protocol ]: self.allowedHostsList.addItem(allowedHost) else: @@ -305,11 +306,12 @@ None, self.tr("Edit allowed host"), self.tr("Enter the IP address of an allowed host"), - QLineEdit.Normal, + QLineEdit.EchoMode.Normal, allowedHost) if ok and allowedHost: if QHostAddress(allowedHost).protocol() in [ - QAbstractSocket.IPv4Protocol, QAbstractSocket.IPv6Protocol + QAbstractSocket.NetworkLayerProtocol.IPv4Protocol, + QAbstractSocket.NetworkLayerProtocol.IPv6Protocol ]: self.allowedHostsList.currentItem().setText(allowedHost) else: @@ -415,9 +417,9 @@ @return item flags @rtype QtCore.Qt.ItemFlag """ - return Qt.ItemIsEnabled | Qt.ItemIsSelectable + return Qt.ItemFlag.ItemIsEnabled | Qt.ItemFlag.ItemIsSelectable - def data(self, index, role=Qt.DisplayRole): + def data(self, index, role=Qt.ItemDataRole.DisplayRole): """ Public Qt slot get the role data of item. @@ -428,9 +430,9 @@ @return role data of item @rtype str, QBrush or None """ - if role == Qt.DisplayRole: + if role == Qt.ItemDataRole.DisplayRole: return self.tr("Variable Name") - elif role == Qt.BackgroundRole: + elif role == Qt.ItemDataRole.BackgroundRole: if index.row() >= 2: return self.bgColorChanged else: