Debugger: Do not force cdb when no toolchain is configured

... in the kit settings widget.

Fixes: QTCREATORBUG-28458
Change-Id: I75907bfeeff56173fb9d92045345ba0ca15584b4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2022-11-28 16:31:31 +01:00
parent 452e1ca232
commit 2f8e962f83

View File

@@ -249,8 +249,18 @@ void DebuggerKitAspect::fix(Kit *k)
setup(k); setup(k);
return; return;
} }
const Abi tcAbi = ToolChainKitAspect::targetAbi(k);
if (item->matchTarget(tcAbi) != DebuggerItem::DoesNotMatch) Abi kitAbi;
if (ToolChainKitAspect::toolChains(k).isEmpty()) {
if (DeviceTypeKitAspect::deviceTypeId(k)
!= ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) {
return;
}
kitAbi = Abi(Abi::UnknownArchitecture, Abi::hostAbi().os());
} else {
kitAbi = ToolChainKitAspect::targetAbi(k);
}
if (item->matchTarget(kitAbi) != DebuggerItem::DoesNotMatch)
return; return;
k->setValue(DebuggerKitAspect::id(), QVariant()); k->setValue(DebuggerKitAspect::id(), QVariant());
setup(k); setup(k);