eric6/Plugins/VcsPlugins/vcsPySvn/SvnBlameDialog.py

changeset 8143
2c730d5fd177
parent 7923
91e843545d9a
child 8218
7c09585bd960
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/SvnBlameDialog.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/Plugins/VcsPlugins/vcsPySvn/SvnBlameDialog.py	Tue Mar 02 17:17:09 2021 +0100
@@ -38,10 +38,12 @@
         super(SvnBlameDialog, 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
         
@@ -89,9 +91,12 @@
         Private 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.__resizeColumns()
         
@@ -103,16 +108,21 @@
         
         @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 __resizeColumns(self):
         """
         Private method to resize the list columns.
         """
-        self.blameList.header().resizeSections(QHeaderView.ResizeToContents)
+        self.blameList.header().resizeSections(
+            QHeaderView.ResizeMode.ResizeToContents)
         
     def __generateItem(self, revision, author, lineno, text):
         """
@@ -126,8 +136,8 @@
         itm = QTreeWidgetItem(
             self.blameList,
             ["{0:d}".format(revision), author, "{0:d}".format(lineno), text])
-        itm.setTextAlignment(0, Qt.AlignRight)
-        itm.setTextAlignment(2, Qt.AlignRight)
+        itm.setTextAlignment(0, Qt.AlignmentFlag.AlignRight)
+        itm.setTextAlignment(2, Qt.AlignmentFlag.AlignRight)
         
     def __showError(self, msg):
         """

eric ide

mercurial