From 1fc67a09f85e5443f8558d7c761170608a4169a9 Mon Sep 17 00:00:00 2001 From: ramon Date: Wed, 23 Mar 2011 12:01:37 +0000 Subject: [PATCH] =?UTF-8?q?Modificado=20c=C3=B3digo=20fuente=20del=20Brows?= =?UTF-8?q?er=20para=20mostrar=20salidas=20y=20barra=20de=20estado=20en=20?= =?UTF-8?q?UTF-8=20(versiones=200.10=20y=201.0).=20Modificado=20#243.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://opengnsys.es/svn/branches/version1.0@1608 a21b9725-9963-47de-94b9-378ad31fedc9 --- src/main.cpp | 4 ++++ src/mainwindow.cpp | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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); } }