Debugger: Validate debugger for C++ debugging

Task-number: QTCREATORBUG-8059

Change-Id: Icc277f47f46c1d7276d860e8bf1c133198020d78
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Aurindam Jana
2012-10-16 15:28:54 +02:00
committed by hjk
parent 22f929ea34
commit 5af9e2f46a

View File

@@ -668,19 +668,21 @@ bool fillParameters(DebuggerStartParameters *sp, const Kit *kit /* = 0 */, QStri
*errorMessage = DebuggerKitInformation::tr("No kit found.");
return false;
}
const QList<ProjectExplorer::Task> 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<ProjectExplorer::Task> 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();