10 import os.path |
10 import os.path |
11 |
11 |
12 from PyQt4.QtCore import * |
12 from PyQt4.QtCore import * |
13 from PyQt4.QtGui import * |
13 from PyQt4.QtGui import * |
14 |
14 |
15 from Ui_EricdocExecDialog import Ui_EricdocExecDialog |
15 from .Ui_EricdocExecDialog import Ui_EricdocExecDialog |
|
16 |
|
17 import Preferences |
16 |
18 |
17 class EricdocExecDialog(QDialog, Ui_EricdocExecDialog): |
19 class EricdocExecDialog(QDialog, Ui_EricdocExecDialog): |
18 """ |
20 """ |
19 Class implementing a dialog to show the output of the ericdoc process. |
21 Class implementing a dialog to show the output of the ericdoc process. |
20 |
22 |
130 the contents pane. |
132 the contents pane. |
131 """ |
133 """ |
132 self.process.setReadChannel(QProcess.StandardOutput) |
134 self.process.setReadChannel(QProcess.StandardOutput) |
133 |
135 |
134 while self.process.canReadLine(): |
136 while self.process.canReadLine(): |
135 s = unicode(self.process.readLine()) |
137 s = str(self.process.readLine(), |
|
138 Preferences.getSystem("IOEncoding"), |
|
139 'replace') |
136 self.contents.insertPlainText(s) |
140 self.contents.insertPlainText(s) |
137 self.contents.ensureCursorVisible() |
141 self.contents.ensureCursorVisible() |
138 |
142 |
139 def __readStderr(self): |
143 def __readStderr(self): |
140 """ |
144 """ |
145 """ |
149 """ |
146 self.process.setReadChannel(QProcess.StandardError) |
150 self.process.setReadChannel(QProcess.StandardError) |
147 |
151 |
148 while self.process.canReadLine(): |
152 while self.process.canReadLine(): |
149 self.errorGroup.show() |
153 self.errorGroup.show() |
150 s = unicode(self.process.readLine()) |
154 s = str(self.process.readLine(), |
|
155 Preferences.getSystem("IOEncoding"), |
|
156 'replace') |
151 self.errors.insertPlainText(s) |
157 self.errors.insertPlainText(s) |
152 self.errors.ensureCursorVisible() |
158 self.errors.ensureCursorVisible() |