From b492f54b98989a186f75782f4d09de2c1c6d0fc0 Mon Sep 17 00:00:00 2001 From: aavit Date: Wed, 21 Mar 2012 09:50:35 +0100 Subject: [PATCH] More UTF8 fix of raster autotest This completes 6c98fd2, for systems where default codec is not UTF8. Change-Id: I94795785d5d172558c40c06bd3ef4ffaba1624c5 Reviewed-by: Jiang Jiang --- tests/auto/other/lancelot/paintcommands.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/auto/other/lancelot/paintcommands.cpp b/tests/auto/other/lancelot/paintcommands.cpp index d810e6e41a..969db62acb 100644 --- a/tests/auto/other/lancelot/paintcommands.cpp +++ b/tests/auto/other/lancelot/paintcommands.cpp @@ -848,8 +848,7 @@ void PaintCommands::command_import(QRegExp re) QFileInfo fileinfo(*file); m_commands[m_currentCommandIndex] = QString("# import file (%1) start").arg(fileinfo.fileName()); - QTextStream textFile(file); - QString rawContent = textFile.readAll(); + QString rawContent = QString::fromUtf8(file->readAll()); QStringList importedData = rawContent.split('\n', QString::SkipEmptyParts); importedData.append(QString("# import file (%1) end ---").arg(fileinfo.fileName())); insertAt(m_currentCommandIndex, importedData);