forked from qt-creator/qt-creator
CMakePM: Make "Autorun CMake" a global setting
The "Autorun CMake" is only visible in the Tools settings page when the user clicks on CMake tool. This is not very visible and it doesn't have to be per CMake version. Change-Id: I57ded0b2e6a3ecb731bb8bc1495b6b61bc04c8b6 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
#include "cmaketoolmanager.h"
|
||||
|
||||
#include "cmakeprojectmanagertr.h"
|
||||
#include "cmakeprojectplugin.h"
|
||||
#include "cmakespecificsettings.h"
|
||||
#include "cmaketoolsettingsaccessor.h"
|
||||
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
@@ -138,6 +140,14 @@ void CMakeToolManager::restoreCMakeTools()
|
||||
updateDocumentation();
|
||||
|
||||
emit m_instance->cmakeToolsLoaded();
|
||||
|
||||
// Store the default CMake tool "Autorun CMake" value globally
|
||||
auto settings = Internal::CMakeProjectPlugin::projectTypeSpecificSettings();
|
||||
if (settings->autorunCMake.value() == settings->autorunCMake.defaultValue()) {
|
||||
CMakeTool *cmake = defaultCMakeTool();
|
||||
settings->autorunCMake.setValue(cmake ? cmake->isAutoRun() : true);
|
||||
settings->writeSettings(Core::ICore::settings());
|
||||
}
|
||||
}
|
||||
|
||||
void CMakeToolManager::updateDocumentation()
|
||||
|
||||
Reference in New Issue
Block a user