diff options
author | Debao Zhang <dbzhang800@gmail.com> | 2012-04-23 20:22:22 -0700 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-16 19:58:58 +0200 |
commit | b8f732a65ef95406780d43ba2c0245728e342347 (patch) | |
tree | 7564446f0e08a4203a189ce5540c3ee52f42ddf6 /src/quick/items/context2d | |
parent | ca63fd4e9e0e1e974518380991e6f814768d0ebe (diff) |
Using QStringLiteral or QLatin1String instead of QLatin1Literal
Change-Id: Ie1435f1ac5c81d8781e7118121ed07c7202ab124
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/quick/items/context2d')
-rw-r--r-- | src/quick/items/context2d/qquickcanvasitem.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/quick/items/context2d/qquickcanvasitem.cpp b/src/quick/items/context2d/qquickcanvasitem.cpp index 571b4b0e7e..a56229231d 100644 --- a/src/quick/items/context2d/qquickcanvasitem.cpp +++ b/src/quick/items/context2d/qquickcanvasitem.cpp @@ -918,27 +918,27 @@ QString QQuickCanvasItem::toDataURL(const QString& mimeType) const buffer.open(QIODevice::WriteOnly); QString mime = mimeType.toLower(); QString type; - if (mime == QLatin1Literal("image/png")) { - type = QLatin1Literal("PNG"); - } else if (mime == QLatin1Literal("image/bmp")) - type = QLatin1Literal("BMP"); - else if (mime == QLatin1Literal("image/jpeg")) - type = QLatin1Literal("JPEG"); - else if (mime == QLatin1Literal("image/x-portable-pixmap")) - type = QLatin1Literal("PPM"); - else if (mime == QLatin1Literal("image/tiff")) - type = QLatin1Literal("TIFF"); - else if (mime == QLatin1Literal("image/xpm")) - type = QLatin1Literal("XPM"); + if (mime == QLatin1String("image/png")) { + type = QStringLiteral("PNG"); + } else if (mime == QLatin1String("image/bmp")) + type = QStringLiteral("BMP"); + else if (mime == QLatin1String("image/jpeg")) + type = QStringLiteral("JPEG"); + else if (mime == QLatin1String("image/x-portable-pixmap")) + type = QStringLiteral("PPM"); + else if (mime == QLatin1String("image/tiff")) + type = QStringLiteral("TIFF"); + else if (mime == QLatin1String("image/xpm")) + type = QStringLiteral("XPM"); else - return QLatin1Literal("data:,"); + return QStringLiteral("data:,"); image.save(&buffer, type.toLatin1()); buffer.close(); - QString dataUrl = QLatin1Literal("data:%1;base64,%2"); + QString dataUrl = QStringLiteral("data:%1;base64,%2"); return dataUrl.arg(mime).arg(QLatin1String(ba.toBase64().constData())); } - return QLatin1Literal("data:,"); + return QStringLiteral("data:,"); } void QQuickCanvasItem::delayedCreate() |