forked from qt-creator/qt-creator
QmlDesigner: Fix Qt 6 imports
This allows using a Qt 5 puppet with simple Qt 6 files. Change-Id: Ic3264ffbf8d798ff260305079a0bb281f9628795 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -689,6 +689,12 @@ QObject *ObjectNodeInstance::createPrimitive(const QString &typeName, int majorN
|
||||
* QML type. This is the case for example if a C++ type is mocked up with a QML file.
|
||||
*/
|
||||
|
||||
if (!object && majorNumber == 6 && minorNumber == 0) {
|
||||
object = QmlPrivateGate::createPrimitive(polishTypeName, 2, 15, context);
|
||||
if (!object)
|
||||
object = QmlPrivateGate::createPrimitive(polishTypeName, 1, 0, context);
|
||||
}
|
||||
|
||||
if (!object)
|
||||
object = createPrimitiveFromSource(polishTypeName, majorNumber, minorNumber, context);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user