forked from qt-creator/qt-creator
qmljs: Fix parsing and and loading of qmldir imports
Add most changes to the qmldir parser of Qt6. This is not a direct application of the changes because they rely on changes to QtBase that are Q6 only. Ignore load errors of optional dependencies. Fixes: QTCREATORBUG-24772 Change-Id: I0b85818b602c8c7c1712e52318b4ca3f15364cc5 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -554,11 +554,12 @@ static void applyQt515MissingImportWorkaround(const QString &path, LibraryInfo &
|
||||
return;
|
||||
|
||||
if (isQtQuick) {
|
||||
info.setImports(QStringList(QStringLiteral("QtQml")));
|
||||
info.setImports(QList<QmlDirParser::Import>(
|
||||
{QmlDirParser::Import(QLatin1String("QtQml"), ComponentVersion(), 0)}));
|
||||
} else if (isQtQml) {
|
||||
info.setImports(QStringList(
|
||||
{ QStringLiteral("QtQml.Models"),
|
||||
QStringLiteral("QtQml.WorkerScript") }));
|
||||
info.setImports(QList<QmlDirParser::Import>(
|
||||
{ QmlDirParser::Import(QLatin1String("QtQml.Models"), ComponentVersion(), 0),
|
||||
QmlDirParser::Import(QLatin1String("QtQml.WorkerScript"), ComponentVersion(), 0) }));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user