File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 23
23
#include " qgslogger.h"
24
24
#include " qgsmessageoutput.h"
25
25
#include < QProcess>
26
+ #include < QTextCodec>
26
27
#include < QMessageBox>
27
28
28
29
QgsRunProcess::QgsRunProcess ( const QString& action, bool capture )
@@ -90,15 +91,19 @@ void QgsRunProcess::die()
90
91
91
92
void QgsRunProcess::stdoutAvailable ()
92
93
{
93
- QString line ( mProcess ->readAllStandardOutput () );
94
+ QByteArray bytes ( mProcess ->readAllStandardOutput () );
95
+ QTextCodec *codec = QTextCodec::codecForLocale ();
96
+ QString line ( codec->toUnicode ( bytes ) );
94
97
95
98
// Add the new output to the dialog box
96
99
mOutput ->appendMessage ( line );
97
100
}
98
101
99
102
void QgsRunProcess::stderrAvailable ()
100
103
{
101
- QString line ( mProcess ->readAllStandardError () );
104
+ QByteArray bytes ( mProcess ->readAllStandardOutput () );
105
+ QTextCodec *codec = QTextCodec::codecForLocale ();
106
+ QString line ( codec->toUnicode ( bytes ) );
102
107
103
108
// Add the new output to the dialog box, but color it red
104
109
mOutput ->appendMessage ( " <font color=red>" + line + " </font>" );
You can’t perform that action at this time.
0 commit comments