From efa0dac9c4c456793f9e0e706a3b026ed0941801 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Mon, 5 Mar 2018 10:19:33 +0100 Subject: Fix regression involving aliases on case-insensitive file systems When initializing a QQmlProperty with the following syntax: QQmlProperty property(root, "testType.objectName", QQmlEngine::contextForObject(root)); only try to look up types (for each token after splitting on the '.') if the token starts with an uppercase letter, as 1e350a8c now enforces that type names begin with an uppercase letter. Task-number: QTBUG-66715 Change-Id: Iab64be1deb971dca256fc65d358c773837222a57 Reviewed-by: Simon Hausmann --- src/qml/qml/qqmlproperty.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/qml/qml/qqmlproperty.cpp') diff --git a/src/qml/qml/qqmlproperty.cpp b/src/qml/qml/qqmlproperty.cpp index 8ecd597a39..ebf296b29d 100644 --- a/src/qml/qml/qqmlproperty.cpp +++ b/src/qml/qml/qqmlproperty.cpp @@ -269,7 +269,9 @@ void QQmlPropertyPrivate::initProperty(QObject *obj, const QString &name) for (int ii = 0; ii < path.count() - 1; ++ii) { const QStringRef &pathName = path.at(ii); - if (typeNameCache) { + // Types must begin with an uppercase letter (see checkRegistration() + // in qqmlmetatype.cpp for the enforcement of this). + if (typeNameCache && !pathName.isEmpty() && pathName.at(0).isUpper()) { QQmlTypeNameCache::Result r = typeNameCache->query(pathName); if (r.isValid()) { if (r.type.isValid()) { -- cgit v1.2.3