32 @param amend flag indicating to amend the HEAD commit (boolean) |
32 @param amend flag indicating to amend the HEAD commit (boolean) |
33 @param commitAll flag indicating to commit all local changes (boolean) |
33 @param commitAll flag indicating to commit all local changes (boolean) |
34 @param parent parent widget (QWidget) |
34 @param parent parent widget (QWidget) |
35 """ |
35 """ |
36 super(GitCommitDialog, self).__init__( |
36 super(GitCommitDialog, self).__init__( |
37 parent, Qt.WindowFlags(Qt.Window)) |
37 parent, Qt.WindowFlags(Qt.WindowType.Window)) |
38 self.setupUi(self) |
38 self.setupUi(self) |
39 |
39 |
40 self.__vcs = vcs |
40 self.__vcs = vcs |
41 |
41 |
42 self.logEdit.setPlainText(msg) |
42 self.logEdit.setPlainText(msg) |
107 """ |
107 """ |
108 Private slot called by a button of the button box clicked. |
108 Private slot called by a button of the button box clicked. |
109 |
109 |
110 @param button button that was clicked (QAbstractButton) |
110 @param button button that was clicked (QAbstractButton) |
111 """ |
111 """ |
112 if button == self.buttonBox.button(QDialogButtonBox.Cancel): |
112 if button == self.buttonBox.button( |
|
113 QDialogButtonBox.StandardButton.Cancel |
|
114 ): |
113 self.logEdit.clear() |
115 self.logEdit.clear() |
114 |
116 |
115 def on_buttonBox_accepted(self): |
117 def on_buttonBox_accepted(self): |
116 """ |
118 """ |
117 Private slot called by the buttonBox accepted signal. |
119 Private slot called by the buttonBox accepted signal. |
124 Private slot called by the buttonBox rejected signal. |
126 Private slot called by the buttonBox rejected signal. |
125 """ |
127 """ |
126 self.close() |
128 self.close() |
127 self.rejected.emit() |
129 self.rejected.emit() |
128 |
130 |
129 @pyqtSlot(str) |
131 @pyqtSlot(int) |
130 def on_recentComboBox_activated(self, txt): |
132 def on_recentComboBox_activated(self, index): |
131 """ |
133 """ |
132 Private slot to select a commit message from recent ones. |
134 Private slot to select a commit message from recent ones. |
133 |
135 |
134 @param txt text of the selected entry (string) |
136 @param index index of the selected entry |
|
137 @type int |
135 """ |
138 """ |
|
139 txt = self.recentComboBox.itemText(index) |
136 if txt: |
140 if txt: |
137 self.logEdit.setPlainText(self.recentComboBox.currentData()) |
141 self.logEdit.setPlainText(self.recentComboBox.currentData()) |