--- a/eric6/Network/IRC/IrcNetworkEditDialog.py Mon Mar 01 17:48:43 2021 +0100 +++ b/eric6/Network/IRC/IrcNetworkEditDialog.py Tue Mar 02 17:17:09 2021 +0100 @@ -46,7 +46,8 @@ self.addChannelButton.setIcon(UI.PixmapCache.getIcon("plus")) self.deleteChannelButton.setIcon(UI.PixmapCache.getIcon("minus")) - self.__okButton = self.buttonBox.button(QDialogButtonBox.Ok) + self.__okButton = self.buttonBox.button( + QDialogButtonBox.StandardButton.Ok) if networkName: self.__network = copy.deepcopy( @@ -116,14 +117,17 @@ index = 0 self.identityCombo.setCurrentIndex(index) - @pyqtSlot(str) - def on_identityCombo_currentIndexChanged(self, identity): + @pyqtSlot(int) + def on_identityCombo_currentIndexChanged(self, index): """ Private slot to handle the selection of an identity. - @param identity selected entity (string) + @param index index of the selected entry + @type int """ from .IrcNetworkManager import IrcIdentity + + identity = self.identitiesCombo.itemText(index) if identity == IrcIdentity.DefaultIdentityDisplay: identity = IrcIdentity.DefaultIdentityName self.__network.setIdentityName(identity) @@ -155,7 +159,7 @@ """ from .IrcServerEditDialog import IrcServerEditDialog dlg = IrcServerEditDialog(self.__network.getServer()) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: self.__network.setServer(dlg.getServer()) self.serverEdit.setText(self.__network.getServerName()) @@ -237,7 +241,7 @@ from .IrcChannelEditDialog import IrcChannelEditDialog dlg = IrcChannelEditDialog(name, key, autoJoin, itm is not None, self) - if dlg.exec() == QDialog.Accepted: + if dlg.exec() == QDialog.DialogCode.Accepted: from .IrcNetworkManager import IrcChannel name, key, autoJoin = dlg.getData() channel = IrcChannel(name)