diff --git a/src/main.cpp b/src/main.cpp index 0ae6ac6..99c1381 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -9,6 +9,10 @@ int main(int argc, char *argv[]) printf("Usage: %s http://siteweb.com/\n",argv[0]); return -1; } + // Codificación UTF-8. + QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8")); + QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8")); + QApplication a(argc, argv); MainWindow w; w.show(); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index e99181d..f49b651 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -237,8 +237,8 @@ void MainWindow::slotProcessOutput() char buf[BUFFERSIZE]; while((m_process->readLine(buf,BUFFERSIZE) > 0)) { - print(tr("Proc. Output: ")+buf); QString s(buf); + print(tr("Proc. Output: ")+s); captureOutputForStatusBar(s); } } @@ -249,7 +249,8 @@ void MainWindow::slotProcessErrorOutput() char buf[BUFFERSIZE]; while((m_process->readLine(buf,BUFFERSIZE) > 0)) { - print(tr("Proc. Error: ")+buf); + QString s(buf); + print(tr("Proc. Error: ")+s); } }