Make ids handle unicode strings

This should not have any effect on existing ASCII-only ids (not
even when it comes to conversion costs), but will make sure that
ids generated from user data (file names, etc) will work.

Change-Id: I0a086ad433190a038f20fe3f98f525ad8c56db81
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
Tobias Hunger
2012-05-16 11:42:47 +02:00
committed by Eike Ziller
parent dec03a0d6c
commit 60191a68dc

View File

@@ -119,7 +119,7 @@ Id::Id(const char *name)
{}
Id::Id(const QString &name)
: m_id(theId(name.toLatin1()))
: m_id(theId(name.toUtf8()))
{}
QByteArray Id::name() const
@@ -129,7 +129,7 @@ QByteArray Id::name() const
QString Id::toString() const
{
return QString::fromLatin1(stringFromId[m_id]);
return QString::fromUtf8(stringFromId[m_id]);
}
} // namespace Core