CMakePM: Be more graceful regarding cmake tools

Otherwise we may easily lose registered tools if the device
is currently not available.
This happens e.g. if the docker daemon is not running.

Change-Id: I10156d749bf33d7d789c3fad78bf3acdf1f6fd74
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Christian Stenger
2021-10-04 09:40:33 +02:00
parent 6907d9c6b4
commit 95259ae79d

View File

@@ -213,7 +213,7 @@ void CMakeToolSettingsAccessor::saveCMakeTools(const QList<CMakeTool *> &cmakeTo
for (const CMakeTool *item : cmakeTools) { for (const CMakeTool *item : cmakeTools) {
Utils::FilePath fi = item->cmakeExecutable(); Utils::FilePath fi = item->cmakeExecutable();
if (fi.isExecutableFile()) { if (fi.needsDevice() || fi.isExecutableFile()) { // be graceful for device related stuff
QVariantMap tmp = item->toMap(); QVariantMap tmp = item->toMap();
if (tmp.isEmpty()) if (tmp.isEmpty())
continue; continue;