summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
index b8b61ceb2b..10365f73a7 100644
--- a/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
+++ b/src/plugins/qmldesigner/designercore/metainfo/nodemetainfo.cpp
@@ -1031,12 +1031,27 @@ void NodeMetaInfoPrivate::setupPrototypes()
description.majorVersion = qmlValue->componentVersion().majorVersion();
LanguageUtils::FakeMetaObject::Export qtquickExport = qmlValue->metaObject()->exportInPackage("QtQuick");
LanguageUtils::FakeMetaObject::Export cppExport = qmlValue->metaObject()->exportInPackage("<cpp>");
- if (qtquickExport.isValid())
+
+ if (qtquickExport.isValid()) {
description.className = qtquickExport.package.toUtf8() + '.' + qtquickExport.type.toUtf8();
- else if (qmlValue->moduleName().isEmpty() && cppExport.isValid())
- description.className = cppExport.package.toUtf8() + '.' + cppExport.type.toUtf8();
- else if (!qmlValue->moduleName().isEmpty())
- description.className = qmlValue->moduleName().toUtf8() + '.' + description.className;
+ } else {
+ bool found = false;
+ if (cppExport.isValid()) {
+ foreach (const LanguageUtils::FakeMetaObject::Export &exportValue, qmlValue->metaObject()->exports()) {
+ if (exportValue.package.toUtf8() != "<cpp>") {
+ found = true;
+ description.className = exportValue.package.toUtf8() + '.' + exportValue.type.toUtf8();
+ }
+ }
+ }
+ if (!found) {
+ if (qmlValue->moduleName().isEmpty() && cppExport.isValid()) {
+ description.className = cppExport.package.toUtf8() + '.' + cppExport.type.toUtf8();
+ } else if (!qmlValue->moduleName().isEmpty()) {
+ description.className = qmlValue->moduleName().toUtf8() + '.' + description.className;
+ }
+ }
+ }
m_prototypes.append(description);
} else {
if (context()->lookupType(document(), QStringList() << ov->className())) {