[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:
parent
9168e1c79f
commit
4dda85971f
@ -92,7 +92,8 @@ QUrl PackageUrlInterceptor::intercept(const QUrl &path, QQmlAbstractUrlIntercept
|
|||||||
//qDebug() << "Intercepted URL:" << path << type;
|
//qDebug() << "Intercepted URL:" << path << type;
|
||||||
|
|
||||||
//we assume we never rewritten qml/qmldir files
|
//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;
|
return path;
|
||||||
}
|
}
|
||||||
const QString prefix = QString::fromUtf8(prefixForType(type, path.path()));
|
const QString prefix = QString::fromUtf8(prefixForType(type, path.path()));
|
||||||
|
Loading…
Reference in New Issue
Block a user