From fa29dcb1cd16fae1c9fd4f65bde1bc0c68bacac2 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Tue, 19 Jul 2022 14:19:04 +0200 Subject: [PATCH] QmlDesigner: Ignore excpetion in special corner case If users do a ".." import the type name was "...XYZ". This could be considered technical correct, but is really not what we want to do in this case. The type is associated with a QML file anyway in this case. Change-Id: Icaac5cb237f4ae2a98f6458f119047cbdc87a64b Reviewed-by: Qt CI Bot 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 652d9a90526..49482cbdf3a 100644 --- a/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp +++ b/src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp @@ -530,7 +530,8 @@ public: qDebug() << metaInfo.isValid() << metaInfo.typeName(); qDebug() << metaInfo.directSuperClass().typeName(); - throw RewritingException(__LINE__, __FUNCTION__, __FILE__, "test", "test"); + if (!typeName.startsWith("...")) + throw RewritingException(__LINE__, __FUNCTION__, __FILE__, "test", "test"); } typeName = QString::fromUtf8(metaInfo.typeName());