forked from qt-creator/qt-creator
McuSupport: Fix version warnings
Packages without version detection should not get a version warning, even if the json contains a version list. With this change, a package without version detection will not get a status with invalid version. Additionally, in the case of failed version detection, it would be helpful for the user to list the acceptable versions. The status text was updated to list these. Change-Id: I814a86c741d573732072206ef1e969790f175e6a Reviewed-by: Yasser Grimes <yasser.grimes@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -140,7 +140,7 @@ void McuPackage::updateStatus()
|
||||
m_status = Status::ValidPathInvalidPackage;
|
||||
} else if (m_versionDetector && m_detectedVersion.isEmpty()) {
|
||||
m_status = Status::ValidPackageVersionNotDetected;
|
||||
} else if (!validVersion) {
|
||||
} else if (m_versionDetector && !validVersion) {
|
||||
m_status = Status::ValidPackageMismatchedVersion;
|
||||
} else {
|
||||
m_status = Status::ValidPackage;
|
||||
@@ -223,7 +223,8 @@ QString McuPackage::statusText() const
|
||||
: tr("Path is empty, %1 not found.").arg(displayRequiredPath);
|
||||
break;
|
||||
case Status::ValidPackageVersionNotDetected:
|
||||
response = tr("Path %1 exists, but version could not be detected.").arg(displayPackagePath);
|
||||
response = tr("Path %1 exists, but version %2 could not be detected.")
|
||||
.arg(displayPackagePath, displayVersions);
|
||||
break;
|
||||
}
|
||||
return response;
|
||||
|
||||
Reference in New Issue
Block a user