[PackageUrlInterceptor] Don't rewrite "inline"

When omitting the third "location" argument of Qt.createQmlObject it will instead use "inline" [1]
as path and will run through the entire URL interceptor even logic.

[1] https://code.qt.io/cgit/qt/qtdeclarative.git/tree/src/qml/qml/v8/qqmlbuiltinfunctions.cpp#n1134

Differential Revision: https://phabricator.kde.org/D10870
This commit is contained in:
Kai Uwe Broulik 2018-02-28 12:49:00 +01:00
parent 9168e1c79f
commit 4dda85971f

View File

@ -92,7 +92,8 @@ QUrl PackageUrlInterceptor::intercept(const QUrl &path, QQmlAbstractUrlIntercept
//qDebug() << "Intercepted URL:" << path << type;
//we assume we never rewritten qml/qmldir files
if (path.path().endsWith(QStringLiteral("qml")) || path.path().endsWith(QStringLiteral("qmldir"))) {
if (path.path().endsWith(QStringLiteral("qml")) || path.path().endsWith(QStringLiteral("qmldir"))
|| path.path().endsWith(QStringLiteral("/inline"))) {
return path;
}
const QString prefix = QString::fromUtf8(prefixForType(type, path.path()));