eric6/Plugins/VcsPlugins/vcsGit/GitPatchStatisticsDialog.py

changeset 8143
2c730d5fd177
parent 7923
91e843545d9a
child 8218
7c09585bd960
--- a/eric6/Plugins/VcsPlugins/vcsGit/GitPatchStatisticsDialog.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/Plugins/VcsPlugins/vcsGit/GitPatchStatisticsDialog.py	Tue Mar 02 17:17:09 2021 +0100
@@ -32,13 +32,14 @@
         """
         super(GitPatchStatisticsDialog, self).__init__(parent)
         self.setupUi(self)
-        self.setWindowFlags(Qt.Window)
+        self.setWindowFlags(Qt.WindowType.Window)
         
         self.__vcs = vcs
         
         self.changesTreeWidget.headerItem().setText(
             self.changesTreeWidget.columnCount(), "")
-        self.changesTreeWidget.header().setSortIndicator(2, Qt.AscendingOrder)
+        self.changesTreeWidget.header().setSortIndicator(
+            2, Qt.SortOrder.AscendingOrder)
     
     def start(self, projectDir, patchCheckData):
         """
@@ -62,7 +63,7 @@
         
         from .GitPatchFilesDialog import GitPatchFilesDialog
         dlg = GitPatchFilesDialog(repodir, patchCheckData)
-        if dlg.exec() == QDialog.Accepted:
+        if dlg.exec() == QDialog.DialogCode.Accepted:
             patchFilesList, stripCount, inaccurateEof, recount = dlg.getData()
             self.__patchCheckData = (patchFilesList, stripCount,
                                      inaccurateEof, recount)
@@ -139,15 +140,15 @@
         insertions, deletions, filename = line.strip().split(None, 2)
         itm = QTreeWidgetItem(self.changesTreeWidget,
                               [insertions, deletions, filename])
-        itm.setTextAlignment(0, Qt.AlignRight)
-        itm.setTextAlignment(1, Qt.AlignRight)
+        itm.setTextAlignment(0, Qt.AlignmentFlag.AlignRight)
+        itm.setTextAlignment(1, Qt.AlignmentFlag.AlignRight)
     
     def __resizeColumns(self):
         """
         Private method to resize the list columns.
         """
         self.changesTreeWidget.header().resizeSections(
-            QHeaderView.ResizeToContents)
+            QHeaderView.ResizeMode.ResizeToContents)
         self.changesTreeWidget.header().setStretchLastSection(True)
     
     def getData(self):

eric ide

mercurial