summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlcompiler.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-12-17 01:38:50 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-12-17 02:04:40 (GMT)
commite757e999bbc5a65e6cdc2f1c53a77f7918e88928 (patch)
tree84edc8c0a1b69df41c482865d0a12dd53f3271fa /src/declarative/qml/qmlcompiler.cpp
parentba55b1fee6d7f1d7d669e291fd0e0db17b6c40ed (diff)
downloadQt-e757e999bbc5a65e6cdc2f1c53a77f7918e88928.zip
Qt-e757e999bbc5a65e6cdc2f1c53a77f7918e88928.tar.gz
Qt-e757e999bbc5a65e6cdc2f1c53a77f7918e88928.tar.bz2
Fix regression introduced in 6fe6e803f08750534a6c14b4a2847a6ec1b29350.
Only use the component name if it is actually a type.
Diffstat (limited to 'src/declarative/qml/qmlcompiler.cpp')
-rw-r--r--src/declarative/qml/qmlcompiler.cpp3
1 files changed, 2 insertions, 1 deletions
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);
}
}