diff options
| author | Anton Kudryavtsev <[email protected]> | 2016-01-18 18:06:37 +0300 |
|---|---|---|
| committer | Anton Kudryavtsev <[email protected]> | 2016-02-10 11:17:48 +0000 |
| commit | 6c152bf27f94f01b2942b02e370df4fa01e0d40f (patch) | |
| tree | 0bacc76c3e0e06c4c874d120b712f09c5dc75ffb /src/quick/scenegraph | |
| parent | 71888aa3a4fa564dae17f00be6a04b34a19db862 (diff) | |
Quick: replace QStringLiteral with QLatin1String
... in string comparisons. It's more efficient.
Change-Id: I51b4f5dd79ddb8a448e59ebfc537b86b78730dfb
Reviewed-by: Lars Knoll <[email protected]>
Diffstat (limited to 'src/quick/scenegraph')
| -rw-r--r-- | src/quick/scenegraph/coreapi/qsgshaderrewriter.cpp | 6 | ||||
| -rw-r--r-- | src/quick/scenegraph/util/qsgatlastexture.cpp | 6 | ||||
| -rw-r--r-- | src/quick/scenegraph/util/qsgtexture.cpp | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgshaderrewriter.cpp b/src/quick/scenegraph/coreapi/qsgshaderrewriter.cpp index 1112eca27b..97d7e69407 100644 --- a/src/quick/scenegraph/coreapi/qsgshaderrewriter.cpp +++ b/src/quick/scenegraph/coreapi/qsgshaderrewriter.cpp @@ -274,7 +274,7 @@ int main(int argc, char **argv) for (int i=0; i<args.length(); ++i) { const QString &a = args.at(i); - if (a == QStringLiteral("--file") && i < args.length() - 1) { + if (a == QLatin1String("--file") && i < args.length() - 1) { qDebug() << "Reading file: " << args.at(i); QFile file(args.at(++i)); if (!file.open(QFile::ReadOnly)) { @@ -282,10 +282,10 @@ int main(int argc, char **argv) return 1; } content = file.readAll(); - } else if (a == QStringLiteral("--selftest")) { + } else if (a == QLatin1String("--selftest")) { qDebug() << "doing a selftest"; content = QByteArray(selftest); - } else if (a == QStringLiteral("--help") || a == QStringLiteral("-h")) { + } else if (a == QLatin1String("--help") || a == QLatin1String("-h")) { qDebug() << "usage:" << endl << " --file [name] A vertex shader file to rewrite" << endl; } diff --git a/src/quick/scenegraph/util/qsgatlastexture.cpp b/src/quick/scenegraph/util/qsgatlastexture.cpp index 9d6e7f3b2a..57468e5799 100644 --- a/src/quick/scenegraph/util/qsgatlastexture.cpp +++ b/src/quick/scenegraph/util/qsgatlastexture.cpp @@ -141,9 +141,9 @@ Atlas::Atlas(const QSize &size) QString *deviceName = static_cast<QString *>(QGuiApplication::platformNativeInterface()->nativeResourceForIntegration("AndroidDeviceName")); static bool wrongfullyReportsBgra8888Support = deviceName != 0 - && (deviceName->compare(QStringLiteral("samsung SM-T211"), Qt::CaseInsensitive) == 0 - || deviceName->compare(QStringLiteral("samsung SM-T210"), Qt::CaseInsensitive) == 0 - || deviceName->compare(QStringLiteral("samsung SM-T215"), Qt::CaseInsensitive) == 0); + && (deviceName->compare(QLatin1String("samsung SM-T211"), Qt::CaseInsensitive) == 0 + || deviceName->compare(QLatin1String("samsung SM-T210"), Qt::CaseInsensitive) == 0 + || deviceName->compare(QLatin1String("samsung SM-T215"), Qt::CaseInsensitive) == 0); #else static bool wrongfullyReportsBgra8888Support = false; // The Raspberry Pi (both 1 and 2) GPU refuses framebuffers with BGRA color attachments. diff --git a/src/quick/scenegraph/util/qsgtexture.cpp b/src/quick/scenegraph/util/qsgtexture.cpp index 169f3ebe59..74390334c4 100644 --- a/src/quick/scenegraph/util/qsgtexture.cpp +++ b/src/quick/scenegraph/util/qsgtexture.cpp @@ -720,9 +720,9 @@ void QSGPlainTexture::bind() QString *deviceName = static_cast<QString *>(QGuiApplication::platformNativeInterface()->nativeResourceForIntegration("AndroidDeviceName")); static bool wrongfullyReportsBgra8888Support = deviceName != 0 - && (deviceName->compare(QStringLiteral("samsung SM-T211"), Qt::CaseInsensitive) == 0 - || deviceName->compare(QStringLiteral("samsung SM-T210"), Qt::CaseInsensitive) == 0 - || deviceName->compare(QStringLiteral("samsung SM-T215"), Qt::CaseInsensitive) == 0); + && (deviceName->compare(QLatin1String("samsung SM-T211"), Qt::CaseInsensitive) == 0 + || deviceName->compare(QLatin1String("samsung SM-T210"), Qt::CaseInsensitive) == 0 + || deviceName->compare(QLatin1String("samsung SM-T215"), Qt::CaseInsensitive) == 0); #else static bool wrongfullyReportsBgra8888Support = false; #endif |
