QVariant: replace QLatin1String with QStringLiteral

... in convert() to optimize string creation.

Change-Id: Id012f2f52606c026ed216655ff3ce63bd5154da6
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
Anton Kudryavtsev 2016-01-24 17:24:32 +03:00
parent 7ee1fc4c29
commit 037e58fff6

View File

@ -446,7 +446,7 @@ static bool convert(const QVariant::Private *d, int t, void *result, bool *ok)
break;
#endif
case QVariant::Bool:
*str = QLatin1String(d->data.b ? "true" : "false");
*str = d->data.b ? QStringLiteral("true") : QStringLiteral("false");
break;
case QVariant::ByteArray:
*str = QString::fromUtf8(v_cast<QByteArray>(d)->constData());