diff options
author | ramon <ramongomez@us.es> | 2011-03-23 12:01:37 +0000 |
---|---|---|
committer | ramon <ramongomez@us.es> | 2011-03-23 12:01:37 +0000 |
commit | d6a61e6ce61427d4ca3930057d74b9fa816df021 (patch) | |
tree | 65dff5253521dabf0b151f1873d81a93bcd82d7a | |
parent | 3d98a3833280460117aff89c65c5dffb97c03e0d (diff) |
Modificado código fuente del Browser para mostrar salidas y barra de estado en UTF-8 (versiones 0.10 y 1.0).
Modificado #243.
git-svn-id: https://opengnsys.es/svn/trunk@1608 a21b9725-9963-47de-94b9-378ad31fedc9
-rw-r--r-- | client/browser/src/main.cpp | 4 | ||||
-rw-r--r-- | client/browser/src/mainwindow.cpp | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/client/browser/src/main.cpp b/client/browser/src/main.cpp index 0ae6ac6a..99c13812 100644 --- a/client/browser/src/main.cpp +++ b/client/browser/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/client/browser/src/mainwindow.cpp b/client/browser/src/mainwindow.cpp index 2ada2520..f49b6510 100644 --- a/client/browser/src/mainwindow.cpp +++ b/client/browser/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); } } @@ -295,7 +296,7 @@ void MainWindow::slotCreateTerminal() { QTermWidget* console = new QTermWidget(1,this); QFont font = QApplication::font(); - font.setFamily("Courier"); + font.setFamily("DejaVu Sans Mono"); font.setPointSize(12); console->setTerminalFont(font); |