Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0.1, 2.0.2, and 2.0.3

stable bugreport: improve the bugreport dialog

Move the URL to a QLabel as a clickable link. Instead of directing users
directly to the issue tracker, send them to a Wiki page that prominently
displays FixedBugs, the nightly builds, and the open bugs list.

Add a button that copies the text to the clipboard.

Changeset 90821b209461

Parent 78488b7d1073

by Steve Borho

Changes to one file · Browse files at 90821b209461 Showing diff from parent 78488b7d1073 Diff from another changeset...

 
20
21
22
23
 
 
24
25
 
 
 
 
 
26
27
 
28
29
30
 
35
36
37
 
38
39
40
41
42
43
 
 
44
45
46
47
 
48
49
50
51
52
53
 
62
63
64
 
 
 
65
66
67
 
20
21
22
 
23
24
25
 
26
27
28
29
30
31
32
33
34
35
36
 
41
42
43
44
45
46
47
 
48
 
49
50
51
52
53
54
55
56
 
 
57
58
59
 
68
69
70
71
72
73
74
75
76
@@ -20,11 +20,17 @@
  def __init__(self, opts, parent=None):   super(BugReport, self).__init__(parent)   - self.text = self.gettext(opts) + layout = QVBoxLayout() + self.setLayout(layout)   - layout = QVBoxLayout() + lbl = QLabel(_('Please report this bug to our %s bug tracker %s') % + (u'<a href="http://bitbucket.org/tortoisehg/thg/wiki/BugReport">', + u'</a>')) + lbl.setOpenExternalLinks(True) + self.layout().addWidget(lbl)     tb = QTextBrowser() + self.text = self.gettext(opts)   tb.setHtml('<pre>' + Qt.escape(self.text) + '</pre>')   tb.setWordWrapMode(QTextOption.NoWrap)   layout.addWidget(tb) @@ -35,19 +41,19 @@
  bb.accepted.connect(self.accept)   bb.button(BB.Save).clicked.connect(self.save)   bb.button(BB.Ok).setDefault(True) + bb.addButton(_('Copy'), BB.HelpRole).clicked.connect(self.copyText)   bb.addButton(_('Quit'), BB.DestructiveRole).clicked.connect(qApp.quit)   layout.addWidget(bb)   - self.setLayout(layout)   self.setWindowTitle(_('TortoiseHg Bug Report')) - self.setWindowFlags(self.windowFlags() & ~Qt.WindowContextHelpButtonHint) + self.setWindowFlags(self.windowFlags() & \ + ~Qt.WindowContextHelpButtonHint)   self.resize(650, 400)   self._readsettings()     def gettext(self, opts): + # TODO: make this more uniformly unicode safe   text = '{{{\n#!python\n' # Wrap in Bitbucket wiki preformat markers - text += _('** Please report this bug to ' - 'http://bitbucket.org/tortoisehg/thg/issues\n')   text += '** Mercurial version (%s). TortoiseHg version (%s)\n' % (   hglib.hgversion, version.version())   text += '** Command: %s\n' % (hglib.tounicode(opts.get('cmd', 'N/A'))) @@ -62,6 +68,9 @@
  text += '\n}}}'   return text   + def copyText(self): + QApplication.clipboard().setText(self.text) +   def getarch(self):   text = '** Windows version: %s\n' % str(sys.getwindowsversion())   arch = 'unknown (failed to import win32api)'