forked from qt-creator/qt-creator
QmlDesigner: Do not compare type names for file components
For file components the fully qualified type name is not properly defined and the component is created from source anyway. Task-number: QDS-7992 Change-Id: I2c2754c1bab53257a210c2e4de990a0a768618a3 Reviewed-by: Marco Bubke <marco.bubke@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -827,6 +827,8 @@ NodeMetaInfoPrivate::NodeMetaInfoPrivate(Model *model, TypeName type, int maj, i
|
|||||||
if (importInfo.type() == ImportType::Library) {
|
if (importInfo.type() == ImportType::Library) {
|
||||||
m_majorVersion = importInfo.version().majorVersion();
|
m_majorVersion = importInfo.version().majorVersion();
|
||||||
m_minorVersion = importInfo.version().minorVersion();
|
m_minorVersion = importInfo.version().minorVersion();
|
||||||
|
} else {
|
||||||
|
m_isFileComponent = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_qualfiedTypeName = getUnqualifiedName(m_qualfiedTypeName);
|
m_qualfiedTypeName = getUnqualifiedName(m_qualfiedTypeName);
|
||||||
@@ -835,6 +837,8 @@ NodeMetaInfoPrivate::NodeMetaInfoPrivate(Model *model, TypeName type, int maj, i
|
|||||||
|| importInfo.type() == ImportType::Directory);
|
|| importInfo.type() == ImportType::Directory);
|
||||||
if (prepandName)
|
if (prepandName)
|
||||||
m_qualfiedTypeName.prepend(importInfo.name().toUtf8() + '.');
|
m_qualfiedTypeName.prepend(importInfo.name().toUtf8() + '.');
|
||||||
|
|
||||||
|
m_qualfiedTypeName.replace("/", ".");
|
||||||
}
|
}
|
||||||
|
|
||||||
m_objectValue = getObjectValue();
|
m_objectValue = getObjectValue();
|
||||||
|
@@ -531,7 +531,7 @@ public:
|
|||||||
qDebug() << metaInfo.isValid() << metaInfo.typeName();
|
qDebug() << metaInfo.isValid() << metaInfo.typeName();
|
||||||
qDebug() << metaInfo.directSuperClass().typeName();
|
qDebug() << metaInfo.directSuperClass().typeName();
|
||||||
|
|
||||||
if (!typeName.startsWith("...") && m_model == m_model->metaInfoProxyModel()
|
if (!metaInfo.isFileComponent() && m_model == m_model->metaInfoProxyModel()
|
||||||
&& metaInfo.isValid())
|
&& metaInfo.isValid())
|
||||||
throw RewritingException(__LINE__, __FUNCTION__, __FILE__, "test", "test");
|
throw RewritingException(__LINE__, __FUNCTION__, __FILE__, "test", "test");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user