diff options
author | Eike Ziller <eike.ziller@qt.io> | 2021-09-22 15:57:27 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2021-09-23 08:13:03 +0000 |
commit | b53512352ed5d20a7ae1b5c22fc0a305a6785dd5 (patch) | |
tree | 3ead67b01d20bdd84f08376dcf679f4143ac3dba /src | |
parent | a6f29a5f314a9832cdb8972b3f8ab5aaf342f8dc (diff) |
CMake: NinjaPath was never supposed to be written to the settings
It is a value written by the installer, and to be read from the install
settings. Writing it to the local user settings breaks it if the user
uninstalls Qt and installs it at a different location.
Also add a temporary fixup, removing the setting from the local user
settings, if it was already written there.
Amends beda74932642c730f1fb24d1ac2a9617f5b10a40
Fixes: QTCREATORBUG-26289
Change-Id: I27652031b13aaf17a5daff3bfba1312bf1158ec7
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmakespecificsettings.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakespecificsettings.cpp b/src/plugins/cmakeprojectmanager/cmakespecificsettings.cpp index 8a87865057..2c1702eba1 100644 --- a/src/plugins/cmakeprojectmanager/cmakespecificsettings.cpp +++ b/src/plugins/cmakeprojectmanager/cmakespecificsettings.cpp @@ -25,6 +25,7 @@ #include "cmakespecificsettings.h" +#include <coreplugin/icore.h> #include <projectexplorer/projectexplorerconstants.h> #include <utils/layoutbuilder.h> @@ -36,6 +37,9 @@ namespace Internal { CMakeSpecificSettings::CMakeSpecificSettings() { + // TODO: fixup of QTCREATORBUG-26289 , remove in Qt Creator 7 or so + Core::ICore::settings()->remove("CMakeSpecificSettings/NinjaPath"); + setSettingsGroup("CMakeSpecificSettings"); setAutoApply(false); @@ -51,6 +55,9 @@ CMakeSpecificSettings::CMakeSpecificSettings() registerAspect(&ninjaPath); ninjaPath.setSettingsKey("NinjaPath"); + // never save this to the settings: + ninjaPath.setToSettingsTransformation( + [](const QVariant &) { return QVariant::fromValue(QString()); }); registerAspect(&packageManagerAutoSetup); packageManagerAutoSetup.setSettingsKey("PackageManagerAutoSetup"); |