eric6/Network/IRC/IrcWidget.py

changeset 8143
2c730d5fd177
parent 7923
91e843545d9a
child 8218
7c09585bd960
--- a/eric6/Network/IRC/IrcWidget.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/Network/IRC/IrcWidget.py	Tue Mar 02 17:17:09 2021 +0100
@@ -66,10 +66,10 @@
         self.__leaveButton.clicked.connect(self.__leaveChannel)
         self.__leaveButton.setEnabled(False)
         self.channelsWidget.setCornerWidget(
-            self.__leaveButton, Qt.BottomRightCorner)
+            self.__leaveButton, Qt.Corner.BottomRightCorner)
         self.channelsWidget.setTabsClosable(False)
         if not isMacPlatform():
-            self.channelsWidget.setTabPosition(QTabWidget.South)
+            self.channelsWidget.setTabPosition(QTabWidget.TabPosition.South)
         
         height = self.height()
         self.splitter.setSizes([height * 0.6, height * 0.4])
@@ -115,7 +115,8 @@
         ircPic = UI.PixmapCache.getPixmap("irc128")
         self.__emptyLabel = QLabel()
         self.__emptyLabel.setPixmap(ircPic)
-        self.__emptyLabel.setAlignment(Qt.AlignVCenter | Qt.AlignHCenter)
+        self.__emptyLabel.setAlignment(
+            Qt.AlignmentFlag.AlignVCenter | Qt.AlignmentFlag.AlignHCenter)
         self.channelsWidget.addTab(self.__emptyLabel, "")
         
         # all initialized, do connections now
@@ -870,7 +871,7 @@
         @param error error code reported by the socket
             (QAbstractSocket.SocketError)
         """
-        if error == QAbstractSocket.RemoteHostClosedError:
+        if error == QAbstractSocket.SocketError.RemoteHostClosedError:
             # ignore this one, it's a disconnect
             if self.__sslErrorLock:
                 self.networkWidget.addErrorMessage(
@@ -880,19 +881,19 @@
                         """ waiting for user response to an SSL error.""")
                     .format(self.__server.getName(), self.__server.getPort()))
                 self.__connectionState = IrcWidget.ServerDisconnected
-        elif error == QAbstractSocket.HostNotFoundError:
+        elif error == QAbstractSocket.SocketError.HostNotFoundError:
             self.networkWidget.addErrorMessage(
                 self.tr("Socket Error"),
                 self.tr(
                     "The host was not found. Please check the host name"
                     " and port settings."))
-        elif error == QAbstractSocket.ConnectionRefusedError:
+        elif error == QAbstractSocket.SocketError.ConnectionRefusedError:
             self.networkWidget.addErrorMessage(
                 self.tr("Socket Error"),
                 self.tr(
                     "The connection was refused by the peer. Please check the"
                     " host name and port settings."))
-        elif error == QAbstractSocket.SslHandshakeFailedError:
+        elif error == QAbstractSocket.SocketError.SslHandshakeFailedError:
             self.networkWidget.addErrorMessage(
                 self.tr("Socket Error"),
                 self.tr("The SSL handshake failed."))

eric ide

mercurial