aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmltypeloaderqmldircontent_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmltypeloaderqmldircontent_p.h')
-rw-r--r--src/qml/qml/qqmltypeloaderqmldircontent_p.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/qml/qml/qqmltypeloaderqmldircontent_p.h b/src/qml/qml/qqmltypeloaderqmldircontent_p.h
index 5749e04eaf..421eb16da4 100644
--- a/src/qml/qml/qqmltypeloaderqmldircontent_p.h
+++ b/src/qml/qml/qqmltypeloaderqmldircontent_p.h
@@ -35,7 +35,7 @@ public:
bool hasContent() const { return m_hasContent; }
bool hasError() const { return m_parser.hasError(); }
- QList<QQmlError> errors(const QString &uri) const;
+ QList<QQmlError> errors(const QString &uri, const QUrl &url) const;
QString typeNamespace() const { return m_parser.typeNamespace(); }
@@ -47,6 +47,13 @@ public:
QString qmldirLocation() const { return m_location; }
QString preferredPath() const { return m_parser.preferredPath(); }
+ bool hasRedirection() const
+ {
+ const QString preferred = preferredPath();
+ return !preferred.isEmpty()
+ && preferred != QStringView(m_location).chopped(strlen("qmldir"));
+ }
+
bool designerSupported() const { return m_parser.designerSupported(); }
bool hasTypeInfo() const { return !m_parser.typeInfos().isEmpty(); }