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

reporegistry: use wildcard import for Qt things

Changeset 566cd99c2146

Parent 4e7b912aa17b

by Adrian Buehlmann

Changes to one file · Browse files at 566cd99c2146 Showing diff from parent 4e7b912aa17b Diff from another changeset...

 
15
16
17
18
 
 
19
20
21
22
23
24
25
 
26
27
28
29
 
30
31
32
33
34
 
35
36
 
37
38
39
 
46
47
48
49
 
50
51
52
 
54
55
56
57
 
58
59
60
 
107
108
109
110
111
 
 
112
113
114
 
184
185
186
187
188
 
 
189
190
191
 
211
212
213
214
 
215
216
217
 
15
16
17
 
18
19
20
 
 
 
 
 
 
21
22
23
24
 
25
26
27
28
29
 
30
31
 
32
33
34
35
 
42
43
44
 
45
46
47
48
 
50
51
52
 
53
54
55
56
 
103
104
105
 
 
106
107
108
109
110
 
180
181
182
 
 
183
184
185
186
187
 
207
208
209
 
210
211
212
213
@@ -15,25 +15,21 @@
 from tortoisehg.hgqt.repotreemodel import RepoTreeModel  from tortoisehg.hgqt.pathedit import PathEditDialog   -from PyQt4 import QtCore, QtGui +from PyQt4.QtCore import * +from PyQt4.QtGui import *   -from PyQt4.QtCore import Qt, QVariant, SIGNAL, SLOT -from PyQt4.QtCore import QModelIndex, QString - -from PyQt4.QtGui import QVBoxLayout, QDockWidget, QFrame - -connect = QtCore.QObject.connect +connect = QObject.connect      def settingsfilename(): - s = QtCore.QSettings() + s = QSettings()   dir = os.path.dirname(str(s.fileName()))   return dir + '/' + 'thg-reporegistry.xml'     -class RepoTreeView(QtGui.QTreeView): +class RepoTreeView(QTreeView):   def __init__(self, parent, workbench): - QtGui.QTreeView.__init__(self) + QTreeView.__init__(self)   self.parent = parent   self.workbench = workbench   self.selitem = None @@ -46,7 +42,7 @@
  # (see http://doc.qt.nokia.com/4.6/model-view-dnd.html)   self.setDragEnabled(True)   self.setAcceptDrops(True) - self.setDragDropMode(QtGui.QAbstractItemView.DragDrop) + self.setDragDropMode(QAbstractItemView.DragDrop)   self.setDropIndicatorShown(True)     self.createActions() @@ -54,7 +50,7 @@
  def contextMenuEvent(self, event):   menulist = self.selitem.internalPointer().menulist()   if len(menulist) > 0: - menu = QtGui.QMenu(self) + menu = QMenu(self)   for act in menulist:   if act:   menu.addAction(self._actions[act]) @@ -107,8 +103,8 @@
  def createActions(self):   self._actions = {}   for name, desc, icon, tip, key, cb in self._action_defs(): - self._actions[name] = QtGui.QAction(desc, self) - QtCore.QTimer.singleShot(0, self.configureActions) + self._actions[name] = QAction(desc, self) + QTimer.singleShot(0, self.configureActions)     def configureActions(self):   for name, desc, icon, tip, key, cb in self._action_defs(): @@ -184,8 +180,8 @@
   class RepoRegistryView(QDockWidget):   - openRepoSignal = QtCore.pyqtSignal(QtCore.QString) - visibilityChanged = QtCore.pyqtSignal(bool) + openRepoSignal = pyqtSignal(QString) + visibilityChanged = pyqtSignal(bool)     def __init__(self, ui, workbench):   QDockWidget.__init__(self, workbench) @@ -211,7 +207,7 @@
  tv.setFirstColumnSpanned(0, QModelIndex(), True)     self.tview.setColumnHidden(1, True) - QtCore.QTimer.singleShot(0, self.expand) + QTimer.singleShot(0, self.expand)     def expand(self):   self.tview.expandToDepth(0)