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

grep: use data wrapper to avoid implicit QString conversion

Changeset 4aa1fd6acfc8

Parent 675348eb3c74

by Steve Borho

Changes to one file · Browse files at 4aa1fd6acfc8 Showing diff from parent 675348eb3c74 Diff from another changeset...

 
202
203
204
205
 
206
207
208
 
213
214
215
 
 
 
216
217
218
 
247
248
249
250
 
 
251
252
253
 
304
305
306
307
 
 
308
309
310
 
403
404
405
406
407
408
409
 
424
425
426
427
428
429
430
 
202
203
204
 
205
206
207
208
 
213
214
215
216
217
218
219
220
221
 
250
251
252
 
253
254
255
256
257
 
308
309
310
 
311
312
313
314
315
 
408
409
410
 
411
412
413
 
428
429
430
 
431
432
433
@@ -202,7 +202,7 @@
  self.regexple.setEnabled(False)   self.connect(self.thread, SIGNAL('finished'), self.finished)   self.connect(self.thread, SIGNAL('matchedRow'), - lambda row: model.appendRow(*row)) + lambda wrapper: model.appendRow(*wrapper.data))   self.emit(SIGNAL('loadBegin'))   self.thread.start()   @@ -213,6 +213,9 @@
  self.regexple.setFocus()   self.emit(SIGNAL('loadComplete'))   +class DataWrapper(QObject): + def __init__(self, data): + self.data = data    class HistorySearchThread(QThread):   '''Background thread for searching repository history''' @@ -247,7 +250,8 @@
  text = '<b>%s</b> <span>%s</span>' % (   addremove, text[:-1])   row = [fname, rev, line, user, text] - self.obj.emit(SIGNAL('matchedRow'), row) + w = DataWrapper(row) + self.obj.emit(SIGNAL('matchedRow'), w)   except ValueError:   pass   self.fullmsg = '' @@ -304,7 +308,8 @@
  if pos:   hu.write(line[pos:], label='ui.status')   row = [wfile, i + 1, rev, None, hu.getdata()[0]] - self.emit(SIGNAL('matchedRow'), row) + w = DataWrapper(row) + self.emit(SIGNAL('matchedRow'), w)   if self.once:   break   self.emit(SIGNAL('finished')) @@ -403,7 +408,6 @@
  from tortoisehg.hgqt import wctxactions   repo, ui = self.repo, self.repo.ui   for rev, path, line in rows: - path = hglib.fromunicode(path)   if rev is None:   files = [repo.wjoin(path)]   wctxactions.edit(self, ui, repo, files, line) @@ -424,7 +428,6 @@
  else:   defer.append([rev, path, line])   if crev is not None: - files = [hglib.fromunicode(f) for f in files]   visdiff.visualdiff(ui, repo, files, {'change':crev})   rows = defer