aboutsummaryrefslogtreecommitdiffstats
path: root/typesystem.cpp
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-02-08 14:30:13 -0200
committerHugo Lima <hugo.lima@openbossa.org>2010-02-08 16:04:18 -0200
commit20998c0dc9532630ba549af9a8321cd736c79368 (patch)
tree651fe5dc006693c5671f0db7b66476b658f9171e /typesystem.cpp
parenta0c267b10ad01064e9282ea38577cbd71d0944af (diff)
Assumes utf-8 encoding for conversion rules stored in external files.
Reviewed by Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'typesystem.cpp')
-rw-r--r--typesystem.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/typesystem.cpp b/typesystem.cpp
index 220d5af1e..89dfd4768 100644
--- a/typesystem.cpp
+++ b/typesystem.cpp
@@ -1045,8 +1045,8 @@ bool Handler::startElement(const QString &, const QString &n,
if (m_generate != TypeEntry::GenerateForSubclass
&& m_generate != TypeEntry::GenerateNothing) {
QFile conversionSource(sourceFile);
- if (conversionSource.open(QIODevice::ReadOnly)) {
- topElement.entry->setConversionRule(conversionSource.readAll());
+ if (conversionSource.open(QIODevice::ReadOnly | QIODevice::Text)) {
+ topElement.entry->setConversionRule(QString::fromUtf8(conversionSource.readAll()));
} else {
ReportHandler::warning("File containing conversion code for "
+ topElement.entry->name()