From 5af9e2f46aab7ba626be86317b82a965d856c0cd Mon Sep 17 00:00:00 2001 From: Aurindam Jana Date: Tue, 16 Oct 2012 15:28:54 +0200 Subject: [PATCH] Debugger: Validate debugger for C++ debugging Task-number: QTCREATORBUG-8059 Change-Id: Icc277f47f46c1d7276d860e8bf1c133198020d78 Reviewed-by: hjk --- src/plugins/debugger/debuggerplugin.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp index 6588f4cbaa5..ea79ab1220e 100644 --- a/src/plugins/debugger/debuggerplugin.cpp +++ b/src/plugins/debugger/debuggerplugin.cpp @@ -668,19 +668,21 @@ bool fillParameters(DebuggerStartParameters *sp, const Kit *kit /* = 0 */, QStri *errorMessage = DebuggerKitInformation::tr("No kit found."); return false; } - const QList tasks = DebuggerKitInformation::validateDebugger(kit); - if (!tasks.isEmpty()) { - sp->startMode = NoStartMode; - if (errorMessage) { - foreach (const ProjectExplorer::Task &t, tasks) { - if (errorMessage->isEmpty()) - errorMessage->append(QLatin1Char('\n')); - errorMessage->append(t.description); + // validate debugger if C++ debugging is enabled + if (sp->languages & CppLanguage) { + const QList tasks = DebuggerKitInformation::validateDebugger(kit); + if (!tasks.isEmpty()) { + sp->startMode = NoStartMode; + if (errorMessage) { + foreach (const ProjectExplorer::Task &t, tasks) { + if (errorMessage->isEmpty()) + errorMessage->append(QLatin1Char('\n')); + errorMessage->append(t.description); + } } + return false; } - return false; } - sp->cppEngineType = DebuggerKitInformation::engineType(kit); sp->sysRoot = SysRootKitInformation::sysRoot(kit).toString(); sp->debuggerCommand = DebuggerKitInformation::debuggerCommand(kit).toString();