aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlfile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmlfile.cpp')
-rw-r--r--src/qml/qml/qqmlfile.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlfile.cpp b/src/qml/qml/qqmlfile.cpp
index 99031e1e74..465a342129 100644
--- a/src/qml/qml/qqmlfile.cpp
+++ b/src/qml/qml/qqmlfile.cpp
@@ -64,6 +64,7 @@ static char file_string[] = "file";
#if defined(Q_OS_ANDROID)
static char assets_string[] = "assets";
+static char content_string[] = "content";
#endif
class QQmlFilePrivate;
@@ -452,6 +453,8 @@ bool QQmlFile::isSynchronous(const QUrl &url)
#if defined(Q_OS_ANDROID)
} else if (scheme.length() == 6 && 0 == scheme.compare(QLatin1String(assets_string), Qt::CaseInsensitive)) {
return true;
+ } else if (scheme.length() == 7 && 0 == scheme.compare(QLatin1String(content_string), Qt::CaseInsensitive)) {
+ return true;
#endif
} else {
@@ -492,7 +495,10 @@ bool QQmlFile::isSynchronous(const QString &url)
return url.length() >= 8 /* assets:/ */ &&
url.startsWith(QLatin1String(assets_string), Qt::CaseInsensitive) &&
url[6] == QLatin1Char(':') && url[7] == QLatin1Char('/');
-
+ } else if (f == QLatin1Char('c') || f == QLatin1Char('C')) {
+ return url.length() >= 9 /* content:/ */ &&
+ url.startsWith(QLatin1String(content_string), Qt::CaseInsensitive) &&
+ url[7] == QLatin1Char(':') && url[8] == QLatin1Char('/');
}
#endif
@@ -556,7 +562,10 @@ bool QQmlFile::isLocalFile(const QString &url)
return url.length() >= 8 /* assets:/ */ &&
url.startsWith(QLatin1String(assets_string), Qt::CaseInsensitive) &&
url[6] == QLatin1Char(':') && url[7] == QLatin1Char('/');
-
+ } else if (f == QLatin1Char('c') || f == QLatin1Char('C')) {
+ return url.length() >= 9 /* content:/ */ &&
+ url.startsWith(QLatin1String(content_string), Qt::CaseInsensitive) &&
+ url[7] == QLatin1Char(':') && url[8] == QLatin1Char('/');
}
#endif
@@ -580,6 +589,8 @@ QString QQmlFile::urlToLocalFileOrQrc(const QUrl& url)
if (url.authority().isEmpty())
return url.toString();
return QString();
+ } else if (url.scheme().compare(QLatin1String("content"), Qt::CaseInsensitive) == 0) {
+ return url.toString();
}
#endif
@@ -618,6 +629,8 @@ QString QQmlFile::urlToLocalFileOrQrc(const QString& url)
#if defined(Q_OS_ANDROID)
else if (url.startsWith(QLatin1String("assets:"), Qt::CaseInsensitive)) {
return url;
+ } else if (url.startsWith(QLatin1String("content:"), Qt::CaseInsensitive)) {
+ return url;
}
#endif