31 @param msg initial message (string) |
31 @param msg initial message (string) |
32 @param mq flag indicating a queue commit (boolean) |
32 @param mq flag indicating a queue commit (boolean) |
33 @param merge flag indicating a merge commit (boolean) |
33 @param merge flag indicating a merge commit (boolean) |
34 @param parent parent widget (QWidget) |
34 @param parent parent widget (QWidget) |
35 """ |
35 """ |
36 super(HgCommitDialog, self).__init__(parent, Qt.WindowFlags(Qt.Window)) |
36 super(HgCommitDialog, self).__init__( |
|
37 parent, Qt.WindowFlags(Qt.WindowType.Window)) |
37 self.setupUi(self) |
38 self.setupUi(self) |
38 |
39 |
39 self.__vcs = vcs |
40 self.__vcs = vcs |
40 |
41 |
41 self.logEdit.setPlainText(msg) |
42 self.logEdit.setPlainText(msg) |
66 self.authorComboBox.addItem("") |
67 self.authorComboBox.addItem("") |
67 self.authorComboBox.addItems(commitAuthors) |
68 self.authorComboBox.addItems(commitAuthors) |
68 |
69 |
69 self.dateTimeEdit.setDateTime(QDateTime.currentDateTime()) |
70 self.dateTimeEdit.setDateTime(QDateTime.currentDateTime()) |
70 |
71 |
71 self.logEdit.setFocus(Qt.OtherFocusReason) |
72 self.logEdit.setFocus(Qt.FocusReason.OtherFocusReason) |
72 |
73 |
73 def on_buttonBox_clicked(self, button): |
74 def on_buttonBox_clicked(self, button): |
74 """ |
75 """ |
75 Private slot called by a button of the button box clicked. |
76 Private slot called by a button of the button box clicked. |
76 |
77 |
77 @param button button that was clicked (QAbstractButton) |
78 @param button button that was clicked (QAbstractButton) |
78 """ |
79 """ |
79 if button == self.buttonBox.button(QDialogButtonBox.Cancel): |
80 if button == self.buttonBox.button( |
|
81 QDialogButtonBox.StandardButton.Cancel |
|
82 ): |
80 self.logEdit.clear() |
83 self.logEdit.clear() |
81 |
84 |
82 def on_buttonBox_accepted(self): |
85 def on_buttonBox_accepted(self): |
83 """ |
86 """ |
84 Private slot called by the buttonBox accepted signal. |
87 Private slot called by the buttonBox accepted signal. |