eric6/Plugins/VcsPlugins/vcsPySvn/SvnChangeListsDialog.py

changeset 8143
2c730d5fd177
parent 7923
91e843545d9a
child 8218
7c09585bd960
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/SvnChangeListsDialog.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/Plugins/VcsPlugins/vcsPySvn/SvnChangeListsDialog.py	Tue Mar 02 17:17:09 2021 +0100
@@ -37,10 +37,12 @@
         super(SvnChangeListsDialog, self).__init__(parent)
         self.setupUi(self)
         SvnDialogMixin.__init__(self)
-        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.vcs = vcs
         
@@ -101,17 +103,21 @@
         """
         self.changeLists.addItems(sorted(self.changeListsDict.keys()))
         
-        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)
         
         if len(self.changeListsDict) == 0:
             self.changeLists.addItem(self.tr("No changelists found"))
-            self.buttonBox.button(QDialogButtonBox.Close).setFocus(
-                Qt.OtherFocusReason)
+            self.buttonBox.button(
+                QDialogButtonBox.StandardButton.Close).setFocus(
+                    Qt.FocusReason.OtherFocusReason)
         else:
             self.changeLists.setCurrentRow(0)
-            self.changeLists.setFocus(Qt.OtherFocusReason)
+            self.changeLists.setFocus(Qt.FocusReason.OtherFocusReason)
     
     def on_buttonBox_clicked(self, button):
         """
@@ -119,8 +125,12 @@
         
         @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.cancelled = True
             self.__finish()

eric ide

mercurial