summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qmllistmodel.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-10-12 03:00:08 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-10-12 03:00:08 (GMT)
commit6be94173f3f209d785e5787df8440d20ff0f2709 (patch)
tree75794282e09b2af08b26752069b0eb7fcabe3653 /src/declarative/util/qmllistmodel.cpp
parent68c69f88d4c3a7b9f24162a4c7708ded7caba90e (diff)
downloadQt-6be94173f3f209d785e5787df8440d20ff0f2709.zip
Qt-6be94173f3f209d785e5787df8440d20ff0f2709.tar.gz
Qt-6be94173f3f209d785e5787df8440d20ff0f2709.tar.bz2
Use utf8 instead of latin1 where appropriate
Diffstat (limited to 'src/declarative/util/qmllistmodel.cpp')
-rw-r--r--src/declarative/util/qmllistmodel.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/declarative/util/qmllistmodel.cpp b/src/declarative/util/qmllistmodel.cpp
index 062ab48..4dc9bc5 100644
--- a/src/declarative/util/qmllistmodel.cpp
+++ b/src/declarative/util/qmllistmodel.cpp
@@ -233,7 +233,7 @@ struct ModelNode
QHash<QString, ModelNode *>::iterator it;
for (it = properties.begin(); it != properties.end(); ++it) {
if (!(*it)->values.isEmpty())
- objectCache->setValue(it.key().toLatin1(), (*it)->values.first());
+ objectCache->setValue(it.key().toUtf8(), (*it)->values.first());
}
}
return objectCache;
@@ -252,7 +252,7 @@ struct ModelNode
properties.insert(prop,n);
}
if (objectCache)
- objectCache->setValue(prop.toLatin1(), val);
+ objectCache->setValue(prop.toUtf8(), val);
}
QmlListModel *modelCache;
@@ -709,7 +709,7 @@ bool QmlListModelParser::compileProperty(const QmlCustomParserProperty &prop, QL
qvariant_cast<QmlParser::Variant>(value);
int ref = data.count();
- QByteArray d = variant.asScript().toLatin1();
+ QByteArray d = variant.asScript().toUtf8();
d.append('\0');
data.append(d);
@@ -799,7 +799,7 @@ void QmlListModelParser::setCustomData(QObject *obj, const QByteArray &d)
{
ModelNode *n = nodes.top();
ModelNode *n2 = new ModelNode;
- n->properties.insert(QLatin1String(data + instr.dataIdx), n2);
+ n->properties.insert(QString::fromUtf8(data + instr.dataIdx), n2);
nodes.push(n2);
}
break;