Debugger: Message box when preferred debugger is not set up.

Task-number: QTCREATORBUG-3990
This commit is contained in:
Friedemann Kleint
2011-03-14 15:42:26 +01:00
parent 29777da964
commit c75738f9ac

View File

@@ -544,14 +544,12 @@ DEBUGGER_EXPORT ConfigurationCheck checkDebugConfiguration(const DebuggerStartPa
if (et & cmdLineEnabledEngines) {
usableTypes.push_back(et);
} else {
const QString msg = DebuggerPlugin::tr("The debugger engine '%1' preferred for "
"debugging binaries of type %2 is disabled.").
arg(engineTypeName(et), sp.toolChainAbi.toString());
debuggerCore()->showMessage(msg, LogWarning);
result.errorDetails.push_back(DebuggerPlugin::tr("The debugger engine '%1' is disabled.").
arg(engineTypeName(et)));
}
if (usableTypes.isEmpty()) {
result.errorMessage = DebuggerPlugin::tr("This configuration requires the debugger engine %1, which is disabled.").
arg(QLatin1String(engineTypeName(usableTypes.front())));
arg(QLatin1String(engineTypeName(requiredTypes.front())));
return result;
}
if (debug)
@@ -572,11 +570,6 @@ DEBUGGER_EXPORT ConfigurationCheck checkDebugConfiguration(const DebuggerStartPa
if (configurationOk) {
break;
} else {
const QString msg = DebuggerPlugin::tr("The debugger engine '%1' preferred "
"for debugging binaries of type %2 is not set up correctly: %3").
arg(engineTypeName(usableTypes.front()), sp.toolChainAbi.toString(),
result.errorDetails.isEmpty() ? QString() : result.errorDetails.back());
debuggerCore()->showMessage(msg, LogWarning);
usableTypes.pop_front();
}
}
@@ -586,6 +579,16 @@ DEBUGGER_EXPORT ConfigurationCheck checkDebugConfiguration(const DebuggerStartPa
result.errorMessage = DebuggerPlugin::tr("The debugger engine required for this configuration is not correctly configured.");
return result;
}
// Inform verbosely about MinGW-gdb/CDB fallbacks.
if (!result.errorDetails.isEmpty()) {
const QString msg = DebuggerPlugin::tr(
"The preferred debugger engine for debugging binaries of type '%1' is not available.\n"
"The debugger engine '%2' will be used as a fallback.\nDetails: %3").
arg(sp.toolChainAbi.toString(), engineTypeName(usableTypes.front()),
result.errorDetails.join(QString(QLatin1Char('\n'))));
debuggerCore()->showMessage(msg, LogWarning);
showMessageBox(QMessageBox::Warning, "Warning", msg);
}
// Anything left: Happy.
result.errorMessage.clear();
result.errorDetails.clear();