QmlDesigner: Do not throw exception in meta info proxy case

If there is a metaInfoProxyModel the version numbers will be different.
(e.g. 6.3 im the document has a 6.3 import and 2.0 from the template).

This is no problem and we can ignore this case. The check is supposed
to be removed anyway.

Task-number: QDS-7350
Change-Id: I780fc7d4b744e298bc8f3b991e75f642a4e8ae8a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2022-08-15 16:31:39 +02:00
parent f31638c856
commit 96d0f86552

View File

@@ -524,13 +524,14 @@ public:
&& metaInfo.majorVersion() == majorVersion
&& metaInfo.minorVersion() == minorVersion;
if (!ok) {
qDebug() << Q_FUNC_INFO;
qDebug() << astTypeNode->name.toString() << typeName;
qDebug() << metaInfo.isValid() << metaInfo.typeName();
qDebug() << metaInfo.directSuperClass().typeName();
if (!typeName.startsWith("..."))
if (!typeName.startsWith("...") && m_model == m_model->metaInfoProxyModel())
throw RewritingException(__LINE__, __FUNCTION__, __FILE__, "test", "test");
}