cmake: Fix version information about unsupported cmake tool

When registering a CMake version without fileapi support and setting
that in a kit, the kit shows a warning about unsupported version. It
didn't show the version of the registered CMake though. Make CMake tools
without fileapi return their version number.

Change-Id: I388d3e0a17ff4145238c5c90109522665a6f6fac
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Eike Ziller
2020-11-18 16:58:53 +01:00
parent 953db51a15
commit f99e46c148

View File

@@ -318,7 +318,7 @@ QVector<std::pair<QString, int>> CMakeTool::supportedFileApiObjects() const
CMakeTool::Version CMakeTool::version() const
{
return isValid() ? m_introspection->m_version : CMakeTool::Version();
return m_introspection ? m_introspection->m_version : CMakeTool::Version();
}
bool CMakeTool::isAutoDetected() const