Reduce usage of QStringRef::toString() in settings reader.

Change-Id: Ie66432caa250eb3122739b38b5b0a02c66942cc3
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Friedemann Kleint
2013-08-29 11:00:25 +02:00
parent c4babe8c43
commit c90df2b35b

View File

@@ -316,7 +316,7 @@ ParseContext::Element ParseContext::element(const QStringRef &r) const
QVariant ParseContext::readSimpleValue(QXmlStreamReader &r, const QXmlStreamAttributes &attributes) const QVariant ParseContext::readSimpleValue(QXmlStreamReader &r, const QXmlStreamAttributes &attributes) const
{ {
// Simple value // Simple value
const QString type = attributes.value(typeAttribute).toString(); const QStringRef type = attributes.value(typeAttribute);
const QString text = r.readElementText(); const QString text = r.readElementText();
if (type == QLatin1String("QChar")) { // Workaround: QTBUG-12345 if (type == QLatin1String("QChar")) { // Workaround: QTBUG-12345
QTC_ASSERT(text.size() == 1, return QVariant()); QTC_ASSERT(text.size() == 1, return QVariant());