QmlJS: Always register C++ based components with their C++ name.

This is the name that other components will refer to it by. For
instance, MouseArea has a 'drag' property with type 'QDeclarativeDrag',
since QDeclarativeDrag was only exported as Qt.Drag and QtQuick.Drag,
the type lookup didn't manage to resolve the name.
(cherry picked from commit b53ba61248)
This commit is contained in:
Christian Kamm
2010-10-07 14:12:45 +02:00
parent 7e3294a8ce
commit 4751d92df4

View File

@@ -457,9 +457,7 @@ private:
unexpectedElement(_xml.name(), tag);
}
if (metaObject->exports().isEmpty()) {
metaObject->addExport(id, QString(), QmlJS::ComponentVersion());
}
metaObject->addExport(id, QString(), QmlJS::ComponentVersion());
if (doInsert) {
_objects->insert(id, metaObject);