eric6/Plugins/VcsPlugins/vcsMercurial/HgCommitDialog.py

changeset 8143
2c730d5fd177
parent 7923
91e843545d9a
child 8151
8c1445825e7b
--- a/eric6/Plugins/VcsPlugins/vcsMercurial/HgCommitDialog.py	Mon Mar 01 17:48:43 2021 +0100
+++ b/eric6/Plugins/VcsPlugins/vcsMercurial/HgCommitDialog.py	Tue Mar 02 17:17:09 2021 +0100
@@ -33,7 +33,8 @@
         @param merge flag indicating a merge commit (boolean)
         @param parent parent widget (QWidget)
         """
-        super(HgCommitDialog, self).__init__(parent, Qt.WindowFlags(Qt.Window))
+        super(HgCommitDialog, self).__init__(
+            parent, Qt.WindowFlags(Qt.WindowType.Window))
         self.setupUi(self)
         
         self.__vcs = vcs
@@ -68,7 +69,7 @@
         
         self.dateTimeEdit.setDateTime(QDateTime.currentDateTime())
         
-        self.logEdit.setFocus(Qt.OtherFocusReason)
+        self.logEdit.setFocus(Qt.FocusReason.OtherFocusReason)
     
     def on_buttonBox_clicked(self, button):
         """
@@ -76,7 +77,9 @@
         
         @param button button that was clicked (QAbstractButton)
         """
-        if button == self.buttonBox.button(QDialogButtonBox.Cancel):
+        if button == self.buttonBox.button(
+            QDialogButtonBox.StandardButton.Cancel
+        ):
             self.logEdit.clear()
     
     def on_buttonBox_accepted(self):

eric ide

mercurial