diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-02-16 01:03:22 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-02-16 01:03:22 +0100 |
commit | 7d80264fa7fc71bc68ed091ff8ba97bdd7970dc4 (patch) | |
tree | e3d6878189a6079dd61cde0b20f7f10cc4d1ffb0 /src/qml/qml/qqmlfile.cpp | |
parent | 27c0e9d709aba97bd522fd3e53a53c4ff3c4d71b (diff) | |
parent | fee0fcfef08a05ed4ba9369d2352c876b514d69c (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I51cb42d253a83c0e6a76946c37cf1ff7c7cac150
Diffstat (limited to 'src/qml/qml/qqmlfile.cpp')
-rw-r--r-- | src/qml/qml/qqmlfile.cpp | 17 |
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 |