diff --git a/src/plugins/cmakeprojectmanager/cmakespecificsettings.cpp b/src/plugins/cmakeprojectmanager/cmakespecificsettings.cpp index 1fe948cc72a..17d4534ff8a 100644 --- a/src/plugins/cmakeprojectmanager/cmakespecificsettings.cpp +++ b/src/plugins/cmakeprojectmanager/cmakespecificsettings.cpp @@ -61,6 +61,12 @@ CMakeSpecificSettings::CMakeSpecificSettings() // never save this to the settings: ninjaPath.setToSettingsTransformation( [](const QVariant &) { return QVariant::fromValue(QString()); }); + ninjaPath.setFromSettingsTransformation([](const QVariant &from) { + // Sometimes the installer appends the same ninja path to the qtcreator.ini file + const QString path = from.canConvert() ? from.toStringList().last() + : from.toString(); + return FilePath::fromUserInput(path).toVariant(); + }); packageManagerAutoSetup.setSettingsKey("PackageManagerAutoSetup"); packageManagerAutoSetup.setDefaultValue(true);