From 90a18fe7fa94c8c98cff86c957aa96c8c8c414a8 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 8 Sep 2020 16:54:11 +0200 Subject: [PATCH] ProjectExplorer: Fix ToolChain::isAutoDetected() Amends d116559cd8. Fixes: QTCREATORBUG-24545 Change-Id: I3a6c198a6ef2db91c4c3eb75721657e0c491e665 Reviewed-by: hjk Reviewed-by: Orgad Shaneh --- src/plugins/projectexplorer/toolchain.cpp | 5 +++++ src/plugins/projectexplorer/toolchain.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/toolchain.cpp b/src/plugins/projectexplorer/toolchain.cpp index 54bf8bf40ab..b344f325627 100644 --- a/src/plugins/projectexplorer/toolchain.cpp +++ b/src/plugins/projectexplorer/toolchain.cpp @@ -155,6 +155,11 @@ void ToolChain::setDisplayName(const QString &name) toolChainUpdated(); } +bool ToolChain::isAutoDetected() const +{ + return detection() == AutoDetection || detection() == AutoDetectionFromSdk; +} + ToolChain::Detection ToolChain::detection() const { return d->m_detection; diff --git a/src/plugins/projectexplorer/toolchain.h b/src/plugins/projectexplorer/toolchain.h index e4ca6f9dde9..c1befe69b60 100644 --- a/src/plugins/projectexplorer/toolchain.h +++ b/src/plugins/projectexplorer/toolchain.h @@ -99,7 +99,7 @@ public: QString displayName() const; void setDisplayName(const QString &name); - inline bool isAutoDetected() const { return detection() != ManualDetection; } + bool isAutoDetected() const; Detection detection() const; QByteArray id() const;