forked from qt-creator/qt-creator
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:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user