From 4751d92df40bbc2b2230819bb3be855cc6d3e929 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Thu, 7 Oct 2010 14:12:45 +0200 Subject: [PATCH] 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 b53ba61248ac398c98cf5849d050f99de92ff6a9) --- src/libs/qmljs/qmljsinterpreter.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libs/qmljs/qmljsinterpreter.cpp b/src/libs/qmljs/qmljsinterpreter.cpp index b293127c34..ea5166ef43 100644 --- a/src/libs/qmljs/qmljsinterpreter.cpp +++ b/src/libs/qmljs/qmljsinterpreter.cpp @@ -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); -- 2.11.0