QmlDesigner: Do not try to create objects with invalid version

Change-Id: I15eb8cf006bf8a58eaba4140f062fbf14e417f47
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2019-10-14 16:01:45 +02:00
parent 9a6157becd
commit 5b325b1748

View File

@@ -633,7 +633,7 @@ QObject *ObjectNodeInstance::createPrimitive(const QString &typeName, int majorN
if (mockHash.contains(typeName))
object = QmlPrivateGate::createComponent(mockHash.value(typeName), context);
else
else if (majorNumber != -1 && minorNumber != -1)
object = QmlPrivateGate::createPrimitive(polishTypeName, majorNumber, minorNumber, context);
/* Let's try to create the primitive from source, since with incomplete meta info this might be a pure