mirror of https://gitlab.com/openlp/openlp.git
exception form: code standards
This commit is contained in:
parent
4f1933dcfe
commit
8fed2230d3
|
@ -85,7 +85,7 @@ class Ui_ExceptionDialog(object):
|
||||||
self.exception_layout.addWidget(self.button_box)
|
self.exception_layout.addWidget(self.button_box)
|
||||||
|
|
||||||
self.retranslateUi(exception_dialog)
|
self.retranslateUi(exception_dialog)
|
||||||
self.description_text_edit.textChanged.connect(self.onDescriptionUpdated)
|
self.description_text_edit.textChanged.connect(self.on_description_updated)
|
||||||
|
|
||||||
def retranslateUi(self, exception_dialog):
|
def retranslateUi(self, exception_dialog):
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -113,8 +113,8 @@ class ExceptionForm(QtGui.QDialog, Ui_ExceptionDialog):
|
||||||
Show the dialog.
|
Show the dialog.
|
||||||
"""
|
"""
|
||||||
self.description_text_edit.setPlainText(u'')
|
self.description_text_edit.setPlainText(u'')
|
||||||
self.onDescriptionUpdated()
|
self.on_description_updated()
|
||||||
self.fileAttachment = None
|
self.file_attachment = None
|
||||||
return QtGui.QDialog.exec_(self)
|
return QtGui.QDialog.exec_(self)
|
||||||
|
|
||||||
def _createReport(self):
|
def _createReport(self):
|
||||||
|
@ -206,11 +206,11 @@ class ExceptionForm(QtGui.QDialog, Ui_ExceptionDialog):
|
||||||
mailto_url = QtCore.QUrl(u'mailto:bugs@openlp.org')
|
mailto_url = QtCore.QUrl(u'mailto:bugs@openlp.org')
|
||||||
mailto_url.addQueryItem(u'subject', subject)
|
mailto_url.addQueryItem(u'subject', subject)
|
||||||
mailto_url.addQueryItem(u'body', body % content)
|
mailto_url.addQueryItem(u'body', body % content)
|
||||||
if self.fileAttachment:
|
if self.file_attachment:
|
||||||
mailto_url.addQueryItem(u'attach', self.fileAttachment)
|
mailto_url.addQueryItem(u'attach', self.file_attachment)
|
||||||
QtGui.QDesktopServices.openUrl(mailto_url)
|
QtGui.QDesktopServices.openUrl(mailto_url)
|
||||||
|
|
||||||
def onDescriptionUpdated(self):
|
def on_description_updated(self):
|
||||||
"""
|
"""
|
||||||
Update the minimum number of characters needed in the description.
|
Update the minimum number of characters needed in the description.
|
||||||
"""
|
"""
|
||||||
|
@ -232,7 +232,7 @@ class ExceptionForm(QtGui.QDialog, Ui_ExceptionDialog):
|
||||||
Settings().value(self.settings_section + u'/last directory'), u'%s (*.*) (*)' % UiStrings().AllFiles)
|
Settings().value(self.settings_section + u'/last directory'), u'%s (*.*) (*)' % UiStrings().AllFiles)
|
||||||
log.info(u'New files(s) %s', unicode(files))
|
log.info(u'New files(s) %s', unicode(files))
|
||||||
if files:
|
if files:
|
||||||
self.fileAttachment = unicode(files)
|
self.file_attachment = unicode(files)
|
||||||
|
|
||||||
def __buttonState(self, state):
|
def __buttonState(self, state):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in New Issue