Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

revmessage: use wildcard Qt import style

Changeset e01ad3533818

Parent 25fec0753797

by Adrian Buehlmann

Changes to one file · Browse files at e01ad3533818 Showing diff from parent 25fec0753797 Diff from another changeset...

 
16
17
18
19
20
21
22
 
 
23
24
25
 
34
35
36
37
 
38
39
 
40
41
42
 
43
44
 
45
46
47
48
 
 
49
50
51
52
53
54
 
55
56
57
 
59
60
61
62
 
63
64
65
 
16
17
18
 
 
 
 
19
20
21
22
23
 
32
33
34
 
35
36
 
37
38
39
 
40
41
 
42
43
44
 
 
45
46
47
48
49
50
51
 
52
53
54
55
 
57
58
59
 
60
61
62
63
@@ -16,10 +16,8 @@
   import re   -from PyQt4 import QtCore, QtGui -Qt = QtCore.Qt -connect = QtCore.QObject.connect -SIGNAL = QtCore.SIGNAL +from PyQt4.QtCore import * +from PyQt4.QtGui import *    from tortoisehg.util.util import xml_escape, tounicode   @@ -34,24 +32,24 @@
   revhashprefix = 'rev_hash_'   -class RevMessage(QtGui.QWidget): +class RevMessage(QWidget):   - revisionLinkClicked = QtCore.pyqtSignal(str) + revisionLinkClicked = pyqtSignal(str)     def __init__(self, parent=None): - QtGui.QWidget.__init__(self, parent) + QWidget.__init__(self, parent)   - vb = QtGui.QVBoxLayout() + vb = QVBoxLayout()   vb.setMargin(0)   - self._message = w = QtGui.QTextBrowser() - w.setFont(QtGui.QFont('Monospace', 9)) + self._message = w = QTextBrowser() + w.setFont(QFont('Monospace', 9))   w.setOpenLinks(False)   vb.addWidget(w)     self.setLayout(vb)   - connect(self._message, SIGNAL('anchorClicked(QUrl)'), self.anchorClicked) + self._message.anchorClicked.connect(self.anchorClicked)     def anchorClicked(self, qurl):   link = str(qurl.toString()) @@ -59,7 +57,7 @@
  rev = link[len(revhashprefix):]   self.revisionLinkClicked.emit(rev)   else: - QtGui.QDesktopServices.openUrl(qurl) + QDesktopServices.openUrl(qurl)     def displayRevision(self, ctx):   self.ctx = ctx