eric6/Plugins/VcsPlugins/vcsPySvn/SvnDialog.py

changeset 8143
2c730d5fd177
parent 8047
b5594178c7fa
child 8176
31965986ecd1
child 8218
7c09585bd960
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/SvnDialog.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/Plugins/VcsPlugins/vcsPySvn/SvnDialog.py	Tue Mar 02 17:17:09 2021 +0100
@@ -38,10 +38,12 @@
         super(SvnDialog, self).__init__(parent)
         self.setupUi(self)
         SvnDialogMixin.__init__(self, log)
-        self.setWindowFlags(Qt.Window)
+        self.setWindowFlags(Qt.WindowType.Window)
         
-        self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False)
-        self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True)
+        self.buttonBox.button(
+            QDialogButtonBox.StandardButton.Close).setEnabled(False)
+        self.buttonBox.button(
+            QDialogButtonBox.StandardButton.Cancel).setDefault(True)
         
         self.outputGroup.setTitle(text)
         self.errorGroup.hide()
@@ -128,9 +130,12 @@
         Public slot called when the process finished or the user pressed the
         button.
         """
-        self.buttonBox.button(QDialogButtonBox.Close).setEnabled(True)
-        self.buttonBox.button(QDialogButtonBox.Cancel).setEnabled(False)
-        self.buttonBox.button(QDialogButtonBox.Close).setDefault(True)
+        self.buttonBox.button(
+            QDialogButtonBox.StandardButton.Close).setEnabled(True)
+        self.buttonBox.button(
+            QDialogButtonBox.StandardButton.Cancel).setEnabled(False)
+        self.buttonBox.button(
+            QDialogButtonBox.StandardButton.Close).setDefault(True)
         
         self._cancel()
         
@@ -143,9 +148,13 @@
         
         @param button button that was clicked (QAbstractButton)
         """
-        if button == self.buttonBox.button(QDialogButtonBox.Close):
+        if button == self.buttonBox.button(
+            QDialogButtonBox.StandardButton.Close
+        ):
             self.close()
-        elif button == self.buttonBox.button(QDialogButtonBox.Cancel):
+        elif button == self.buttonBox.button(
+            QDialogButtonBox.StandardButton.Cancel
+        ):
             self.finish()
         
     def hasAddOrDelete(self):

eric ide

mercurial