From 96d0f86552c7dca07089745394174b6880f85689 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Mon, 15 Aug 2022 16:31:39 +0200 Subject: [PATCH] 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 Reviewed-by: Miikka Heikkinen Reviewed-by: Reviewed-by: Thomas Hartmann --- .../qmldesigner/designercore/model/texttomodelmerger.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp index 86996baf363..6767bc11d56 100644 --- a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp +++ b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp @@ -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"); }