CMake: Use current pattern to access main settings page

Change-Id: I95c556bebe1d583879b6702f727d9a859b9a4bcb
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
hjk
2023-07-06 17:06:20 +02:00
parent 0822f28998
commit 3e155919eb
12 changed files with 43 additions and 48 deletions

View File

@@ -174,13 +174,13 @@ void CMakeToolSettingsAccessor::saveCMakeTools(const QList<CMakeTool *> &cmakeTo
data.insert(QLatin1String(CMAKE_TOOL_DEFAULT_KEY), defaultId.toSetting());
int count = 0;
const bool autoRun = settings().autorunCMake();
for (CMakeTool *item : cmakeTools) {
Utils::FilePath fi = item->cmakeExecutable();
// Gobal Autorun value will be set for all tools
// TODO: Remove in Qt Creator 13
const auto settings = CMakeSpecificSettings::instance();
item->setAutorun(settings->autorunCMake.value());
item->setAutorun(autoRun);
if (fi.needsDevice() || fi.isExecutableFile()) { // be graceful for device related stuff
QVariantMap tmp = item->toMap();