From e757e999bbc5a65e6cdc2f1c53a77f7918e88928 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Thu, 17 Dec 2009 11:38:50 +1000 Subject: Fix regression introduced in 6fe6e803f08750534a6c14b4a2847a6ec1b29350. Only use the component name if it is actually a type. --- src/declarative/qml/qmlcompiler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/declarative/qml/qmlcompiler.cpp b/src/declarative/qml/qmlcompiler.cpp index aeda573..bd46bbe 100644 --- a/src/declarative/qml/qmlcompiler.cpp +++ b/src/declarative/qml/qmlcompiler.cpp @@ -2195,7 +2195,8 @@ bool QmlCompiler::buildDynamicMeta(QmlParser::Object *obj, DynamicMetaMode mode) int lastSlash = path.lastIndexOf(QLatin1Char('/')); if (lastSlash > -1) { QString nameBase = path.mid(lastSlash + 1, path.length()-lastSlash-5); - newClassName = nameBase.toUtf8() + "_QMLTYPE_" + QByteArray::number(idx); + if (!nameBase.isEmpty() && nameBase.at(0).isUpper()) + newClassName = nameBase.toUtf8() + "_QMLTYPE_" + QByteArray::number(idx); } } -- cgit v0.12