From 4dda85971f1b6fd84d7414dbfabd7bbf7fa6233f Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Wed, 28 Feb 2018 12:49:00 +0100 Subject: [PATCH] [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 --- src/plasmaquick/packageurlinterceptor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plasmaquick/packageurlinterceptor.cpp b/src/plasmaquick/packageurlinterceptor.cpp index ab283672a..bc0e85255 100644 --- a/src/plasmaquick/packageurlinterceptor.cpp +++ b/src/plasmaquick/packageurlinterceptor.cpp @@ -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()));