RefactoringRope/ChangesPreviewDialog.py

branch
eric7
changeset 365
f740b50380df
parent 347
b5048b5ff454
child 374
958f34e97952
--- a/RefactoringRope/ChangesPreviewDialog.py	Wed May 26 17:53:08 2021 +0200
+++ b/RefactoringRope/ChangesPreviewDialog.py	Wed May 26 19:07:42 2021 +0200
@@ -7,8 +7,8 @@
 Module implementing the Changes preview dialog.
 """
 
-from PyQt5.QtCore import Qt, pyqtSlot
-from PyQt5.QtWidgets import QDialogButtonBox, QListWidgetItem
+from PyQt6.QtCore import Qt, pyqtSlot
+from PyQt6.QtWidgets import QDialogButtonBox, QListWidgetItem
 
 from .PreviewDialogBase import PreviewDialogBase
 
@@ -17,7 +17,7 @@
     """
     Class implementing the Changes preview dialog.
     """
-    ChangeRole = Qt.UserRole
+    ChangeRole = Qt.ItemDataRole.UserRole
     
     def __init__(self, description, changes, parent):
         """
@@ -33,8 +33,8 @@
         PreviewDialogBase.__init__(self, parent)
         
         self.buttonBox.addButton(
-            self.tr("&Apply Changes"), QDialogButtonBox.AcceptRole)
-        self.buttonBox.addButton(QDialogButtonBox.Cancel)
+            self.tr("&Apply Changes"), QDialogButtonBox.ButtonRole.AcceptRole)
+        self.buttonBox.addButton(QDialogButtonBox.StandardButton.Cancel)
         
         self.description.setText(description)
         for changeTitle, changeText in changes:

eric ide

mercurial