diff options
-rw-r--r-- | src/qml/qml/v4/qv4irbuilder.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/qml/qml/v4/qv4irbuilder.cpp b/src/qml/qml/v4/qv4irbuilder.cpp index 4aa257d54a..d217a01105 100644 --- a/src/qml/qml/v4/qv4irbuilder.cpp +++ b/src/qml/qml/v4/qv4irbuilder.cpp @@ -638,6 +638,10 @@ bool QV4IRBuilder::visit(AST::FieldMemberExpression *ast) QByteArray utf8Name = name.toUtf8(); const char *enumName = utf8Name.constData(); + //Happens in some cases where they make properties with uppercase names + Q_ASSERT_X(baseName->meta.propertyCache(m_engine), "QML compiler", + QString("Error resolving enum \"%1\"").arg(name).toLatin1().constData()); + const QMetaObject *meta = baseName->meta.propertyCache(m_engine)->firstCppMetaObject(); bool found = false; for (int ii = 0; !found && ii < meta->enumeratorCount(); ++ii) { |