Rename some variables (fix pylint warnings)

This commit is contained in:
Sébastien Helleu 2014-07-16 07:57:34 +02:00
parent 87a9710d1d
commit 42f2f7ee59

View file

@ -36,23 +36,23 @@ class ConnectionDialog(QtGui.QDialog):
grid.setSpacing(10) grid.setSpacing(10)
self.fields = {} self.fields = {}
for y, field in enumerate(('server', 'port', 'password', 'lines')): for line, field in enumerate(('server', 'port', 'password', 'lines')):
grid.addWidget(QtGui.QLabel(field.capitalize()), y, 0) grid.addWidget(QtGui.QLabel(field.capitalize()), line, 0)
lineEdit = QtGui.QLineEdit() line_edit = QtGui.QLineEdit()
lineEdit.setFixedWidth(200) line_edit.setFixedWidth(200)
if field == 'password': if field == 'password':
lineEdit.setEchoMode(QtGui.QLineEdit.Password) line_edit.setEchoMode(QtGui.QLineEdit.Password)
if field == 'lines': if field == 'lines':
validator = QtGui.QIntValidator(0, 2147483647, self) validator = QtGui.QIntValidator(0, 2147483647, self)
lineEdit.setValidator(validator) line_edit.setValidator(validator)
lineEdit.setFixedWidth(80) line_edit.setFixedWidth(80)
lineEdit.insert(self.values[field]) line_edit.insert(self.values[field])
grid.addWidget(lineEdit, y, 1) grid.addWidget(line_edit, line, 1)
self.fields[field] = lineEdit self.fields[field] = line_edit
if field == 'port': if field == 'port':
ssl = QtGui.QCheckBox('SSL') ssl = QtGui.QCheckBox('SSL')
ssl.setChecked(self.values['ssl'] == 'on') ssl.setChecked(self.values['ssl'] == 'on')
grid.addWidget(ssl, y, 2) grid.addWidget(ssl, line, 2)
self.fields['ssl'] = ssl self.fields['ssl'] = ssl
self.dialog_buttons = QtGui.QDialogButtonBox() self.dialog_buttons = QtGui.QDialogButtonBox()