QmlDesigner: change the import path to QtQuick2 path

Change-Id: I8adb6fdd334647dd85a8a9f95738ac22fc690363
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Tim Jenssen
2018-10-09 12:34:23 +02:00
committed by Thomas Hartmann
parent b84ba427f8
commit 8d8aa62e4d

View File

@@ -685,7 +685,7 @@ static inline QString fixComponentPathForIncompatibleQt(const QString &component
if (componentPath.contains(importString)) {
int index = componentPath.indexOf(importString) + 8;
const QString relativeImportPath = componentPath.right(componentPath.length() - index);
QString fixedComponentPath = QLibraryInfo::location(QLibraryInfo::ImportsPath) + relativeImportPath;
QString fixedComponentPath = QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath) + relativeImportPath;
fixedComponentPath.replace(QLatin1Char('\\'), QLatin1Char('/'));
if (QFileInfo::exists(fixedComponentPath))
return fixedComponentPath;