--- a/eric6/E5Gui/E5OverrideCursor.py Mon Mar 01 17:48:43 2021 +0100 +++ b/eric6/E5Gui/E5OverrideCursor.py Tue Mar 02 17:17:09 2021 +0100 @@ -18,7 +18,7 @@ """ Class implementing a context manager class for an override cursor. """ - def __init__(self, cursorShape=Qt.WaitCursor): + def __init__(self, cursorShape=Qt.CursorShape.WaitCursor): """ Constructor @@ -35,7 +35,8 @@ @rtype E5OverrideCursor """ QGuiApplication.setOverrideCursor(QCursor(self.__cursorShape)) - QGuiApplication.processEvents(QEventLoop.ExcludeUserInputEvents) + QGuiApplication.processEvents( + QEventLoop.ProcessEventsFlag.ExcludeUserInputEvents) return self @@ -51,7 +52,8 @@ @rtype None """ QGuiApplication.restoreOverrideCursor() - QGuiApplication.processEvents(QEventLoop.ExcludeUserInputEvents) + QGuiApplication.processEvents( + QEventLoop.ProcessEventsFlag.ExcludeUserInputEvents) return None # __IGNORE_WARNING_M831__ @@ -80,7 +82,8 @@ if cursor is not None: self.__cursorShape = cursor.shape() QGuiApplication.restoreOverrideCursor() - QGuiApplication.processEvents(QEventLoop.ExcludeUserInputEvents) + QGuiApplication.processEvents( + QEventLoop.ProcessEventsFlag.ExcludeUserInputEvents) return self @@ -97,7 +100,8 @@ """ if self.__cursorShape is not None: QGuiApplication.setOverrideCursor(QCursor(self.__cursorShape)) - QGuiApplication.processEvents(QEventLoop.ExcludeUserInputEvents) + QGuiApplication.processEvents( + QEventLoop.ProcessEventsFlag.ExcludeUserInputEvents) return None # __IGNORE_WARNING_M831__ @@ -106,7 +110,7 @@ """ Class implementing a QProcess subclass controlling an override cursor. """ - def __init__(self, parent=None, cursorShape=Qt.WaitCursor): + def __init__(self, parent=None, cursorShape=Qt.CursorShape.WaitCursor): """ Constructor @@ -128,7 +132,8 @@ Private slot setting the cursor after the process has started. """ QGuiApplication.setOverrideCursor(QCursor(self.__cursorShape)) - QGuiApplication.processEvents(QEventLoop.ExcludeUserInputEvents) + QGuiApplication.processEvents( + QEventLoop.ProcessEventsFlag.ExcludeUserInputEvents) @pyqtSlot() def __processFinished(self): @@ -136,4 +141,5 @@ Private slot resetting the cursor when the process finished. """ QGuiApplication.restoreOverrideCursor() - QGuiApplication.processEvents(QEventLoop.ExcludeUserInputEvents) + QGuiApplication.processEvents( + QEventLoop.ProcessEventsFlag.ExcludeUserInputEvents)