eric6/Plugins/VcsPlugins/vcsSubversion/SvnCommitDialog.py

branch
maintenance
changeset 8176
31965986ecd1
parent 8151
8c1445825e7b
child 8218
7c09585bd960
equal deleted inserted replaced
8153:e01ae92db699 8176:31965986ecd1
31 31
32 @param vcs reference to the vcs object 32 @param vcs reference to the vcs object
33 @param parent parent widget (QWidget) 33 @param parent parent widget (QWidget)
34 """ 34 """
35 super(SvnCommitDialog, self).__init__( 35 super(SvnCommitDialog, self).__init__(
36 parent, Qt.WindowFlags(Qt.Window)) 36 parent, Qt.WindowFlags(Qt.WindowType.Window))
37 self.setupUi(self) 37 self.setupUi(self)
38 38
39 if vcs.version < (1, 5, 0): 39 if vcs.version < (1, 5, 0):
40 self.changeListsGroup.hide() 40 self.changeListsGroup.hide()
41 else: 41 else:
51 Preferences.Prefs.settings.value('Subversion/Commits')) 51 Preferences.Prefs.settings.value('Subversion/Commits'))
52 self.recentComboBox.clear() 52 self.recentComboBox.clear()
53 self.recentComboBox.addItem("") 53 self.recentComboBox.addItem("")
54 self.recentComboBox.addItems(self.recentCommitMessages) 54 self.recentComboBox.addItems(self.recentCommitMessages)
55 55
56 self.logEdit.setFocus(Qt.OtherFocusReason) 56 self.logEdit.setFocus(Qt.FocusReason.OtherFocusReason)
57 57
58 def logMessage(self): 58 def logMessage(self):
59 """ 59 """
60 Public method to retrieve the log message. 60 Public method to retrieve the log message.
61 61
101 """ 101 """
102 Private slot called by a button of the button box clicked. 102 Private slot called by a button of the button box clicked.
103 103
104 @param button button that was clicked (QAbstractButton) 104 @param button button that was clicked (QAbstractButton)
105 """ 105 """
106 if button == self.buttonBox.button(QDialogButtonBox.Cancel): 106 if button == self.buttonBox.button(
107 QDialogButtonBox.StandardButton.Cancel
108 ):
107 self.logEdit.clear() 109 self.logEdit.clear()
108 110
109 def on_buttonBox_accepted(self): 111 def on_buttonBox_accepted(self):
110 """ 112 """
111 Private slot called by the buttonBox accepted signal. 113 Private slot called by the buttonBox accepted signal.
118 Private slot called by the buttonBox rejected signal. 120 Private slot called by the buttonBox rejected signal.
119 """ 121 """
120 self.close() 122 self.close()
121 self.rejected.emit() 123 self.rejected.emit()
122 124
123 @pyqtSlot(str) 125 @pyqtSlot(int)
124 def on_recentComboBox_activated(self, txt): 126 def on_recentComboBox_activated(self, index):
125 """ 127 """
126 Private slot to select a commit message from recent ones. 128 Private slot to select a commit message from recent ones.
127 129
128 @param txt text of the combo (string) 130 @param index index of the selected entry
131 @type int
129 """ 132 """
133 txt = self.recentComboBox.itemText(index)
130 if txt: 134 if txt:
131 self.logEdit.setPlainText(txt) 135 self.logEdit.setPlainText(txt)

eric ide

mercurial