aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/customtoolchain.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-09-03 10:58:59 +0200
committerFriedemann Kleint <Friedemann.Kleint@digia.com>2013-09-03 11:32:33 +0200
commit1226400af3da68f355f298935bc13807f257d224 (patch)
tree51105d06435ec24663c9976e6131e7203d9c1faa /src/plugins/projectexplorer/customtoolchain.cpp
parentf1d18ba38bffd85f4946223cce6cd983d814f440 (diff)
Introduce an enumeration for toolchain autodetection.
Replace boolean "autodetect" by an enumeration with a value AutoDetectionFromSettings indicating whether the Autodetection originates from a settings file. Enable the "Remove" button for those cases. Currently, there is no way to remove toolchains that were once autodetected and are no longer present. This happens for example when working in different MinGW environments, which then clutter up the toolchain options page and dramatically slow down the options page opening since gcc is launched to query the flags, etc. Change-Id: I731168d8694fe56f60d909f9779f83cffa55fd44 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src/plugins/projectexplorer/customtoolchain.cpp')
-rw-r--r--src/plugins/projectexplorer/customtoolchain.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/projectexplorer/customtoolchain.cpp b/src/plugins/projectexplorer/customtoolchain.cpp
index 2c9a06412d..29a0f5d815 100644
--- a/src/plugins/projectexplorer/customtoolchain.cpp
+++ b/src/plugins/projectexplorer/customtoolchain.cpp
@@ -76,13 +76,13 @@ static const char messageCapKeyC[] = "ProjectExplorer.CustomToolChain.MessageCap
// CustomToolChain
// --------------------------------------------------------------------------
-CustomToolChain::CustomToolChain(bool autodetect) :
- ToolChain(QLatin1String(Constants::CUSTOM_TOOLCHAIN_ID), autodetect),
+CustomToolChain::CustomToolChain(Detection d) :
+ ToolChain(QLatin1String(Constants::CUSTOM_TOOLCHAIN_ID), d),
m_outputParser(Gcc)
{ }
-CustomToolChain::CustomToolChain(const QString &id, bool autodetect) :
- ToolChain(id, autodetect)
+CustomToolChain::CustomToolChain(const QString &id, Detection d) :
+ ToolChain(id, d)
{ }
CustomToolChain::CustomToolChain(const CustomToolChain &tc) :
@@ -416,7 +416,7 @@ bool CustomToolChainFactory::canRestore(const QVariantMap &data)
ToolChain *CustomToolChainFactory::restore(const QVariantMap &data)
{
- CustomToolChain *tc = new CustomToolChain(false);
+ CustomToolChain *tc = new CustomToolChain(ToolChain::ManualDetection);
if (tc->fromMap(data))
return tc;
@@ -426,7 +426,7 @@ ToolChain *CustomToolChainFactory::restore(const QVariantMap &data)
CustomToolChain *CustomToolChainFactory::createToolChain(bool autoDetect)
{
- return new CustomToolChain(autoDetect);
+ return new CustomToolChain(autoDetect ? ToolChain::AutoDetection : ToolChain::ManualDetection);
}
// --------------------------------------------------------------------------