qmlls: ignore versions from Qt 6.7 or below

Do not select qmlls executables from versions below 6.8 by default,
as those have less features than QtC's builtin codemodel. Add an
option to re-enable using qmlls versions from Qt 6.7 or below,
which is off by default.

Fixes: QTCREATORBUG-31088
Change-Id: I56bfd39bc980996a92232cbcb424252d755cdfc0
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Sami Shalayel
2024-06-17 14:21:07 +02:00
parent 2f2ed24092
commit 3b558792eb
4 changed files with 29 additions and 2 deletions

View File

@@ -745,6 +745,11 @@ static Utils::FilePath qmllsForFile(const Utils::FilePath &file,
if (settings.useLatestQmlls)
return settingsManager->latestQmlls();
QmlJS::ModelManagerInterface::ProjectInfo pInfo = modelManager->projectInfoForPath(file);
if (!settings.ignoreMinimumQmllsVersion
&& QVersionNumber::fromString(pInfo.qtVersionString) < settings.mininumQmllsVersion) {
return {};
}
return pInfo.qmllsPath;
}