QmlDesigner: Fix error for Connections

Connections is actually in QtQml.

Change-Id: I88d33e273efa542535ef7f87a4020c23f172b15e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2019-01-31 15:07:36 +01:00
parent f6c46ce35d
commit d4726589f1

View File

@@ -656,7 +656,9 @@ QObject *ObjectNodeInstance::createPrimitiveFromSource(const QString &typeName,
if (parts.isEmpty())
return 0;
const QString importString = parts.join(".") + " " + QString::number(majorNumber) + "." + QString::number(minorNumber);
QString importString = parts.join(".") + " " + QString::number(majorNumber) + "." + QString::number(minorNumber);
if (importString == "QtQuick 1.0") /* Workaround for implicit QQml import */
importString = "QtQuick 2.0";
QString source = "import " + importString + "\n" + unqualifiedTypeName + " {\n" + "}\n";
return createCustomParserObject(source, "", context);
}