Fix lint
This commit is contained in:
parent
f83696a670
commit
66e4c3286a
@ -31,7 +31,7 @@ from PyQt5.QtCore import QSettings
|
|||||||
|
|
||||||
import qutebrowser
|
import qutebrowser
|
||||||
from qutebrowser.config import configexc
|
from qutebrowser.config import configexc
|
||||||
from qutebrowser.utils import objreg, standarddir, utils, qtutils
|
from qutebrowser.utils import standarddir, utils, qtutils
|
||||||
|
|
||||||
|
|
||||||
# The StateConfig instance
|
# The StateConfig instance
|
||||||
|
@ -152,23 +152,7 @@ class _CrashDialog(QDialog):
|
|||||||
self._pypi_client = autoupdate.PyPIVersionClient(self)
|
self._pypi_client = autoupdate.PyPIVersionClient(self)
|
||||||
self._init_text()
|
self._init_text()
|
||||||
|
|
||||||
contact = QLabel("I'd like to be able to follow up with you, to keep "
|
self._init_contact_input()
|
||||||
"you posted on the status of this crash and get more "
|
|
||||||
"information if I need it - how can I contact you?",
|
|
||||||
wordWrap=True)
|
|
||||||
self._vbox.addWidget(contact)
|
|
||||||
self._contact = QTextEdit(tabChangesFocus=True, acceptRichText=False)
|
|
||||||
try:
|
|
||||||
try:
|
|
||||||
info = configfiles.state['general']['contact-info']
|
|
||||||
except KeyError:
|
|
||||||
self._contact.setPlaceholderText("Mail or IRC nickname")
|
|
||||||
else:
|
|
||||||
self._contact.setPlainText(info)
|
|
||||||
except Exception:
|
|
||||||
log.misc.exception("Failed to get contact information!")
|
|
||||||
self._contact.setPlaceholderText("Mail or IRC nickname")
|
|
||||||
self._vbox.addWidget(self._contact, 2)
|
|
||||||
|
|
||||||
info = QLabel("What were you doing when this crash/bug happened?")
|
info = QLabel("What were you doing when this crash/bug happened?")
|
||||||
self._vbox.addWidget(info)
|
self._vbox.addWidget(info)
|
||||||
@ -202,6 +186,26 @@ class _CrashDialog(QDialog):
|
|||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return utils.get_repr(self)
|
return utils.get_repr(self)
|
||||||
|
|
||||||
|
def _init_contact_input(self):
|
||||||
|
"""Initialize the widget asking for contact info."""
|
||||||
|
contact = QLabel("I'd like to be able to follow up with you, to keep "
|
||||||
|
"you posted on the status of this crash and get more "
|
||||||
|
"information if I need it - how can I contact you?",
|
||||||
|
wordWrap=True)
|
||||||
|
self._vbox.addWidget(contact)
|
||||||
|
self._contact = QTextEdit(tabChangesFocus=True, acceptRichText=False)
|
||||||
|
try:
|
||||||
|
try:
|
||||||
|
info = configfiles.state['general']['contact-info']
|
||||||
|
except KeyError:
|
||||||
|
self._contact.setPlaceholderText("Mail or IRC nickname")
|
||||||
|
else:
|
||||||
|
self._contact.setPlainText(info)
|
||||||
|
except Exception:
|
||||||
|
log.misc.exception("Failed to get contact information!")
|
||||||
|
self._contact.setPlaceholderText("Mail or IRC nickname")
|
||||||
|
self._vbox.addWidget(self._contact, 2)
|
||||||
|
|
||||||
def _init_text(self):
|
def _init_text(self):
|
||||||
"""Initialize the main text to be displayed on an exception.
|
"""Initialize the main text to be displayed on an exception.
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@ import sys
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from qutebrowser.config import config, configfiles, configexc
|
from qutebrowser.config import config, configfiles, configexc
|
||||||
from qutebrowser.utils import objreg
|
|
||||||
|
|
||||||
from PyQt5.QtCore import QSettings
|
from PyQt5.QtCore import QSettings
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user