summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKonstantin Ritt <ritt.ks@gmail.com>2015-03-16 03:43:05 +0400
committerKonstantin Ritt <ritt.ks@gmail.com>2015-03-16 11:05:48 +0000
commit5dc05523555c35d3ea043ed2405dcdf9e6b62ba4 (patch)
tree0c193824e1493016ddbffbb322b988f3def590cb /src
parent3a268419f29180248504bcd93a455935bdf791b7 (diff)
Nano-optimization to QUrlHelper::urlToLocalFileOrQrc(..)
Change-Id: I8ae10d2eb13de9755fe0fb2683a2dfdd51cee674 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/core/io/qurlhelper.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/io/qurlhelper.cpp b/src/core/io/qurlhelper.cpp
index 6cc73ac94..c930f2059 100644
--- a/src/core/io/qurlhelper.cpp
+++ b/src/core/io/qurlhelper.cpp
@@ -42,14 +42,15 @@ namespace Qt3D {
QString QUrlHelper::urlToLocalFileOrQrc(const QUrl &url)
{
- if (url.scheme().compare(QLatin1String("qrc"), Qt::CaseInsensitive) == 0) {
+ const QString scheme(url.scheme().toLower());
+ if (scheme == QLatin1String("qrc")) {
if (url.authority().isEmpty())
return QLatin1Char(':') + url.path();
return QString();
}
#if defined(Q_OS_ANDROID)
- else if (url.scheme().compare(QLatin1String("assets"), Qt::CaseInsensitive) == 0) {
+ if (scheme == QLatin1String("assets")) {
if (url.authority().isEmpty())
return url.toString();
return QString();