From 776d54e4352aa873f1cab014b1b32ee105514155 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Wed, 6 Mar 2019 10:11:18 +0100 Subject: [PATCH] Remove DebuggerKitInformation::defaultValue() The defaultValue() function was a half-baked version of the setup() function and prevented that one from working properly. It does not appear that anyone relies on defaultValue() having run; in fact, this function should probably be removed from the KitInformation interface entirely and its implementations be merged into setup(). Fixes: QTCREATORBUG-21994 Change-Id: I78525df8201ebd5e1883718ea7655297c9f58eb5 Reviewed-by: hjk Reviewed-by: David Schulz --- .../debugger/debuggerkitinformation.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/src/plugins/debugger/debuggerkitinformation.cpp b/src/plugins/debugger/debuggerkitinformation.cpp index 426df5dfa7b..ccf6009d271 100644 --- a/src/plugins/debugger/debuggerkitinformation.cpp +++ b/src/plugins/debugger/debuggerkitinformation.cpp @@ -56,24 +56,7 @@ DebuggerKitInformation::DebuggerKitInformation() setPriority(28000); } -QVariant DebuggerKitInformation::defaultValue(const Kit *k) const -{ - const Abi toolChainAbi = ToolChainKitInformation::targetAbi(k); - const Utils::FileNameList paths = Environment::systemEnvironment().path(); - QVariant nextBestFit; - for (const DebuggerItem &item : DebuggerItemManager::debuggers()) { - for (const Abi &targetAbi : item.abis()) { - if (targetAbi.isCompatibleWith(toolChainAbi)) { - if (paths.contains(item.command())) - return item.id(); // prefer debuggers found in PATH over those found elsewhere - if (nextBestFit.isNull()) - nextBestFit = item.id(); - } - } - } - - return nextBestFit; -} +QVariant DebuggerKitInformation::defaultValue(const Kit *) const { return QVariant(); } void DebuggerKitInformation::setup(Kit *k) {