From b53ba61248ac398c98cf5849d050f99de92ff6a9 Mon Sep 17 00:00:00 2001
From: Christian Kamm <christian.d.kamm@nokia.com>
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.
---
 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 b293127c34e..ea5166ef43d 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);
-- 
GitLab