eric6/UI/DeleteFilesConfirmationDialog.py

changeset 8143
2c730d5fd177
parent 7923
91e843545d9a
child 8218
7c09585bd960
--- a/eric6/UI/DeleteFilesConfirmationDialog.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/UI/DeleteFilesConfirmationDialog.py	Tue Mar 02 17:17:09 2021 +0100
@@ -29,9 +29,12 @@
         self.setupUi(self)
         self.setModal(True)
         
-        self.buttonBox.button(QDialogButtonBox.Yes).setAutoDefault(False)
-        self.buttonBox.button(QDialogButtonBox.No).setDefault(True)
-        self.buttonBox.button(QDialogButtonBox.No).setFocus()
+        self.buttonBox.button(
+            QDialogButtonBox.StandardButton.Yes).setAutoDefault(False)
+        self.buttonBox.button(
+            QDialogButtonBox.StandardButton.No).setDefault(True)
+        self.buttonBox.button(
+            QDialogButtonBox.StandardButton.No).setFocus()
         
         self.setWindowTitle(caption)
         self.message.setText(message)
@@ -44,7 +47,11 @@
         
         @param button button that was clicked (QAbstractButton)
         """
-        if button == self.buttonBox.button(QDialogButtonBox.Yes):
+        if button == self.buttonBox.button(
+            QDialogButtonBox.StandardButton.Yes
+        ):
             self.accept()
-        elif button == self.buttonBox.button(QDialogButtonBox.No):
+        elif button == self.buttonBox.button(
+            QDialogButtonBox.StandardButton.No
+        ):
             self.reject()

eric ide

mercurial