aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlmetatype_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmlmetatype_p.h')
-rw-r--r--src/qml/qml/qqmlmetatype_p.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/qml/qml/qqmlmetatype_p.h b/src/qml/qml/qqmlmetatype_p.h
index bb592dfa07..3c2b893499 100644
--- a/src/qml/qml/qqmlmetatype_p.h
+++ b/src/qml/qml/qqmlmetatype_p.h
@@ -101,10 +101,14 @@ public:
static QQmlType typeForUrl(const QString &urlString, const QHashedStringRef& typeName,
CompositeTypeLookupMode mode, QList<QQmlError> *errors,
QTypeRevision version = QTypeRevision());
- static QQmlType inlineComponentTypeForUrl(const QUrl &url);
- static QQmlType inlineComponentTypeForUrl(const QUrl &baseUrl, const QString &name)
+
+ static QQmlType fetchOrCreateInlineComponentTypeForUrl(const QUrl &url);
+ static QQmlType inlineComponentType(const QQmlType &outerType, const QString &name)
{
- return inlineComponentTypeForUrl(inlineComponentUrl(baseUrl, name));
+ return outerType.isComposite()
+ ? fetchOrCreateInlineComponentTypeForUrl(
+ inlineComponentUrl(outerType.sourceUrl(), name))
+ : QQmlType();
}
static void unregisterType(int type);