From 0a7935d4490001691b3846f6fa10c66e765dd65e Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 21 Oct 2021 12:59:53 +0200 Subject: [PATCH] ProjectExplorer: fix comparing toolchains on redetection Use the specialized operator== of ToolChain when looking for priorly defined autodetected tool chains. Fixes: QTCREATORBUG-25697 Change-Id: I477d29695eef2acb1ba566d42df9b1e57d26eb07 Reviewed-by: Christian Kandeler --- src/plugins/projectexplorer/toolchainoptionspage.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/plugins/projectexplorer/toolchainoptionspage.cpp b/src/plugins/projectexplorer/toolchainoptionspage.cpp index fc92b2e83b8..d0f3687d51e 100644 --- a/src/plugins/projectexplorer/toolchainoptionspage.cpp +++ b/src/plugins/projectexplorer/toolchainoptionspage.cpp @@ -417,10 +417,7 @@ void ToolChainOptionsWidget::redetectToolchains() if (knownTcs.contains(tc) || toDelete.contains(tc)) continue; const auto matchItem = [tc](const ToolChainTreeItem *item) { - return item->toolChain->compilerCommand() == tc->compilerCommand() - && item->toolChain->typeId() == tc->typeId() - && item->toolChain->language() == tc->language() - && item->toolChain->targetAbi() == tc->targetAbi(); + return *item->toolChain == *tc; }; ToolChainTreeItem * const item = findOrDefault(itemsToRemove, matchItem); if (item) {