From 4cea5e8b43756c593111a057d0640288f2b4b15f Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Sat, 12 Mar 2016 22:22:21 +0100 Subject: [PATCH] Fix traceback in the bug-report dialog. Fixes bug 1554428. Fixes: https://launchpad.net/bugs/1554428 --- openlp/core/ui/exceptionform.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/openlp/core/ui/exceptionform.py b/openlp/core/ui/exceptionform.py index e985829ba..2e4661579 100644 --- a/openlp/core/ui/exceptionform.py +++ b/openlp/core/ui/exceptionform.py @@ -180,11 +180,13 @@ class ExceptionForm(QtWidgets.QDialog, Ui_ExceptionDialog, RegistryProperties): if ':' in line: exception = line.split('\n')[-1].split(':')[0] subject = 'Bug report: %s in %s' % (exception, source) - mail_to_url = QtCore.QUrlQuery('mailto:bugs@openlp.org') - mail_to_url.addQueryItem('subject', subject) - mail_to_url.addQueryItem('body', self.report_text % content) + mail_urlquery = QtCore.QUrlQuery() + mail_urlquery.addQueryItem('subject', subject) + mail_urlquery.addQueryItem('body', self.report_text % content) if self.file_attachment: - mail_to_url.addQueryItem('attach', self.file_attachment) + mail_urlquery.addQueryItem('attach', self.file_attachment) + mail_to_url = QtCore.QUrl('mailto:bugs@openlp.org') + mail_to_url.setQuery(mail_urlquery) QtGui.QDesktopServices.openUrl(mail_to_url) def on_description_updated(self):