aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlproperty.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/qml/qqmlproperty.cpp')
-rw-r--r--src/qml/qml/qqmlproperty.cpp4
1 files changed, 3 insertions, 1 deletions
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()) {