QmlDesigner: Allow creation without version number

Task-number: QDS-4403
Change-Id: I952de9a2a6aa345b041f890fb2d364850c25e492
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
Thomas Hartmann
2021-05-31 16:06:30 +02:00
parent a19ff0550b
commit 8910601b78
2 changed files with 7 additions and 1 deletions
@@ -684,6 +684,8 @@ QObject *ObjectNodeInstance::createPrimitive(const QString &typeName, int majorN
object = QmlPrivateGate::createComponent(mockHash.value(typeName), context);
else if (majorNumber != -1 && minorNumber != -1)
object = QmlPrivateGate::createPrimitive(polishTypeName, majorNumber, minorNumber, context);
else
object = QmlPrivateGate::createPrimitive(polishTypeName, 0, 0, context);
/* Let's try to create the primitive from source, since with incomplete meta info this might be a pure
* QML type. This is the case for example if a C++ type is mocked up with a QML file.