eric6/UI/CompareDialog.py

changeset 8143
2c730d5fd177
parent 7988
c4c17121eff8
child 8176
31965986ecd1
child 8218
7c09585bd960
--- a/eric6/UI/CompareDialog.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/UI/CompareDialog.py	Tue Mar 02 17:17:09 2021 +0100
@@ -105,7 +105,7 @@
         self.file2Picker.setMode(E5PathPickerModes.OpenFileMode)
         
         self.diffButton = self.buttonBox.addButton(
-            self.tr("Compare"), QDialogButtonBox.ActionRole)
+            self.tr("Compare"), QDialogButtonBox.ButtonRole.ActionRole)
         self.diffButton.setToolTip(
             self.tr("Press to perform the comparison of the two files"))
         self.diffButton.setEnabled(False)
@@ -200,7 +200,7 @@
         @param interLine flag indicating interline changes (boolean)
         """
         tc = pane.textCursor()
-        tc.movePosition(QTextCursor.End)
+        tc.movePosition(QTextCursor.MoveOperation.End)
         pane.setTextCursor(tc)
         pane.setCurrentCharFormat(charFormat)
         if interLine:
@@ -210,12 +210,12 @@
                     if txt.count('\1'):
                         txt1, txt = txt.split('\1', 1)
                         tc = pane.textCursor()
-                        tc.movePosition(QTextCursor.End)
+                        tc.movePosition(QTextCursor.MoveOperation.End)
                         pane.setTextCursor(tc)
                         pane.setCurrentCharFormat(charFormat)
                         pane.insertPlainText(txt1)
                     tc = pane.textCursor()
-                    tc.movePosition(QTextCursor.End)
+                    tc.movePosition(QTextCursor.MoveOperation.End)
                     pane.setTextCursor(tc)
                     pane.setCurrentCharFormat(self.cNormalFormat)
                     pane.insertPlainText(txt)
@@ -489,7 +489,7 @@
         @param event reference to the event object (QEvent)
         @return flag indicating, whether the event was handled (boolean)
         """
-        if event.type() == QEvent.Close:
+        if event.type() == QEvent.Type.Close:
             QApplication.exit()
             return True
         

eric ide

mercurial