12 QLineEdit |
12 QLineEdit |
13 |
13 |
14 from E5Gui import E5MessageBox |
14 from E5Gui import E5MessageBox |
15 |
15 |
16 from .Ui_HgShelveBrowserDialog import Ui_HgShelveBrowserDialog |
16 from .Ui_HgShelveBrowserDialog import Ui_HgShelveBrowserDialog |
17 |
|
18 import Preferences |
|
19 |
17 |
20 |
18 |
21 class HgShelveBrowserDialog(QWidget, Ui_HgShelveBrowserDialog): |
19 class HgShelveBrowserDialog(QWidget, Ui_HgShelveBrowserDialog): |
22 """ |
20 """ |
23 Class implementing Mercurial shelve browser dialog. |
21 Class implementing Mercurial shelve browser dialog. |
296 It reads the output of the process and inserts it into a buffer. |
293 It reads the output of the process and inserts it into a buffer. |
297 """ |
294 """ |
298 self.process.setReadChannel(QProcess.StandardOutput) |
295 self.process.setReadChannel(QProcess.StandardOutput) |
299 |
296 |
300 while self.process.canReadLine(): |
297 while self.process.canReadLine(): |
301 line = str(self.process.readLine(), |
298 line = str(self.process.readLine(), self.vcs.getEncoding(), |
302 Preferences.getSystem("IOEncoding"), |
|
303 'replace') |
299 'replace') |
304 self.buf.append(line) |
300 self.buf.append(line) |
305 |
301 |
306 def __readStderr(self): |
302 def __readStderr(self): |
307 """ |
303 """ |
310 It reads the error output of the process and inserts it into the |
306 It reads the error output of the process and inserts it into the |
311 error pane. |
307 error pane. |
312 """ |
308 """ |
313 if self.process is not None: |
309 if self.process is not None: |
314 s = str(self.process.readAllStandardError(), |
310 s = str(self.process.readAllStandardError(), |
315 Preferences.getSystem("IOEncoding"), |
311 self.vcs.getEncoding(), 'replace') |
316 'replace') |
|
317 self.__showError(s) |
312 self.__showError(s) |
318 |
313 |
319 def __showError(self, out): |
314 def __showError(self, out): |
320 """ |
315 """ |
321 Private slot to show some error. |
316 Private slot to show some error. |