--- a/eric6/E5Network/E5XmlRpcClient.py Mon Mar 01 17:48:43 2021 +0100 +++ b/eric6/E5Network/E5XmlRpcClient.py Tue Mar 02 17:17:09 2021 +0100 @@ -49,7 +49,8 @@ self.__request = QNetworkRequest(QUrl(url)) self.__request.setRawHeader(b"User-Agent", b"E5XmlRpcClient/1.0") - self.__request.setHeader(QNetworkRequest.ContentTypeHeader, "text/xml") + self.__request.setHeader( + QNetworkRequest.KnownHeaders.ContentTypeHeader, "text/xml") def setUrl(self, url): """ @@ -77,8 +78,9 @@ if not isinstance(args, tuple): raise TypeError("argument 'args' must be tuple") - QGuiApplication.setOverrideCursor(QCursor(Qt.WaitCursor)) - QGuiApplication.processEvents(QEventLoop.ExcludeUserInputEvents) + QGuiApplication.setOverrideCursor(QCursor(Qt.CursorShape.WaitCursor)) + QGuiApplication.processEvents( + QEventLoop.ProcessEventsFlag.ExcludeUserInputEvents) data = xmlrpc.dumps(args, method).encode("utf-8") reply = self.__networkManager.post( @@ -101,7 +103,8 @@ @param errors list of SSL errors (list of QSslError) """ QGuiApplication.restoreOverrideCursor() - QGuiApplication.processEvents(QEventLoop.ExcludeUserInputEvents) + QGuiApplication.processEvents( + QEventLoop.ProcessEventsFlag.ExcludeUserInputEvents) ignored = self.__sslErrorHandler.sslErrorsReply(reply, errors)[0] if ignored == E5SslErrorHandler.NotIgnored and reply in self.__callmap: @@ -118,9 +121,10 @@ return QGuiApplication.restoreOverrideCursor() - QGuiApplication.processEvents(QEventLoop.ExcludeUserInputEvents) + QGuiApplication.processEvents( + QEventLoop.ProcessEventsFlag.ExcludeUserInputEvents) - if reply.error() != QNetworkReply.NoError: + if reply.error() != QNetworkReply.NetworkError.NoError: self.__callmap[reply][1](xmlrpc.TRANSPORT_ERROR, reply.errorString()) else: