forked from qt-creator/qt-creator
QmlDesigner: Add more checks for kit when adding import paths
Especially if developing we do not want to parse all kits to slow down startup time. Change-Id: If49624941b611b7e8b19864bdd3f31b884c04514 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -651,9 +651,11 @@ bool StudioWelcomePlugin::delayedInitialize()
|
||||
|
||||
const QList<Kit *> kits = Utils::filtered(KitManager::kits(), [](const Kit *k) {
|
||||
const QtSupport::QtVersion *version = QtSupport::QtKitAspect::qtVersion(k);
|
||||
const bool isQt6 = version && version->qtVersion().majorVersion() == 6;
|
||||
const bool valid = version && version->isValid();
|
||||
const bool isQt6 = valid && version->qtVersion().majorVersion() == 6;
|
||||
const bool autoDetected = valid && version->isAutodetected();
|
||||
|
||||
return isQt6
|
||||
return isQt6 && autoDetected
|
||||
&& ProjectExplorer::DeviceTypeKitAspect::deviceTypeId(k)
|
||||
== ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE;
|
||||
});
|
||||
|
Reference in New Issue
Block a user