From 175018abe75af7efeed9a15ce414fb6830b78906 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 10 May 2019 16:58:30 +0200 Subject: [PATCH] ProjectExplorer: Remove Toolchain::AutoDetectionFromSettings It's unclear why auto-detected toolchains should be treated differently after a restart of Qt Creator. Change-Id: I0ba3787adccfb070ce0b36135e8fe94d6e4e4628 Reviewed-by: hjk --- src/plugins/projectexplorer/toolchain.cpp | 2 +- src/plugins/projectexplorer/toolchain.h | 1 - src/plugins/projectexplorer/toolchainsettingsaccessor.cpp | 8 ++++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/plugins/projectexplorer/toolchain.cpp b/src/plugins/projectexplorer/toolchain.cpp index 6b6d7fee67c..da236f6c3a6 100644 --- a/src/plugins/projectexplorer/toolchain.cpp +++ b/src/plugins/projectexplorer/toolchain.cpp @@ -273,7 +273,7 @@ bool ToolChain::fromMap(const QVariantMap &data) d->m_id = id.mid(pos + 1).toUtf8(); const bool autoDetect = data.value(QLatin1String(AUTODETECT_KEY), false).toBool(); - d->m_detection = autoDetect ? AutoDetectionFromSettings : ManualDetection; + d->m_detection = autoDetect ? AutoDetection : ManualDetection; if (data.contains(LANGUAGE_KEY_V2)) { // remove hack to trim language id in 4.4: This is to fix up broken language diff --git a/src/plugins/projectexplorer/toolchain.h b/src/plugins/projectexplorer/toolchain.h index ca3bf1c103f..02bffbfbd18 100644 --- a/src/plugins/projectexplorer/toolchain.h +++ b/src/plugins/projectexplorer/toolchain.h @@ -82,7 +82,6 @@ public: enum Detection { ManualDetection, AutoDetection, - AutoDetectionFromSettings, AutoDetectionFromSdk, UninitializedDetection, }; diff --git a/src/plugins/projectexplorer/toolchainsettingsaccessor.cpp b/src/plugins/projectexplorer/toolchainsettingsaccessor.cpp index fb75599bfe1..35dab8110d1 100644 --- a/src/plugins/projectexplorer/toolchainsettingsaccessor.cpp +++ b/src/plugins/projectexplorer/toolchainsettingsaccessor.cpp @@ -390,14 +390,14 @@ void ProjectExplorerPlugin::testToolChainMerging_data() user3i = new TTC("user3", false); user3i->setDetection(ToolChain::ManualDetection); auto1 = new TTC("auto1"); - auto1->setDetection(ToolChain::AutoDetectionFromSettings); + auto1->setDetection(ToolChain::AutoDetection); auto1c = auto1->clone(); Q_UNUSED(auto1c); auto1_2 = new TTC("auto1"); - auto1_2->setDetection(ToolChain::AutoDetectionFromSettings); + auto1_2->setDetection(ToolChain::AutoDetection); auto2 = new TTC("auto2"); - auto2->setDetection(ToolChain::AutoDetectionFromSettings); + auto2->setDetection(ToolChain::AutoDetection); auto3i = new TTC("auto3", false); - auto3i->setDetection(ToolChain::AutoDetectionFromSettings); + auto3i->setDetection(ToolChain::AutoDetection); } QTest::newRow("no toolchains")