Merge remote-tracking branch 'origin/10.0'

Change-Id: I98e5e1ad43103984b490c65cdeed84b7414303b3
This commit is contained in:
Eike Ziller
2023-05-11 10:33:18 +02:00
19 changed files with 185 additions and 75 deletions

View File

@@ -61,6 +61,8 @@ public:
Utils::Id id() const { return m_id; }
QVariantMap toMap () const;
void setAutorun(bool autoRun) { m_isAutoRun = autoRun; }
void setFilePath(const Utils::FilePath &executable);
Utils::FilePath filePath() const;
Utils::FilePath cmakeExecutable() const;

View File

@@ -141,6 +141,7 @@ void CMakeToolManager::restoreCMakeTools()
emit m_instance->cmakeToolsLoaded();
// Store the default CMake tool "Autorun CMake" value globally
// TODO: Remove in Qt Creator 13
auto settings = Internal::CMakeSpecificSettings::instance();
if (settings->autorunCMake.value() == settings->autorunCMake.defaultValue()) {
CMakeTool *cmake = defaultCMakeTool();

View File

@@ -4,6 +4,7 @@
#include "cmaketoolsettingsaccessor.h"
#include "cmakeprojectmanagertr.h"
#include "cmakespecificsettings.h"
#include "cmaketool.h"
#include <coreplugin/icore.h>
@@ -184,9 +185,14 @@ void CMakeToolSettingsAccessor::saveCMakeTools(const QList<CMakeTool *> &cmakeTo
data.insert(QLatin1String(CMAKE_TOOL_DEFAULT_KEY), defaultId.toSetting());
int count = 0;
for (const CMakeTool *item : cmakeTools) {
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());
if (fi.needsDevice() || fi.isExecutableFile()) { // be graceful for device related stuff
QVariantMap tmp = item->toMap();
if (tmp.isEmpty())