CMake: Move settings storage closer to class implementation

Simpler in use.

Change-Id: I8cc929001035974b9b73566b206410bfd77f73a6
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
hjk
2023-01-20 09:10:23 +01:00
parent 38faf098c8
commit 87c3f08e52
10 changed files with 24 additions and 34 deletions

View File

@@ -4,7 +4,6 @@
#include "cmaketoolmanager.h"
#include "cmakeprojectmanagertr.h"
#include "cmakeprojectplugin.h"
#include "cmakespecificsettings.h"
#include "cmaketoolsettingsaccessor.h"
@@ -142,7 +141,7 @@ void CMakeToolManager::restoreCMakeTools()
emit m_instance->cmakeToolsLoaded();
// Store the default CMake tool "Autorun CMake" value globally
auto settings = Internal::CMakeProjectPlugin::projectTypeSpecificSettings();
auto settings = Internal::CMakeSpecificSettings::instance();
if (settings->autorunCMake.value() == settings->autorunCMake.defaultValue()) {
CMakeTool *cmake = defaultCMakeTool();
settings->autorunCMake.setValue(cmake ? cmake->isAutoRun() : true);